Generate discoverable code from MCP servers for AI agent tool usage.
{
"mcpServers": {
"mcp-coded-tools": {
"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.
Generate discoverable code from MCP servers for AI agent tool usage.
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 153 days ago. 3 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 Mcp Coded Tools and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Generate discoverable code from MCP servers for AI agent tool usage.
The Model Context Protocol (MCP) lets AI agents connect to external tools and data. However, as Anthropic's engineering post explains, loading hundreds or thousands of tool definitions directly into an agent's context window is inefficient:
The solution: Present MCP servers as code APIs that agents can discover and use through a filesystem interface. This approach reduces token usage by up to 98.7% while enabling more powerful agent workflows.
The problem: Manually writing wrapper code for each MCP tool is tedious.
mcp-coded-tools: Automatically generate discoverable Python code from any MCP server.
pip install mcp-coded-tools
# Generate code from popular MCP servers
mcp-coded-tools generate \
--command "npx -y @modelcontextprotocol/server-github" \
--output ./servers \
--server-name github
# Generate from multiple servers for complete workflows
mcp-coded-tools generate \
--command "npx -y @modelcontextprotocol/server-github" \
--command "npx -y @modelcontextprotocol/server-postgres" \
--command "python slack_mcp_server.py" \
--output ./servers
# Watch mode for development (auto-regenerate on changes)
mcp-coded-tools generate \
--command "python ./my_mcp_server.py" \
--output ./tools \
--watch
💡 See POPULAR_MCP_SERVERS.md for 50+ popular servers and real-world use cases!
💡 See WATCH_MODE.md for auto-regeneration during development!
import asyncio
from mcp-coded-tools import MCPCodeGenerator
async def main():
generator = MCPCodeGenerator()
# Connect to MCP server and generate code
await generator.connect_and_scan([
"npx", "-y", "@modelcontextprotocol/server-gdrive"
])
generator.generate_code(
output_dir="./servers",
server_name="google_drive"
)
print("✓ Generated discoverable code!")
asyncio.run(main())
servers/
├── google_drive/
│ ├── __init__.py
│ ├── get_document.py
│ ├── list_files.py
│ └── ...
├── salesforce/
│ ├── __init__.py
│ ├── update_record.py
│ └── ...
└── _client.py
Each tool becomes a typed Python function:
# servers/google_drive/get_document.py
from typing import Optional, Dict, Any
from .._client import call_mcp_tool
async def get_document(
document_id: str,
fields: Optional[str] = None
) -> Dict[str, Any]:
"""
Retrieves a document from Google Drive
"""
return await call_mcp_tool(
'gdrive_getDocument',
{'documentId': document_id, 'fields': fields}
)
Agents discover tools by exploring the filesystem:
# Agent lists available servers
import os
servers = os.listdir('./servers')
# ['google_drive', 'salesforce', ...]
# Agent reads a specific tool
with open('./servers/google_drive/get_document.py') as f:
tool_def = f.read()
# Understands parameters, types, description
# Agent writes code to use tools
import servers.google_drive as gdrive
import servers.salesforce as sf
async d
... [View full README on GitHub](https://github.com/bluman1/mcp-coded-tools#readme)