Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.symbioticsec.ai/llms.txt

Use this file to discover all available pages before exploring further.

You can add external tools to Symbiotic Code using the Model Context Protocol, or MCP. Symbiotic Code supports both local and remote servers.
When you use an MCP server, it adds to the context. This can quickly add up if you have a lot of tools, as well as become a potential security liability. So we recommend being careful with which MCP servers you use.

Enable

You can define MCP servers in your configuration file under mcp. Add each MCP with a unique name. You can refer to that MCP by name when prompting the LLM.
symbiotic.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "name-of-mcp-server": {
      // ...
      "enabled": true,
    },
    "name-of-other-mcp-server": {
      // ...
    },
  },
}
You can also disable a server by setting enabled to false. This is useful if you want to temporarily disable a server without removing it from your config.

Local

Add local MCP servers by setting type to "local" within the MCP object.
symbiotic.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "my-local-mcp-server": {
      "type": "local",
      // Or ["bun", "x", "my-mcp-command"]
      "command": ["npx", "-y", "my-mcp-command"],
      "enabled": true,
      "environment": {
        "MY_ENV_VAR": "my_env_var_value",
      },
    },
  },
}
The command is how the local MCP server is started. You can also pass in a list of environment variables as well. For example, here’s how you can add the test @modelcontextprotocol/server-everything MCP server.
symbiotic.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "mcp_everything": {
      "type": "local",
      "command": ["npx", "-y", "@modelcontextprotocol/server-everything"],
    },
  },
}
And to use it I can add use the mcp_everything tool to my prompts.
use the mcp_everything tool to add the number 3 and 4

Options

Here are all the options for configuring a local MCP server.
OptionTypeRequiredDescription
typeStringYesType of MCP server connection, must be "local".
commandArrayYesCommand and arguments to run the MCP server.
environmentObjectEnvironment variables to set when running the server.
enabledBooleanEnable or disable the MCP server on startup.
timeoutNumberTimeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds).

Remote

Add remote MCP servers by setting type to "remote".
symbiotic.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "my-remote-mcp": {
      "type": "remote",
      "url": "https://my-mcp-server.com",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer MY_API_KEY"
      }
    }
  }
}
The url is the URL of the remote MCP server and with the headers option you can pass in a list of headers.

Options

OptionTypeRequiredDescription
typeStringYesType of MCP server connection, must be "remote".
urlStringYesURL of the remote MCP server.
enabledBooleanEnable or disable the MCP server on startup.
headersObjectHeaders to send with the request.
oauthObjectOAuth authentication configuration.
timeoutNumberTimeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds).