New:Socket for Asana Is Now Available.Learn more
Get Started

@agentguard47/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentguard47/mcp-server - npm Package Compare versions

Comparing version
0.1.0
to
0.2.0
+54
README.md
# 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;

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

{
"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": {