Settings.MCP (fnord v0.8.83)

View Source

Manage Hermes MCP server configuration under the "mcp_servers" key in settings.

MCP configuration can be stored at both global and project scopes without being automatically written unless the user performs a configuration action.

Configuration format:

"mcp_servers": %{server_name => server_config}

server_config fields:

  • "transport": "stdio" | "http" | "websocket"

  • "timeout_ms": integer (optional)
  • stdio-specific:
    • "command": string
    • "args": [string]
    • "env": %{string => string}
  • http/ws-specific:
    • "base_url": string
    • "headers": %{string => string}

Summary

Types

Full MCP configuration - map of server names to configs

Scope of MCP configuration: global or project

Configuration for an individual MCP server

Underlying Settings struct

Functions

Add a new MCP server configuration

Merge global and project MCP configurations, applying project overrides

Retrieve MCP server configurations for the given scope

List configured MCP servers by name for the given scope

Remove an existing MCP server configuration

Set MCP configuration for the given scope

Update an existing MCP server configuration

Types

config()

@type config() :: map()

Full MCP configuration - map of server names to configs

scope()

@type scope() :: :global | :project

Scope of MCP configuration: global or project

server_config()

@type server_config() :: map()

Configuration for an individual MCP server

settings()

@type settings() :: Settings.t()

Underlying Settings struct

Functions

add_server(settings, scope, name, raw_cfg)

@spec add_server(settings(), scope(), String.t(), map()) ::
  {:ok, settings()} | {:error, any()}

Add a new MCP server configuration

effective_config(settings)

@spec effective_config(settings()) :: config()

Merge global and project MCP configurations, applying project overrides

get_config(settings, atom)

@spec get_config(settings(), scope()) :: config()

Retrieve MCP server configurations for the given scope

list_servers(settings, scope)

@spec list_servers(settings(), scope()) :: map()

List configured MCP servers by name for the given scope

remove_server(settings, scope, name)

@spec remove_server(settings(), scope(), String.t()) ::
  {:ok, settings()} | {:error, any()}

Remove an existing MCP server configuration

set_config(settings, arg2, cfg)

@spec set_config(settings(), scope(), map()) :: settings()

Set MCP configuration for the given scope

update_server(settings, scope, name, raw_cfg)

@spec update_server(settings(), scope(), String.t(), map()) ::
  {:ok, settings()} | {:error, any()}

Update an existing MCP server configuration