{"id":50747497,"url":"https://github.com/deeflect/universal-codemode","last_synced_at":"2026-06-10T22:30:49.429Z","repository":{"id":339803941,"uuid":"1162918583","full_name":"deeflect/universal-codemode","owner":"deeflect","description":"Give your AI agent access to any API in ~1,000 tokens. Two tools replace hundreds. 56 APIs included.","archived":false,"fork":false,"pushed_at":"2026-03-18T03:07:16.000Z","size":175,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-18T19:28:40.214Z","etag":null,"topics":["ai-agents","api","llm","mcp","openai","tool-calling","typescript"],"latest_commit_sha":null,"homepage":"https://cm.deeflect.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deeflect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-20T21:21:57.000Z","updated_at":"2026-03-18T10:33:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deeflect/universal-codemode","commit_stats":null,"previous_names":["deeflect/universal-codemode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deeflect/universal-codemode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeflect%2Funiversal-codemode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeflect%2Funiversal-codemode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeflect%2Funiversal-codemode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeflect%2Funiversal-codemode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeflect","download_url":"https://codeload.github.com/deeflect/universal-codemode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeflect%2Funiversal-codemode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34174148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","api","llm","mcp","openai","tool-calling","typescript"],"created_at":"2026-06-10T22:30:48.880Z","updated_at":"2026-06-10T22:30:49.419Z","avatar_url":"https://github.com/deeflect.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003ecodemode\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eGive your AI agent access to any API in ~1,000 tokens\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cm.deeflect.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Live-cm.deeflect.com-black?style=flat-square\" alt=\"Live\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/APIs-56-blue?style=flat-square\" alt=\"56 APIs\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/protocol-MCP-purple?style=flat-square\" alt=\"MCP\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/language-TypeScript-blue?style=flat-square\" alt=\"TypeScript\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-green?style=flat-square\" alt=\"MIT\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cm.deeflect.com\"\u003eDocs\u003c/a\u003e · \u003ca href=\"https://blog.deeflect.com/09-mcp-server/\"\u003eBlog Post\u003c/a\u003e · \u003ca href=\"https://deeflect.com\"\u003eAuthor\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nMost MCP servers flood your context window with hundreds of tool definitions. codemode gives your AI two tools instead: `search` and `execute`, built on [Cloudflare's Code Mode pattern](https://blog.cloudflare.com/code-mode-mcp/). Your AI writes code to search API docs and make calls. That's it.\n\n56 APIs out of the box. GitHub, Stripe, OpenAI, Slack, Notion, Discord, and 50 more.\n\n---\n\n## How it works\n\n```\nYour AI agent → \"find the endpoint to create a repo\"\n  → search() → AI writes JS to query the API spec → returns matching endpoints\n\nYour AI agent → \"create a repo called my-project\"  \n  → execute() → AI writes JS to call the API → your server proxies the request → returns result\n```\n\nTraditional MCP servers expose hundreds of tools per API. A single large API can eat 500K+ tokens just for tool definitions, which is more than most context windows.\n\ncodemode exposes **2 tools total**, regardless of API size. The AI figures out the rest by writing code against a searchable spec.\n\n| | Traditional MCP | codemode |\n|---|---|---|\n| Tools per API | 100-500+ | **2** |\n| Tokens used | 100K-1M+ | **~1,000** |\n| Adding a new API | Build a new MCP server | **Point at an OpenAPI spec** |\n\n---\n\n## Quick start\n\n### Use hosted (just connect)\n\nAdd to your MCP config:\n\n**Claude Code** (`~/.claude/mcp.json`):\n```json\n{\n  \"servers\": {\n    \"github\": {\n      \"url\": \"https://cm.dee.ad/mcp?api_id=github\",\n      \"headers\": { \"x-api-key\": \"your_github_token\" }\n    }\n  }\n}\n```\n\n**Cursor** → Settings → MCP → Add server → paste the URL.\n\n**OpenClaw** → Add to your MCP config with the same URL + header.\n\nYour AI now has full GitHub API access. Ask it anything.\n\n### Self-hosted (run locally)\n\n```bash\nnpm install -g universal-codemode-mcp\n\n# Run with any supported API\nuniversal-codemode-mcp serve --spec github\n```\n\nAdd to Claude Code as a local server:\n```json\n{\n  \"servers\": {\n    \"github\": {\n      \"command\": \"universal-codemode-mcp\",\n      \"args\": [\"serve\", \"--spec\", \"github\"],\n      \"env\": { \"UCMCP_AUTH_VALUE\": \"your_github_token\" }\n    }\n  }\n}\n```\n\n---\n\n## Supported APIs (56)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTier 1 — Core\u003c/strong\u003e\u003c/summary\u003e\n\n| API | Endpoints | Auth |\n|---|---:|---|\n| GitHub | 15 | Bearer |\n| Stripe | 12 | Bearer |\n| OpenAI | 12 | Bearer |\n| Anthropic | 10 | x-api-key |\n| Google (Gmail, Calendar, Drive, Sheets) | 40 | OAuth2 |\n| Slack | 10 | Bearer |\n| Discord | 10 | Bot token |\n| Notion | 10 | Bearer |\n| Twilio | 10 | Basic |\n| SendGrid | 10 | Bearer |\n| AWS (S3, Lambda, DynamoDB) | 30 | SigV4 |\n| Cloudflare | 10 | Bearer |\n| Vercel | 10 | Bearer |\n| Supabase | 10 | Bearer |\n| Firebase | 10 | OAuth2 |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTier 2 — Popular\u003c/strong\u003e\u003c/summary\u003e\n\n| API | Endpoints | Auth |\n|---|---:|---|\n| Shopify | 10 | Access Token |\n| HubSpot | 10 | Bearer |\n| Salesforce | 10 | OAuth2 |\n| Jira | 10 | Basic/OAuth2 |\n| Linear | 10 | Bearer |\n| Airtable | 10 | Bearer |\n| Figma | 10 | Bearer |\n| Spotify | 10 | Bearer |\n| X (Twitter) | 10 | Bearer |\n| Reddit | 10 | OAuth2 |\n| YouTube | 10 | API key |\n| Telegram | 10 | Bot token |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTier 3 — Developer Tools\u003c/strong\u003e\u003c/summary\u003e\n\n| API | Endpoints | Auth |\n|---|---:|---|\n| Docker Hub | 10 | Bearer |\n| npm Registry | 10 | Bearer |\n| PyPI | 10 | None |\n| Postman | 10 | API key |\n| Sentry | 10 | Bearer |\n| Datadog | 10 | API key |\n| PagerDuty | 10 | Token |\n| Grafana | 10 | Bearer |\n| MongoDB Atlas | 10 | Digest |\n| Elasticsearch | 10 | Basic |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTier 4 — Services\u003c/strong\u003e\u003c/summary\u003e\n\n| API | Endpoints | Auth |\n|---|---:|---|\n| OpenWeatherMap | 10 | API key |\n| NewsAPI | 10 | API key |\n| CoinGecko | 10 | None/API key |\n| Alpha Vantage | 10 | API key |\n| Unsplash | 10 | Client-ID |\n| Giphy | 10 | API key |\n| Mapbox | 10 | Token |\n| Google Maps | 10 | API key |\n| Calendly | 10 | Bearer |\n| Zoom | 10 | Bearer |\n| Intercom | 10 | Bearer |\n| Zendesk | 10 | Basic |\n| Mailchimp | 10 | API key |\n| ConvertKit | 10 | Bearer |\n\n\u003c/details\u003e\n\n---\n\n## Deploy your own\n\nDeploy to Cloudflare Workers (free tier handles 100K requests/day):\n\n```bash\n# Clone\ngit clone https://github.com/deeflect/universal-codemode.git\ncd codemode\n\n# Install\nnpm install\n\n# Setup Cloudflare resources\nwrangler login\nwrangler kv namespace create SPEC_CACHE    # copy ID to wrangler.jsonc\nwrangler r2 bucket create codemode-specs\nwrangler secret put ADMIN_TOKEN            # set your admin password\n\n# Deploy\nnpm run deploy\n\n# Seed all 56 APIs\nnpm run seed-catalog\n```\n\nYour server is live at `https://your-worker.workers.dev/mcp?api_id=\u003capi\u003e`.\n\n---\n\n## Register custom APIs\n\nHave an OpenAPI spec? Register it:\n\n```bash\ncurl -X POST https://your-server/register \\\n  -H \"Authorization: Bearer YOUR_ADMIN_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"apiId\": \"my-api\",\n    \"sourceUrl\": \"https://example.com/openapi.json\",\n    \"baseUrl\": \"https://api.example.com\",\n    \"allowedHosts\": [\"api.example.com\"],\n    \"auth\": { \"headerName\": \"authorization\", \"prefix\": \"Bearer \" }\n  }'\n```\n\nSupports JSON and YAML specs. Auto-resolves `$ref`s. Specs refresh weekly via cron.\n\n---\n\n## How auth works\n\nYour API keys never touch our servers. You pass credentials via the `x-api-key` header on each MCP request. The server injects them into the outbound API call and drops them immediately. Nothing is stored.\n\n```\nUser → x-api-key: sk_live_xxx → codemode server → Authorization: Bearer sk_live_xxx → Stripe API\n```\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────┐\n│  AI Agent (Claude, Cursor, Codex, OpenClaw) │\n│  Gets 2 tools: search() + execute()        │\n└──────────────┬──────────────────────────────┘\n               │ MCP (JSON-RPC)\n┌──────────────▼──────────────────────────────┐\n│  codemode server (Cloudflare Worker)        │\n│                                             │\n│  search(code)                               │\n│  → Sandbox (no network)                     │\n│  → Runs user code against preprocessed spec │\n│  → Returns matching endpoints/schemas       │\n│                                             │\n│  execute(code)                              │\n│  → Sandbox (restricted network)             │\n│  → Runs user code with api.request()        │\n│  → GlobalOutbound: host allowlist + auth    │\n│  → Returns API response                    │\n│                                             │\n│  Spec storage: R2 + KV                      │\n│  Weekly auto-refresh via cron               │\n└─────────────────────────────────────────────┘\n```\n\n---\n\n## Credits\n\nPowered by [`@cloudflare/codemode`](https://www.npmjs.com/package/@cloudflare/codemode) — the official Code Mode SDK. Built on [Cloudflare's Code Mode](https://blog.cloudflare.com/code-mode-mcp/) pattern and their [Agents SDK](https://github.com/cloudflare/agents) + [MCP server](https://github.com/cloudflare/mcp). The Cloudflare team did the hard work of figuring out this approach and open-sourcing it.\n\n---\n\n## License\n\nMIT. Do whatever you want with it.\n\n---\n\n### Made by\n\nMade by [Dee](https://deeflect.com) — AI Engineer + Product Designer in LA. Built codemode after watching too many MCP servers nuke a context window for no reason.\n\nThe Cloudflare team did the hard part. I just packaged the result with 56 APIs and a casual attitude. Star if it saved your context, open an issue if it didn't.\n\nNeed MCP work or AI integrations shipped fast? [dee.agency](https://dee.agency?utm_source=codemode\u0026utm_medium=readme).\n\n[deeflect.com](https://deeflect.com) · [Wikidata](https://www.wikidata.org/entity/Q138828544) · [LinkedIn](https://www.linkedin.com/in/dkargaev/) · [X](https://x.com/deeflectcom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeflect%2Funiversal-codemode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeflect%2Funiversal-codemode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeflect%2Funiversal-codemode/lists"}