Extending

Connecting other tools

Add a tool server live, or import the ones you already configured elsewhere. No restart, no JSON editing.

ContextCode speaks the Model Context Protocol, so anything that publishes an MCP server — GitHub, a database, your own internal tooling — becomes available to you and to your agents.

Add one

Code
/mcp add github https://api.githubcopilot.com/mcp/
/mcp add filesystem npx -y @modelcontextprotocol/server-filesystem .

It connects immediately. No restart, no config file to hand-edit.

Add --global to make it available in every project.

Import what you already have

Code
/mcp import

Reads the servers you've configured for Claude Code, Cursor, and VS Code and offers to bring them over. Usually the fastest way to get set up.

Every server gets a shortcut

Connect a server called github and /mcp:github appears in the command palette. Same for the next one. You don't have to remember what a server exposes — type /mcp: and the list is there.

Managing them

Code
/mcp                     what's connected
/mcp tools               every tool available
/mcp tools <server>      one server's tools
/mcp disable <name>      keep it, stop using it
/mcp enable <name>
/mcp remove <name>
/mcp reload              after editing the config by hand

csc mcp add|list|enable|disable|remove|import manages the same servers from the shell.

Code
csc mcp add <name> <url> [--header K:V]
csc mcp add <name> <command> [args...] [--global] [--env K=V] [--timeout N]
csc mcp list
csc mcp enable <name>
csc mcp disable <name>
csc mcp remove <name>
csc mcp import [all|<name>...]

list also accepts ls; remove accepts rm and delete. Run csc mcp help for the live syntax.

Tools reach your agents too

A connected server is available to background agents, not just to the conversation. Its tools still pass through the active permission policy. Whether a call prompts, runs, or is denied depends on the current mode and any narrow rules you already approved.

Configuring by hand

JSON
// ~/.contextcode/settings.json
{
  "mcp": {
    "servers": {
      "github": {
        "url": "https://api.githubcopilot.com/mcp/",
        "headers": { "authorization": "Bearer …" }
      },
      "filesystem": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
      }
    }
  }
}

/mcp reload picks up changes without a restart.

The other direction

ContextCode is also available as an MCP server, so another agent can delegate work to it:

Terminal
csc mcp

See Running it headless and in CI.

If it doesn't work

It connected but no tools appeared. /mcp tools <server> lists what it actually exposes — some servers publish nothing until they're authenticated.

Authentication fails. Check the headers block and the server's own token requirements. ContextCode reports the connection failure, but it cannot renew a third-party credential for you.

A command-based server will not start. It inherits ContextCode's environment. Run the command directly once to catch a missing executable, argument, or environment variable.

Next