@agentguard47/mcp-server
Advanced tools
+54
| # AgentGuard MCP Server | ||
| MCP (Model Context Protocol) server that connects AI coding agents to the AgentGuard Read API. Lets agents query their own traces, alerts, costs, and budget status. | ||
| ## Tools | ||
| | Tool | Description | | ||
| |------|-------------| | ||
| | `query_traces` | Search recent traces, filter by service/time range | | ||
| | `get_trace` | Get full event tree for a specific trace ID | | ||
| | `get_alerts` | Get guard alerts (loops, budget exceeded, errors) | | ||
| | `get_usage` | Check event quota usage and plan limits | | ||
| | `get_costs` | Get cost breakdown by model for the current month | | ||
| | `check_budget` | Quick pass/fail budget health check | | ||
| ## Configuration | ||
| | Variable | Required | Description | | ||
| |----------|----------|-------------| | ||
| | `AGENTGUARD_API_KEY` | Yes | Bearer token for the Read API (`ag_...`) | | ||
| | `AGENTGUARD_URL` | No | API base URL (defaults to production) | | ||
| ## Setup for Claude Code | ||
| Add to your Claude Code MCP config: | ||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "agentguard": { | ||
| "command": "node", | ||
| "args": ["/path/to/agent47/mcp-server/dist/index.js"], | ||
| "env": { | ||
| "AGENTGUARD_API_KEY": "ag_your_key_here" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| ## Build & Run | ||
| ```bash | ||
| npm ci # Install dependencies | ||
| npm run build # Compile TypeScript | ||
| npm start # Run server (stdio transport) | ||
| npm run dev # Watch mode for development | ||
| ``` | ||
| ## Architecture | ||
| - `src/index.ts` — Server entry point, tool registration (stdio transport) | ||
| - `src/client.ts` — HTTP client wrapping `/api/v1/` endpoints | ||
| - `src/tools.ts` — 6 MCP tool definitions and handlers |
+1
-1
@@ -1,2 +0,2 @@ | ||
| const DEFAULT_URL = "https://agentguard.dev"; | ||
| const DEFAULT_URL = "https://app.agentguard47.com"; | ||
| export class AgentGuardClient { | ||
@@ -3,0 +3,0 @@ baseUrl; |
+1
-1
| MIT License | ||
| Copyright (c) 2026 AgentGuard | ||
| Copyright (c) 2026 BMD PAT LLC | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
+5
-3
| { | ||
| "name": "@agentguard47/mcp-server", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "description": "MCP server for AgentGuard — query traces, alerts, usage, and costs from AI coding agents", | ||
@@ -16,6 +16,8 @@ "license": "MIT", | ||
| "dev": "tsc --watch", | ||
| "start": "node dist/index.js" | ||
| "start": "node dist/index.js", | ||
| "prepublishOnly": "npm run build" | ||
| }, | ||
| "dependencies": { | ||
| "@modelcontextprotocol/sdk": "^1.0.0" | ||
| "@modelcontextprotocol/sdk": "^1.0.0", | ||
| "zod": "^3.22.0" | ||
| }, | ||
@@ -22,0 +24,0 @@ "devDependencies": { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
13176
14.17%9
12.5%1
-50%55
Infinity%2
100%+ Added
+ Added
- Removed