mcpcodeserver
Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.
Ads
Overview
A Model Context Protocol (MCP) proxy server that translates tool calls into TypeScript code generation. Instead of making multiple tool calls back and forth, LLMs can write TypeScript code that calls multiple tools naturally, reducing token overhead and leveraging the LLM's superior code generation capabilities. LLMs make multiple sequential tool calls, burning tokens and struggling with complex workflows: - ❌ Multiple round-trips between LLM and tools - ❌ Complex tool calling sequences are error-prone - ❌ Data cannot easily be passed between tools - ❌ Limited error handling and control flow
Installation
npx github:zbowling/mcpcodeserver --help
Configuration
{
"mcpServers": {
"mcpcodeserver": {
"command": "npx",
"args": ["-y", "mcpcodeserver", "--config", "/path/to/your/mcp.json"]
}
}Capabilities
- List connected child servers
Use `list_servers` to see which sub-servers are available and active.
- Get TypeScript definitions for tools
Call `get_tool_definitions` to retrieve typed function signatures for all or specific servers’ tools.
- Execute multi-tool workflows as code
Write TypeScript that chains multiple tool calls, loops, and conditionals via `generate_and_execute_code`.
- Filter tool definitions by server
Pass `server_names` to `get_tool_definitions` to reduce context usage and focus on relevant tools.
- Handle errors in tool sequences
Use try/catch inside generated code to recover from individual tool failures without aborting the whole workflow.
Tags
- coding-agent
- development
- ai-agent
Related MCP servers
Context7 MCP
OfficialOfficial Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.
Chrome DevTools MCP
OfficialOfficial Chrome DevTools MCP server for controlling and inspecting a live Chrome browser from coding agents such as Gemini, Claude, Cursor, and Copilot.
Mastra/mcp
OfficialClient implementation for Mastra, providing seamless integration with MCP-compatible AI models and tools.
GitHub MCP Server
OfficialConnect your AI assistant to GitHub repositories, issues, pull requests, and search.