Skip to content

MCP Integration

The Model Context Protocol (MCP) lets SANDCODE connect to external servers that provide additional tools, resources, and data. Think of it as a plugin system for AI capabilities.

MCP servers are configured in your .sandcode/settings.json:

{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["path/to/server.js"],
"env": {
"API_KEY": "..."
}
}
}
}

The most common type — SANDCODE spawns the server process and communicates via stdin/stdout:

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
}
}
}

Connect to a running server via Server-Sent Events:

{
"mcpServers": {
"remote": {
"url": "http://localhost:3000/sse"
}
}
}

Once connected, MCP servers expose tools that SANDCODE can use directly in conversation. The model automatically discovers and uses available tools based on context.

MCP servers run with the same permissions as the SANDCODE process. Only connect to servers you trust.