{"_id":"@agentguard47/mcp-server","_rev":"4-747fb725ac05892ea9c68de86a6c3ce8","name":"@agentguard47/mcp-server","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@agentguard47/mcp-server","version":"0.1.0","license":"MIT","_id":"@agentguard47/mcp-server@0.1.0","maintainers":[{"name":"pat9000","email":"patrickhughes013@gmail.com"}],"bin":{"agentguard-mcp":"dist/index.js"},"dist":{"shasum":"3156a9c93bb57c63f14a3e1f68ae200967ac0235","tarball":"https://registry.npmjs.org/@agentguard47/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":8,"integrity":"sha512-gI3NzuJIrb3EFUzPjLu/GMvwcKGmkndPhiRSs1TcTmu0Xl8zDJmCk9Z0/6WvvhWj8pbh1EarHNJPbOjVWRyRQw==","signatures":[{"sig":"MEUCIEE/PHpjI5JNrvIYHvQhocKl8XOlI2DNlc3A2P2WtbstAiEA4GDUYuRZimWWB8hm/HVcphxF42Hm8n2JN/bPg1nx6m0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11541},"type":"module","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"pat9000","email":"patrickhughes013@gmail.com"},"_npmVersion":"11.6.0","description":"MCP server for AgentGuard — query traces, alerts, usage, and costs from AI coding agents","directories":{},"_nodeVersion":"24.9.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^25.2.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.1.0_1770536014337_0.13255931788684805","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agentguard47/mcp-server","version":"0.2.0","license":"MIT","_id":"@agentguard47/mcp-server@0.2.0","maintainers":[{"name":"pat9000","email":"patrickhughes013@gmail.com"}],"bin":{"agentguard-mcp":"dist/index.js"},"dist":{"shasum":"7b8ba64d9eb0ec91c5d8c5dc63fa63893f25d8f7","tarball":"https://registry.npmjs.org/@agentguard47/mcp-server/-/mcp-server-0.2.0.tgz","fileCount":9,"integrity":"sha512-m9lun9+RMGKJcRztQQ0MX4edeW9wh/5ABC1maEmg5QS9WJGOhHrp8vTTKPNZOPKcphMKiwSDLzeHcs/Unx2sJg==","signatures":[{"sig":"MEUCIQCFpuVZDHNUpSKFdixpnlQVEt+Q3tMzckQE1ywv3itgxwIgVM14HE1PxJV4mXHJNzZpAHN4V40ClmWOvlUEqxV0e0A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13176},"type":"module","gitHead":"b842981d6022ae847439ef994d499b80df1b841f","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"pat9000","email":"patrickhughes013@gmail.com"},"_npmVersion":"11.6.0","description":"MCP server for AgentGuard — query traces, alerts, usage, and costs from AI coding agents","directories":{},"_nodeVersion":"24.9.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^25.2.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.2.0_1771114201503_0.8604401771928736","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentguard47/mcp-server","version":"0.2.1","keywords":["mcp","model-context-protocol","agentguard","coding-agents","agent-safety","runtime-guardrails"],"license":"MIT","_id":"@agentguard47/mcp-server@0.2.1","maintainers":[{"name":"pat9000","email":"patrickhughes013@gmail.com"}],"homepage":"https://github.com/bmdhodl/agent47/tree/main/mcp-server","bugs":{"url":"https://github.com/bmdhodl/agent47/issues"},"bin":{"agentguard-mcp":"dist/index.js"},"dist":{"shasum":"270bc088599508bd42150f5a4f4dfef64267a78e","tarball":"https://registry.npmjs.org/@agentguard47/mcp-server/-/mcp-server-0.2.1.tgz","fileCount":9,"integrity":"sha512-tJzzxiNY6qNuuAd0ci+wa6PrOwyTY7C7hUPfCSBs0v/IKnXZd5u7bcPs6WDZXJHuY0KsPG2vDr9SMJHcKUi5TA==","signatures":[{"sig":"MEUCIQDc5ofkpFcnTsHbeSX0er1iewl8H1oiicugbZ6/UKP2kgIgLpFJhrjke3L9XhVrGP+5kVt4YNiy2Y3Je86hnrnLS1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14482},"type":"module","gitHead":"ce80380987fe3b1830ffb55b8e57b82a348f76c0","mcpName":"io.github.bmdhodl/agentguard47","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"pat9000","email":"patrickhughes013@gmail.com"},"repository":{"url":"git+https://github.com/bmdhodl/agent47.git","type":"git","directory":"mcp-server"},"_npmVersion":"10.9.2","description":"MCP server for coding-agent traces, alerts, costs, usage, and budget health","directories":{},"_nodeVersion":"22.14.0","dependencies":{"zod":"^3.22.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^25.2.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.2.1_1775146982392_0.42799953721159034","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agentguard47/mcp-server","version":"0.2.2","description":"Read-only MCP server for coding-agent traces, decision events, alerts, costs, usage, and budget health","mcpName":"io.github.bmdhodl/agentguard47","license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/bmdhodl/agent47.git","directory":"mcp-server"},"homepage":"https://github.com/bmdhodl/agent47/tree/main/mcp-server","bugs":{"url":"https://github.com/bmdhodl/agent47/issues"},"keywords":["mcp","model-context-protocol","agentguard","coding-agents","agent-safety","runtime-guardrails","budget-health","incident-context"],"bin":{"agentguard-mcp":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","test":"npm run build && node --test dist/__tests__/*.test.js","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","zod":"^3.22.0"},"devDependencies":{"@types/node":"^25.2.2","typescript":"^5.0.0"},"_id":"@agentguard47/mcp-server@0.2.2","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ds6U5nJqu1FK8eL2IyOXPsbVXykapapRg3Mf1MviIMxFuBqjk93Or6w8OttSQGq3A0N2UVbOFQiDiSV45VtvLA==","shasum":"3362b9e5b4289c41a3fece209c8d7427fc939ea9","tarball":"https://registry.npmjs.org/@agentguard47/mcp-server/-/mcp-server-0.2.2.tgz","fileCount":19,"unpackedSize":26093,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDwHIBIVs8CL0Eqv9FSD4ICxOKKe8uT9j5BliSCwKmPiAIgWGX7NrK4SPkjJMj0yD7oA/6maLmqfk39bwmpLrJbAEo="}]},"_npmUser":{"name":"pat9000","email":"patrickhughes013@gmail.com"},"directories":{},"maintainers":[{"name":"pat9000","email":"patrickhughes013@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.2.2_1777923529287_0.6676280177923957"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-08T07:33:34.246Z","modified":"2026-05-04T19:38:49.604Z","0.1.0":"2026-02-08T07:33:34.488Z","0.2.0":"2026-02-15T00:10:01.653Z","0.2.1":"2026-04-02T16:23:02.520Z","0.2.2":"2026-05-04T19:38:49.493Z"},"bugs":{"url":"https://github.com/bmdhodl/agent47/issues"},"license":"MIT","homepage":"https://github.com/bmdhodl/agent47/tree/main/mcp-server","keywords":["mcp","model-context-protocol","agentguard","coding-agents","agent-safety","runtime-guardrails","budget-health","incident-context"],"repository":{"type":"git","url":"git+https://github.com/bmdhodl/agent47.git","directory":"mcp-server"},"description":"Read-only MCP server for coding-agent traces, decision events, alerts, costs, usage, and budget health","maintainers":[{"name":"pat9000","email":"patrickhughes013@gmail.com"}],"readme":"# AgentGuard MCP Server\r\n\r\nRead-only MCP (Model Context Protocol) server that connects coding agents to\r\nthe AgentGuard Read API. Use it after the local SDK is already in place and\r\nyou want Codex, Claude Code, Cursor, or another MCP client to inspect traces,\r\ndecision events, alerts, usage, costs, and budget health.\r\n\r\nThe boundary is deliberate:\r\n- The SDK proves runtime enforcement locally\r\n- The MCP server gives coding agents a narrow read surface over retained data\r\n- The hosted dashboard stays the operational control plane\r\n\r\n## Published Package\r\n\r\n```bash\r\nnpx -y @agentguard47/mcp-server\r\n```\r\n\r\n## Tools\r\n\r\n| Tool | Description |\r\n|------|-------------|\r\n| `query_traces` | Search recent traces, filter by service/time range |\r\n| `get_trace` | Get the full event tree for a specific trace ID |\r\n| `get_trace_decisions` | Extract normalized `decision.*` events from a specific trace ID |\r\n| `get_alerts` | Get guard alerts such as loops, budget exceeded, and errors |\r\n| `get_usage` | Check event quota usage and plan limits |\r\n| `get_costs` | Get cost breakdown by model for the current month |\r\n| `check_budget` | Quick pass/fail budget health check |\r\n\r\n## Configuration\r\n\r\n| Variable | Required | Description |\r\n|----------|----------|-------------|\r\n| `AGENTGUARD_API_KEY` | Yes | Bearer token for the Read API (`ag_...`) |\r\n| `AGENTGUARD_URL` | No | API base URL (defaults to production) |\r\n\r\n## Setup for Claude Code\r\n\r\nAdd to your Claude Code MCP config:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"agentguard\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@agentguard47/mcp-server\"],\r\n      \"env\": {\r\n        \"AGENTGUARD_API_KEY\": \"ag_your_key_here\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nAny other MCP-compatible client that can launch an npm package over stdio can\r\nuse the same command.\r\n\r\n## Local Build & Run\r\n\r\n```bash\r\nnpm ci\r\nnpm run build\r\nnpm test\r\nnpm start\r\n```\r\n\r\n## Glama / Smithery Build Config\r\n\r\nThis repo now includes the files downstream registries expect when they build\r\nor inspect the MCP server from GitHub:\r\n\r\n- [`Dockerfile`](Dockerfile) - container build for the stdio server\r\n- [`smithery.yaml`](smithery.yaml) - config schema for `AGENTGUARD_API_KEY`\r\n  and the optional base URL\r\n\r\nThat keeps the public repo aligned with the published npm package and makes the\r\nGlama / Smithery import path explicit instead of implicit.\r\n\r\nThe repo root also carries matching shim files for directories that only scan\r\nthe default branch root:\r\n\r\n- [`../Dockerfile`](../Dockerfile)\r\n- [`../smithery.yaml`](../smithery.yaml)\r\n\r\nThose root files delegate straight to `mcp-server/` and should stay aligned\r\nwith the package-local versions here.\r\n\r\n## Registry Readiness\r\n\r\nThis repo now includes official MCP registry metadata in\r\n[`server.json`](server.json). The npm package is already public, and the Glama /\r\nSmithery config now lives next to the source, so the remaining registry work is\r\nmetadata publication:\r\n\r\n```bash\r\nmcp-publisher login github\r\nmcp-publisher publish\r\n```\r\n\r\nAfter that, verify the server is searchable from the MCP Registry API and then\r\nsubmit it to downstream directories like Glama and `awesome-mcp-servers`.\r\n\r\n## Architecture\r\n\r\n- `src/index.ts` - Server entry point, tool registration (stdio transport)\r\n- `src/client.ts` - HTTP client wrapping `/api/v1/` endpoints\r\n- `src/decisions.ts` - Decision-event extraction helpers for hosted traces\r\n- `src/schema.ts` - JSON Schema to Zod shape builder used during tool registration\r\n- `src/tools.ts` - 7 MCP tool definitions and handlers\r\n","readmeFilename":"README.md"}