code-mode
Code-Mode is a plug-and-play library that enables agents to call MCP and UTCP tools via code execution.
The Code-Mode Library transforms AI agents from clunky tool callers into efficient code executors, allowing them to utilize a single tool that executes TypeScript code while having access to an entire toolkit. This approach simplifies the interaction with tools and enhances the performance of large language models (LLMs) in executing code rather than just making tool calls. Major companies like Apple, Cloudflare, and Anthropic recognize Code-Mode as a more efficient method for tool calling compared to traditional methods.
Compatible with
Install
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"code-mode": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-mode"
]
}
}
}Config File Location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Some servers require additional setup - check the GitHub README for specific instructions.
Permissions