Normandy.MCP.ServerConfig (normandy v0.6.2)

View Source

Configuration for server-side MCP servers passed to the Anthropic API.

When using server-side MCP, Claude connects to the MCP server directly. This is simpler than client-side MCP but requires the server to be accessible from Anthropic's infrastructure.

Example

alias Normandy.MCP.ServerConfig

server = ServerConfig.new("my_server", "https://mcp.example.com/sse")
|> ServerConfig.set_auth_token("bearer-token")
|> ServerConfig.allow_tools(["search_*", "fetch_data"])

agent = BaseAgent.add_mcp_server(agent, server)

Summary

Functions

Sets which tools are allowed from this MCP server.

Creates a new MCP server configuration.

Sets the authorization token for the MCP server.

Converts to a Claudio.MCP.ServerConfig struct for API serialization.

Types

t()

@type t() :: %Normandy.MCP.ServerConfig{
  authorization_token: String.t() | nil,
  name: String.t(),
  tool_configuration: map() | nil,
  url: String.t()
}

Functions

allow_tools(config, patterns)

@spec allow_tools(t(), [String.t()]) :: t()

Sets which tools are allowed from this MCP server.

Accepts glob-style patterns.

new(name, url)

@spec new(String.t(), String.t()) :: t()

Creates a new MCP server configuration.

set_auth_token(config, token)

@spec set_auth_token(t(), String.t()) :: t()

Sets the authorization token for the MCP server.

to_claudio(config)

@spec to_claudio(t()) :: Claudio.MCP.ServerConfig.t()

Converts to a Claudio.MCP.ServerConfig struct for API serialization.