{"_id":"@agentmug/mcp-bridge","_rev":"3-466265b6596e3ea11952ff18fe73a418","name":"@agentmug/mcp-bridge","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@agentmug/mcp-bridge","version":"0.1.0","keywords":["mcp","model-context-protocol","claude","cursor","continue","ai","agent","agentmug"],"license":"MIT","_id":"@agentmug/mcp-bridge@0.1.0","maintainers":[{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"}],"homepage":"https://agentmug.com","bugs":{"url":"https://github.com/dahshanlabs/agentmug/issues"},"bin":{"agentmug-mcp-bridge":"dist/index.mjs"},"dist":{"shasum":"3c7492425a51a17a551ccac47cad025d8f0cff67","tarball":"https://registry.npmjs.org/@agentmug/mcp-bridge/-/mcp-bridge-0.1.0.tgz","fileCount":4,"integrity":"sha512-jZefnsmjp9788CrclfiKcHNwRnma4hRgvqDCVvOyULnKI6RgAF/vV0hofMy2pRUoIzqxTzeCCQcMlShXzYds4g==","signatures":[{"sig":"MEYCIQC9pC0NLmlq1JvK7s2lvJJK66gzMSdCxdqlbsfNnf2JnAIhALYbsMIVwdq9UNZcG74i7Ki7NJD3YZdozX+aMmKQCH9t","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":725170},"type":"module","_from":"file:agentmug-mcp-bridge-0.1.0.tgz","engines":{"node":">=18"},"scripts":{"dev":"tsx src/index.ts","build":"node build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"},"_resolved":"C:\\Users\\HP\\AppData\\Local\\Temp\\2e8ff7adc10f49d6c61ec89e088c593e\\agentmug-mcp-bridge-0.1.0.tgz","_integrity":"sha512-jZefnsmjp9788CrclfiKcHNwRnma4hRgvqDCVvOyULnKI6RgAF/vV0hofMy2pRUoIzqxTzeCCQcMlShXzYds4g==","repository":{"url":"git+https://github.com/dahshanlabs/agentmug.git","type":"git","directory":"artifacts/mcp-bridge"},"_npmVersion":"11.8.0","description":"MCP server bridge for AgentMug agents — exposes any AgentMug agent as a Model Context Protocol tool for Claude Desktop, Cursor, Continue, Cline, and other MCP-compatible clients.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"0.27.3","typescript":"~5.9.2","@types/node":"^25.3.3"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bridge_0.1.0_1780330113869_0.33008175509908755","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentmug/mcp-bridge","version":"0.2.1","keywords":["mcp","model-context-protocol","claude","cursor","continue","ai","agent","agentmug"],"license":"MIT","_id":"@agentmug/mcp-bridge@0.2.1","maintainers":[{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"}],"homepage":"https://agentmug.com","bugs":{"url":"https://github.com/dahshanlabs/agentmug/issues"},"bin":{"agentmug-mcp-bridge":"dist/index.mjs"},"dist":{"shasum":"0f562af8b86c89b519179af4795437d7a1d5a2bf","tarball":"https://registry.npmjs.org/@agentmug/mcp-bridge/-/mcp-bridge-0.2.1.tgz","fileCount":4,"integrity":"sha512-I0qPJR165r0r6Zk5tdPFyLcpts4goTsO+pwZy1Sjldspauc3mU+Ep5EJAe6ddxzXdmfuw0mvjm/JMsxmsO3dbA==","signatures":[{"sig":"MEQCIBOESguQ3VfHzlqWIHyFrxuC8ookjN+CuTXQOqWox2YuAiBHMuESQj3sdp/F67+QcReJlMyo7tEpcz99amkkj4v8hg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":727807},"type":"module","_from":"file:agentmug-mcp-bridge-0.2.1.tgz","engines":{"node":">=18"},"scripts":{"dev":"tsx src/index.ts","build":"node build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"},"_resolved":"C:\\Users\\HP\\AppData\\Local\\Temp\\2a17eeabdbb59e48eaa8e04c4bdf5f0d\\agentmug-mcp-bridge-0.2.1.tgz","_integrity":"sha512-I0qPJR165r0r6Zk5tdPFyLcpts4goTsO+pwZy1Sjldspauc3mU+Ep5EJAe6ddxzXdmfuw0mvjm/JMsxmsO3dbA==","repository":{"url":"git+https://github.com/dahshanlabs/agentmug.git","type":"git","directory":"artifacts/mcp-bridge"},"_npmVersion":"11.8.0","description":"MCP server bridge for AgentMug agents — exposes any AgentMug agent as a Model Context Protocol tool for Claude Desktop, Cursor, Continue, Cline, and other MCP-compatible clients.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"0.27.3","typescript":"~5.9.2","@types/node":"^25.3.3"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bridge_0.2.1_1780484154588_0.4212580907855539","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@agentmug/mcp-bridge","version":"0.4.0","description":"Expose a hosted AgentMug worker as an MCP server for Claude Code, Cursor, Cline, Continue, and compatible hosts.","license":"Apache-2.0","publishConfig":{"access":"public","provenance":true},"type":"module","bin":{"agentmug-mcp-bridge":"dist/index.mjs"},"scripts":{"build":"node build.mjs","dev":"tsx src/index.ts","test":"node --import tsx --test src/index.test.ts","prepack":"node ../../scripts/prepare-package-license.mjs","postpack":"node ../../scripts/prepare-package-license.mjs --clean","typecheck":"tsc --noEmit"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4"},"devDependencies":{"@types/node":"catalog:","esbuild":"0.28.1","tsx":"catalog:","typescript":"~5.9.2"},"repository":{"type":"git","url":"git+https://github.com/dahshanlabs/agentmug-core.git","directory":"packages/mcp-bridge"},"homepage":"https://agentmug.com","bugs":{"url":"https://github.com/dahshanlabs/agentmug-core/issues"},"keywords":["mcp","model-context-protocol","claude","cursor","continue","ai","agent","agentmug","ai-worker","cline"],"engines":{"node":">=18"},"_id":"@agentmug/mcp-bridge@0.4.0","_integrity":"sha512-pkxw1rlLDFhuN9W0erwWXHlLBLJF29SWxD+N7RVrBxkQVIdEUOj51QF0ZixRQr+G0ICMUsgWnJU4zc8HFgptAA==","_resolved":"/home/runner/work/agentmug-core/agentmug-core/capsule/candidates/agentmug-mcp-bridge-0.4.0.tgz","_from":"file:capsule/candidates/agentmug-mcp-bridge-0.4.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.19.0","dist":{"integrity":"sha512-pkxw1rlLDFhuN9W0erwWXHlLBLJF29SWxD+N7RVrBxkQVIdEUOj51QF0ZixRQr+G0ICMUsgWnJU4zc8HFgptAA==","shasum":"1d840d1fc42519a7033f321721764c87c022a363","tarball":"https://registry.npmjs.org/@agentmug/mcp-bridge/-/mcp-bridge-0.4.0.tgz","fileCount":6,"unpackedSize":603851,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agentmug%2fmcp-bridge@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9OiFHMwK/znAiqBr9PcKTgHKlqdZ8cETSdGl1ObYXPwIhAJlxkhu2Iq7ZCrw6fgfc4Rcxwruyjmj2ZC7ZePXuyq35"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:106c7182-e8c7-4d26-b366-5ffa7dac8df2"}},"directories":{},"maintainers":[{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-bridge_0.4.0_1785930428252_0.8826938927160459"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-01T16:08:33.733Z","modified":"2026-08-05T11:47:08.797Z","0.1.0":"2026-06-01T16:08:34.125Z","0.2.1":"2026-06-03T10:55:54.715Z","0.4.0":"2026-08-05T11:47:08.435Z"},"bugs":{"url":"https://github.com/dahshanlabs/agentmug-core/issues"},"license":"Apache-2.0","homepage":"https://agentmug.com","keywords":["mcp","model-context-protocol","claude","cursor","continue","ai","agent","agentmug","ai-worker","cline"],"repository":{"type":"git","url":"git+https://github.com/dahshanlabs/agentmug-core.git","directory":"packages/mcp-bridge"},"description":"Expose a hosted AgentMug worker as an MCP server for Claude Code, Cursor, Cline, Continue, and compatible hosts.","maintainers":[{"name":"dahshanlabs","email":"abdullah@dahshanlabs.com"}],"readme":"# @agentmug/mcp-bridge\n\nExpose any [AgentMug](https://agentmug.com) agent as a Model Context Protocol (MCP) tool. Works with Claude Desktop, Claude Code, Cursor, Continue, Cline, and any other MCP-compatible client.\n\n## Why\n\nYou designed an agent on AgentMug (with its OAuth-connected Gmail / Slack / GitHub / Notion / Linear access, its memory, its prompt-engineered system message). Now you want to call that agent from inside Claude Code while you're working on a different task.\n\nThis bridge makes the agent show up as a tool in your MCP client. No new code paths, no second OAuth, no copying credentials around — the agent runs server-side on AgentMug with its existing setup, and the result comes back to your client.\n\n## Install\n\nIn your MCP client config (example: Claude Desktop / Claude Code at `~/.claude/settings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"email-assistant\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@agentmug/mcp-bridge\",\n        \"https://agentmug.com/api/external/agents/<YOUR_AGENT_ID>\"\n      ],\n      \"env\": {\n        \"AGENTMUG_API_KEY\": \"am_agent_...\"\n      }\n    }\n  }\n}\n```\n\nGenerate the agent ID and API key from your AgentMug agent's **Deploy → External access** tab.\n\n## Usage\n\nOnce configured, the agent appears as a callable tool in your MCP client. In Claude Code:\n\n```\n> use email-assistant to summarize my unread emails from this week\n```\n\nThe bridge forwards the call to AgentMug, the agent runs there (with its Gmail OAuth), and the answer streams back into your conversation.\n\n## Config\n\n- `AGENTMUG_API_KEY` (required) — per-agent API key from the Deploy tab.\n- `AGENTMUG_HOST` (optional) — if you pass only an agent ID rather than a full URL, this is the host the bridge prepends. Defaults to `https://agentmug.com`.\n- `AGENTMUG_ALLOW_INSECURE_LOCALHOST=1` (local development only) — permits an\n  `http://localhost/...` manifest. Remote manifests are HTTPS-only.\n\nThe first positional arg can be either:\n\n- A full manifest URL: `https://agentmug.com/api/external/agents/<id>`\n- A bare agent ID: `<id>` (uses `AGENTMUG_HOST` to build the URL)\n\nAPI keys belong in the environment, never in the URL or command arguments. The\nbridge rejects credentials, query strings, fragments, redirects, non-AgentMug\nmanifest paths, and insecure remote HTTP before sending the key.\n\n## Grounded sources and run receipts\n\nAn agent can declare private source requirements such as `knowledge workbook`,\n`working folder`, or `KLYPIX brain snapshot`. The bridge exposes the secret-free\nrequirement/readiness contract as an MCP resource:\n\n```text\nagentmug://agents/<id>/source-contract\n```\n\nThe resource tells the MCP host which roles are ready, missing, or stale. It\nnever contains the bound filename, local/provider path, account id, cursor, or\nsource content. If a required source is missing, AgentMug refuses the run rather\nthan quietly answering ungrounded.\n\nFor a web-attached `.klypix`, AgentMug uses a complete correction-aware\ncurrent-card projection of the saved snapshot as grounding; Archive history is\nexcluded and incomplete projections fail closed. **Grounding only — not\ncoordination.** The MCP bridge exposes readiness and invokes the AgentMug\nagent; it does **not** turn that snapshot into a live KLYPIX MCP session or\njoin `brain_sync` coordination, peer presence, messages, or file-overlap\ndetection.\n\nFor a KLYPIX snapshot, `stale` means the snapshot/file revision drifted from\nits verification pin, or verification expired, before the model was called. It\ndoes not mean that a card is old, and it is not derived from `brain_doctor`.\nSaving the original brain requires attaching and verifying a new snapshot.\n\nAfter a call, the bridge also exposes:\n\n```text\nagentmug://agents/<id>/latest-run-receipt\n```\n\nThat receipt summarizes evidence reads, writes, approvals, and evaluations for\nthe run. A KLYPIX read includes the brain revision, its trust label\n(`owner-client` in web, `host-computed` in local runtimes), the independently\nhashed evidence projection, consumed card ids, and actual read timestamp. The\ntool result includes the same receipt as structured MCP content so automation\ncan inspect it without scraping prose.\n\n## Reliability checks\n\nWhen the hosted worker has protected regression cases, the bridge exposes a\nsecond tool named `<worker_tool>_safe_check` and this resource:\n\n```text\nagentmug://agents/<id>/reliability\n```\n\nThe check runs the same owner-private suite used in AgentMug. It uses safe\nsimulation, spends model tokens, and never calls live connected tools. MCP\nreceives only scores, status, case counts, and timing. Regression inputs,\nexpected outputs, assertions, and detailed trajectories remain private in\nAgentMug.\n\nThis cloud check evaluates the hosted worker version. It does not claim to\ntest a locally modified `.agent` file. Local hosts report the portable checks\nthat actually ran in that host's run receipt.\n\n## How it works\n\n1. On startup, the bridge fetches `<manifest-url>` with the API key. AgentMug returns the agent's name, description, input schema, and a private-data-free source readiness summary.\n2. The bridge starts an MCP server on stdio and registers the agent as one tool plus inspectable source/receipt resources.\n3. When the MCP client calls the tool, the bridge `POST`s to `<manifest-url>/invoke` with the user's message.\n4. AgentMug runs the agent server-side (using its OAuth tokens, its memory, its full tool catalog) and returns the result.\n5. The bridge wraps the result as MCP text content and hands it back to the client.\n\nAll AgentMug-side complexity stays behind the HTTP API. This package is intentionally minimal (~250 lines) so it stays easy to audit.\n\n## License\n\nApache-2.0. Existing versions published under MIT remain MIT.\n","readmeFilename":"README.md"}