MCP servers
Soma is an MCP client: configured servers provide tools and resources to model conversations. Both OpenAI and DeepSeek runners support local stdio servers and remote Streamable HTTP servers. The echo provider does not connect to MCP servers.
GitHub server
Enable the official hosted GitHub MCP server in ~/.soma/config.toml, or
$SOMA_HOME/config.toml when SOMA_HOME is set:
Set GITHUB_TOKEN to a GitHub personal access token before starting Soma.
GitHub tools appear as mcp__github__<tool> and use the permissions granted
to that token. Soma does not bundle or persist the token.
Without GITHUB_TOKEN, soma mcp list reports GitHub as failed with a missing
credential message; other servers and conversations continue normally.
Set enabled = false in the same table to disable GitHub, or use
enabled_tools and disabled_tools to restrict its tools. GitHub uses the same
configuration as any other server; Soma does not add built-in server entries.
Custom servers
Create ~/.soma/config.toml, or $SOMA_HOME/config.toml when SOMA_HOME is set:
Use command for stdio or url for HTTP, never both. Stdio servers may set
cwd, args, env (literal values), and env_vars (names to forward from the
Soma process). Relative cwd values resolve against the conversation's project
directory. The default environment includes standard home, path, locale and
temporary-directory variables; provider credentials are not forwarded by default.
Remote servers may use http_headers for literal headers and
env_http_headers for values read from environment variables. HTTP redirects
are disabled. OAuth login is not included; use bearer tokens for authenticated
HTTP servers.
Run a connection check before starting conversations:
The list command connects enabled servers and reports ready, failed, or
disabled with discovered, filtered tool names. Its output excludes commands,
URLs, environment values, and credentials. Missing or empty configuration
enables no servers.
Use -C /project/path to select the directory used to start local servers.
Tool execution and trust
Configuring an enabled server authorizes its tools. MCP permissions are
separate from --local-tools, which controls Soma's built-in local tools.
MCP servers may edit files, execute code, or access remote systems even when
local tools are read-only or disabled. Configure only servers you trust and use
enabled_tools to restrict which tools the model can invoke. disabled_tools
is applied after the allow-list and takes precedence. Both filters use the
original server tool names. enabled = false prevents connection entirely.
Tools are advertised as mcp__<server>__<tool>. Characters outside ASCII
letters, digits, hyphens, and underscores become underscores. Names longer than
64 bytes are shortened with a deterministic hash. Duplicate qualified names
are omitted rather than routed ambiguously. Original JSON input schemas are
advertised to the model. Tool output retains MCP content, structured content,
metadata and isError, subject to Soma's 32 KiB tool output limit. Errors are
replayed to the model so it can recover.
Resource-capable servers additionally provide list_mcp_resources,
list_mcp_resource_templates, and read_mcp_resource. Lists include the
configured server name alongside each resource. Omit server to aggregate
resources across servers, or specify it to use a server's pagination cursor.
Reading requires server and uri.
Lifecycle and limits
Each model runner connects before its first model step. The captured tool plan is shared by model advertisement and execution. Later steps and turns reuse that runner's connections; child agents inherit configuration and connect independently. New runners, including provider/model switches, reload settings from the configuration file. Restart or create a new conversation to apply changes to existing connections.
Startup and tool timeouts default to 10 and 120 seconds. Set positive values up
to 3600 seconds; fractional seconds are supported. Startup includes the initial
paginated tool discovery. Optional server failures omit their tools without
preventing a conversation. required = true fails step preparation when that
server cannot initialize. Interrupting a turn cancels pending MCP requests.
Dropping a runner closes its transport and terminates its stdio child.
Configuration is limited to 1 MiB and 32 servers; tool discovery is limited to 1024 tools per server and 128 pages. All-server resource listing is limited to 1024 entries; specify a server and cursor for larger catalogs. Catalogs are captured on connection and do not refresh from server notifications. Prompt discovery, elicitation, OAuth login and exposing Soma as an MCP server are not included.