{"id":50504064,"url":"https://github.com/jpoindexter/local-mcp-proxy","last_synced_at":"2026-06-02T14:01:50.399Z","repository":{"id":361778550,"uuid":"1255782507","full_name":"jpoindexter/local-mcp-proxy","owner":"jpoindexter","description":"Local-only MCP proxy for sharing Mobbin and Refero across local AI clients.","archived":false,"fork":false,"pushed_at":"2026-06-01T07:16:16.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T09:12:56.292Z","etag":null,"topics":["ai-tools","cache","claude-code","developer-tools","express","local-first","mcp","mcp-client","mcp-proxy","mcp-server","mobbin","model-context-protocol","nodejs","oauth","openai-codex","proxy-server","refero","streamable-http","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpoindexter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-06-01T07:00:26.000Z","updated_at":"2026-06-01T07:15:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jpoindexter/local-mcp-proxy","commit_stats":null,"previous_names":["jpoindexter/local-mcp-proxy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jpoindexter/local-mcp-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpoindexter%2Flocal-mcp-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpoindexter%2Flocal-mcp-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpoindexter%2Flocal-mcp-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpoindexter%2Flocal-mcp-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpoindexter","download_url":"https://codeload.github.com/jpoindexter/local-mcp-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpoindexter%2Flocal-mcp-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33824902,"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-02T02:00:07.132Z","response_time":109,"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-tools","cache","claude-code","developer-tools","express","local-first","mcp","mcp-client","mcp-proxy","mcp-server","mobbin","model-context-protocol","nodejs","oauth","openai-codex","proxy-server","refero","streamable-http","typescript"],"created_at":"2026-06-02T14:01:48.095Z","updated_at":"2026-06-02T14:01:50.394Z","avatar_url":"https://github.com/jpoindexter.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local MCP Proxy\n\nLocal-only MCP proxy for sharing Mobbin and Refero across Claude Code, Codex, Claude Desktop, Hermes, or any other local MCP client.\n\nThe main reason this exists is Mobbin OAuth/session contention: Mobbin should see exactly one upstream client. Your local tools connect to this proxy, and this proxy keeps one queued upstream Mobbin session.\n\n## Endpoints\n\n- `http://127.0.0.1:8787/mobbin/mcp`\n- `http://127.0.0.1:8787/refero/mcp`\n- `http://127.0.0.1:8787/health`\n\nThe server refuses non-local bind hosts unless you edit the code. Do not expose this beyond localhost.\n\n## Security\n\n- Keep `mcp-proxy.config.json` and `.env` local. Both files are ignored by Git.\n- Store Refero and Mobbin credentials in environment variables, not in committed config.\n- Keep the proxy bound to `127.0.0.1`. The default config intentionally avoids non-local access.\n- Runtime logs, cache files, pids, build output, and `node_modules` are ignored.\n\n## Setup\n\n```sh\nnpm install\ncp mcp-proxy.config.example.json mcp-proxy.config.json\ncp .env.example .env\n```\n\nSet your Refero token in the shell that runs the proxy:\n\n```sh\nexport REFERO_MCP_TOKEN=\"your-refero-token\"\n```\n\nYou can also use a full header:\n\n```sh\nexport REFERO_AUTHORIZATION=\"Bearer your-refero-token\"\n```\n\n## Mobbin Login\n\nMobbin defaults to `mcp-remote`, launched once by the proxy:\n\n```json\n\"mobbin\": {\n  \"upstreamUrl\": \"https://api.mobbin.com/mcp\",\n  \"mode\": \"mcp-remote\"\n}\n```\n\nOn the first Mobbin tool call, `mcp-remote` may open a browser or print an OAuth URL. Complete that login once. After Claude, Codex, and Hermes are changed to localhost, they should stop logging into Mobbin directly.\n\nThis is the important part: do not keep any client pointed directly at `https://api.mobbin.com/mcp`, or it can still steal the upstream Mobbin session.\n\n## Run\n\n```sh\nnpm run dev\n```\n\nOr build and run:\n\n```sh\nnpm run build\nnpm start\n```\n\nCheck health:\n\n```sh\ncurl http://127.0.0.1:8787/health\n```\n\n## Config\n\nConfig is loaded from `mcp-proxy.config.json`, then environment variables override operational values.\n\nUseful env vars:\n\n- `MCP_PROXY_PORT`, default `8787`\n- `MCP_PROXY_HOST`, default `127.0.0.1`\n- `MCP_PROXY_CACHE_DIR`, default `.mcp-proxy-cache`\n- `MCP_PROXY_SEARCH_TTL_SECONDS`, default `21600`\n- `MCP_PROXY_DETAIL_TTL_SECONDS`, default `86400`\n- `MCP_PROXY_DEBUG`, default `false`\n- `REFERO_TOKEN_ENV_VAR`, default `REFERO_MCP_TOKEN`\n- `REFERO_MCP_TOKEN` or `REFERO_AUTHORIZATION`\n- `MOBBIN_UPSTREAM_MODE`, default `mcp-remote`\n- `MOBBIN_AUTHORIZATION`, optional direct header mode\n\n## Proposed Codex Config\n\nDo not apply until the proxy is running and Mobbin login works through the proxy.\n\nIn `~/.codex/config.toml`, replace the current upstream entries with:\n\n```toml\n[mcp_servers.refero]\nurl = \"http://127.0.0.1:8787/refero/mcp\"\n\n[mcp_servers.mobbin]\nurl = \"http://127.0.0.1:8787/mobbin/mcp\"\n```\n\nRemove the direct Refero `http_headers` block from Codex after moving the token to the proxy environment.\n\n## Proposed Claude Code Config\n\nAfter the proxy is running:\n\n```sh\nclaude mcp remove refero -s user\nclaude mcp add refero --transport http http://127.0.0.1:8787/refero/mcp -s user\n\nclaude mcp remove mobbin -s user\nclaude mcp add mobbin --transport http http://127.0.0.1:8787/mobbin/mcp -s user\n```\n\n## Proposed Claude Desktop Config\n\nClaude Desktop currently did not have Mobbin or Refero configured here on this machine. If you add them, use:\n\n```json\n{\n  \"mcpServers\": {\n    \"mobbin\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-remote\", \"http://127.0.0.1:8787/mobbin/mcp\"]\n    },\n    \"refero\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-remote\", \"http://127.0.0.1:8787/refero/mcp\"]\n    }\n  }\n}\n```\n\nIf Claude Desktop supports HTTP MCP directly in your installed version, use the same localhost URLs directly instead of `mcp-remote`.\n\n## Proposed Hermes Config\n\nPoint Hermes at the same local HTTP endpoints:\n\n```json\n{\n  \"mobbin\": {\n    \"type\": \"http\",\n    \"url\": \"http://127.0.0.1:8787/mobbin/mcp\"\n  },\n  \"refero\": {\n    \"type\": \"http\",\n    \"url\": \"http://127.0.0.1:8787/refero/mcp\"\n  }\n}\n```\n\nThe exact file depends on your Hermes install; the key requirement is that Mobbin must not point directly at `https://api.mobbin.com/mcp`.\n\n## Troubleshooting\n\n- Mobbin still disconnects Codex or Claude: one of the clients is still pointed directly at upstream Mobbin. Check every MCP config for `https://api.mobbin.com/mcp`.\n- Mobbin auth required: keep the proxy running, call a Mobbin tool once, and complete the `mcp-remote` browser login.\n- Refero auth required: set `REFERO_MCP_TOKEN` or `REFERO_AUTHORIZATION` in the proxy environment, then restart the proxy.\n- Port conflict: set `MCP_PROXY_PORT=8788` and update local client URLs.\n- Need more logs: set `MCP_PROXY_DEBUG=true`. Logs are JSON and redact token-like fields.\n- Stale design results: delete `.mcp-proxy-cache` or lower the TTL env vars.\n\n## Test Plan\n\n```sh\nnpm test\nnpm run typecheck\nnpm run build\ncurl http://127.0.0.1:8787/health\n```\n\nManual verification:\n\n1. Start the proxy.\n2. Point Claude Code to `http://127.0.0.1:8787/mobbin/mcp`.\n3. Point Codex to `http://127.0.0.1:8787/mobbin/mcp`.\n4. Call a Mobbin search from both clients.\n5. Confirm `/health` shows one Mobbin provider with queue depth returning to `0`.\n6. Confirm neither client is configured with the direct Mobbin upstream URL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpoindexter%2Flocal-mcp-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpoindexter%2Flocal-mcp-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpoindexter%2Flocal-mcp-proxy/lists"}