Repository navigation
Production Results: MCP Server for Github Validates Anthropic's Code-First Pattern (98% Token Reduction) #629
Replies: 2 comments 1 reply
|
Hi @crypto-ninja , thanks for sharing! Two notes for future posts: (1) consider focusing more on technical details and less on commercial offerings, and (2) please disclose whether this was AI-generated per our contributing guidelines. (Even though the guidelines are primarily addressing issues/PRs, I think its good practice to do this in general.) |
|
Post restructured as promised! 🎉 This update demonstrates the server's capabilities - it was posted using Progress since November 19:
The meta-development continues - this comment was posted using Thanks @olaservo for the feedback that pushed us to make this more technically substantial! Your guidance helped shape a much better contribution. Posted via MCP Server For GitHub v2.5.3 🐕 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
What would you like to share?
Production Implementation: Code-First MCP at Scale (112 Tools, 98% Token Reduction)
Summary
Following Anthropic's blog post "Code execution with MCP", we implemented and scaled the code-first pattern to 112 GitHub tools while maintaining the promised 98% token reduction. This post shares technical findings, challenges solved, and production metrics after 3+ weeks of development.
Repository: https://github.com/crypto-ninja/mcp-server-for-Github
Current Version: v2.5.3 (December 2025)
Architecture Overview
Key Design Decisions:
execute_codetool that accepts TypeScriptScale Metrics
Token Efficiency (Validated)
The 98% reduction from Anthropic's blog holds at scale. With 112 tools, we see 99%+ reduction on tool definitions alone.
Performance Characteristics
Connection pooling insight: The Deno runtime maintains MCP connections across calls. First call pays initialization cost; subsequent calls reuse the warm connection.
Test Coverage
Tool Categories (112 Total)
list_workflows,trigger_workflow,get_job_logs,download_artifactlist_dependabot_alerts,list_code_scanning_alerts,list_secret_scanning_alertsget_file_content,create_file,grep,batch_file_operationscreate_project,list_columns,update_projectget_repo_info,create_repository,update_repositorycreate_pr,merge_pr,get_pr_details,create_reviewcreate_discussion,update_discussion,add_commentlist_notifications,mark_read,set_subscriptioncreate_branch,delete_branch,compare_branchescreate_release,update_release,delete_releaseTechnical Challenges & Solutions
Challenge 1: Tool Discovery
Problem: How does an LLM know what 112 tools are available without loading all definitions?
Solution: Built explicit discovery functions:
Result: Zero failed calls from discovery issues.
Challenge 2: GitHub Discussions Require GraphQL
Problem: GitHub's REST API doesn't support creating/updating Discussions.
Solution: Hybrid client with automatic routing:
Challenge 3: Parameter Type Mismatches
Problem: API returns
release_idas integer, but tools expected strings.Solution: Accept
Union[int, str]and coerce internally:Challenge 4: Local/CI Environment Mismatch
Problem: Tests passed locally, failed in GitHub Actions.
Solution:
act- runs GitHub Actions locally in DockerPYTHONPATHto CI workflowChallenge 5: Large Response Handling
Problem: Some API calls return 1000+ items.
Solution: Truncation with explicit warning objects - LLM can request filtered queries.
The CLAUDE.md Pattern
We created documentation specifically for AI agents:
Why this matters: Traditional docs are for humans. CLAUDE.md is documentation for AI agents - concise, example-heavy, action-oriented.
Meta-Development: Tools Building Themselves
The most validating aspect: this server is developed using itself.
What We'd Do Differently
Conclusions
Anthropic's code-first pattern works at scale:
The key insight: tools as code on disk fundamentally changes the economics of MCP servers.
Relevant Links
Questions welcome! Happy to dive deeper into any technical aspect.
— Dave (@crypto-ninja)
All reactions