MCP server that lets AI agents execute code instead of calling tools directly.
{
"mcpServers": {
"mcx": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server that lets AI agents execute code instead of calling tools directly.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 2 days ago. 24 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Mcx and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
███╗ ███╗ ██████╗██╗ ██╗
████╗ ████║██╔════╝╚██╗██╔╝
██╔████╔██║██║ ╚███╔╝
██║╚██╔╝██║██║ ██╔██╗
██║ ╚═╝ ██║╚██████╗██╔╝ ██╗
╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
MCP server that lets AI agents execute code instead of calling tools directly.
Based on Anthropic's code execution article.
Traditional MCP has two inefficiencies:
Instead of calling tools directly, the agent writes code that runs in a sandbox:
const invoices = await api.getInvoices({ limit: 100 });
return {
count: invoices.length,
total: sum(invoices, 'amount'),
byStatus: count(invoices, 'status')
};
// Returns ~50 tokens instead of 50,000
Result: 98% token reduction by filtering data inside the execution environment.
# Install globally with bun
bun add -g @papicandela/mcx-cli
# Initialize global directory (~/.mcx/)
mcx init
Requires Bun: MCX uses Bun for runtime. Install Bun if you haven't already.
# 1. Initialize global MCX directory
mcx init
# 2. Generate adapters from API docs
mcx gen ./api-docs.md -n myapi
# 3. Add credentials to ~/.mcx/.env
# 4. Start server
mcx serve
~/.mcx/
├── adapters/ # Your adapters
│ ├── supabase.ts # Supabase Management API
│ ├── chrome-devtools.ts # Chrome DevTools Protocol
│ └── myapi.ts # Generated from OpenAPI
├── skills/ # Reusable skills
├── mcx.config.ts # Auto-loads all adapters
├── .env # API credentials
└── package.json # Dependencies
# Runtime (created automatically)
~/.mcx/
├── logs/ # Server logs (mcx logs to view)
└── .cache/ # FTS5 search index
Add to your Claude Code settings (~/.claude.json or project's .mcp.json):
{
"mcpServers": {
"mcx": {
"command": "mcx",
"args": ["serve"]
}
}
}
That's it! MCX automatically uses ~/.mcx/ for config and adapters.
Redirect native tools to MCX alternatives for better performance:
~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{ "matcher": "Grep", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-redirect.js" }] },
{ "matcher": "Glob", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-redirect.js" }] },
{ "matcher": "Edit", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-redirect.js" }] },
{ "matcher": "Write", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-redirect.js" }] },
{ "matcher": "Read", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-read-check.js" }] },
{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "bun ~/.claude/hooks/mcx-bash-check.js" }] }
]
}
}
| Native Tool | MCX Alternative | Advantage |
|-------------|-----------------|-----------|
| Glob | mcx_find | Frecency ranking, git status, proximity boost |
| Grep | mcx_grep | SIMD-accelerated, fuzzy search |
| Edit | mcx_edit | No "read first" requirement, CRLF normalization |
| Write | mcx_write | No "read first" requirement |
| Read (>50KB) | mcx_file({ storeAs }) | File stays in sandbox, 99% token savings |
| Bash cat/grep/find | mcx_file/mcx_grep/mcx_find | Redirects shell commands to MCX |
See Hooks Integration for hook scripts.
| Feature | Description |
|---------|-------------|
| Lazy Loading | Adapters from ~/.mcx/adapters/ metadata-scanned at startup, fully loaded on first use |
| Domain Hints |