π¦
Codemoder
scriptable tool calls for any MCP server.
0 installs
Trust: 34 β Low
Comms
Ask AI about Codemoder
Powered by Claude Β· Grounded in docs
I know everything about Codemoder. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Codemoder
An MCP proxy server that adds "code mode" capability to any MCP server. This lets AI models write JavaScript code that can call multiple tools in a single execution, instead of calling tools one at a time.
How it Works
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββββ
β MCP Client ββββββΆβ codemoder ββββββΆβ Downstream MCP β
β (Claude, etc) β β β β Server β
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββββ
The proxy:
- Spawns and connects to a downstream MCP server
- Intercepts
list_toolsand adds anexecute_toolstool - Generates TypeScript interface definitions for all tools
- When
execute_toolsis called, runs JavaScript code that can call tools - Proxies regular tool calls through to the downstream server
Usage
# Proxy any MCP server (simple form)
codemoder ./my-mcp-server
# With options, use -- to separate codemoder args from the command
codemoder --mode replace -- ./my-mcp-server
# Custom tool name
codemoder --tool-name "run_script" -- ./my-mcp-server
# Only include specific tools
codemoder --include-tools "move_items,get_footprints" -- ./my-mcp-server
Options
| Option | Description | Default |
|---|---|---|
--mode | add exposes both execute_tools and original tools; replace only exposes execute_tools | add |
--tool-name | Name of the code execution tool | execute_tools |
--include-tools | Comma-separated list of tools to include | all tools |
Example
When connected through the proxy, the model can write:
// Get all items and sum their values
var items = tools.get_items({}).items;
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].value;
}
({count: items.length, total: total})
Building
cargo build --release
The binary will be at target/release/codemoder.
