mcpField
A
agentguard

agentguard

Local
github.comSecurity1Updated 20w ago

About agentguard

agentguard is an MCP server for checking URLs against a declarative network-egress policy without making requests. It helps MCP clients review individual or batch URL decisions and catch common policy-specification errors.

Key features

  1. 01Check a URL against a policy
  2. 02Check URL batches with a summary
  3. 03Validate policy specifications
  4. 04Flag broad wildcards and malformed hosts

Use cases

  1. 01Review URLs before an agent fetches them
  2. 02Audit a batch of candidate URLs
  3. 03Find mistakes in an egress policy

MCP support

Exposes URL-checking and policy-validation tools to MCP clients. It reports decisions but does not block or perform network requests.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mukundakatta-agentguard": {
"command": "npx",
"args": [
"-y",
"@mukundakatta/agentguard-mcp"
]
}
}
}
Run commandnpx -y @mukundakatta/agentguard-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mukundakatta/agentguard-mcp0.1.0

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
urlstringYesURL to check.
methodstringNoHTTP method (default GET).
policyobjectYesA simplified network policy. Use { allow: ["api.openai.com", "*.example.com"] }. Optional: deny: string[], methods: string[].
policy.denyarrayNoHost patterns to deny. Wins over allow.
policy.allowarrayNoHost patterns to allow. Supports exact and *.suffix wildcards.
policy.methodsarrayNoHTTP methods to permit (e.g. ["GET", "POST"]). Default any.

Details

From the project README

agentguard-mcp

MCP server for @mukundakatta/agentguard. Lets Claude Desktop, Cursor, Cline, Windsurf, Zed, or any other MCP client check whether a URL is allowed under a network-egress policy before any fetch.

npx -y @mukundakatta/agentguard-mcp

Three tools:

  • check_url — single URL check: returns { allowed, reason } without making any actual request.
  • check_urls_batch — batch check with per-URL decisions plus a summary.
  • validate_policy — sanity-check a policy spec for empty allowlists, overly broad * wildcards, and malformed host patterns.

Add to your client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "agentguard": {
      "command": "npx",
      "args": ["-y", "@mukundakatta/agentguard-mcp"]
    }
  }
}

Same shape for Cursor (~/.cursor/mcp.json), Cline, Windsurf, Zed.

Tool examples

check_url:

{
  "url": "https://api.openai.com/v1/chat",
  "policy": { "allow": ["api.openai.com", "*.anthropic.com"] }
}

Returns:

{ "allowed": true, "reason": "matched_allowlist", "detail": null }

check_urls_batch:

{
  "urls": [
    "https://api.openai.com/v1/chat",
    "https://evil.example.com/leak"
  ],
  "policy": { "allow": ["api.openai.com"] }
}

Returns:

{
  "results": [
    { "url": "https://api.openai.com/v1/chat", "allowed": true, ... },
    { "url": "https://evil.example.com/leak", "allowed": false, "reason": "not_in_allowlist", ... }
  ],
  "summary": { "total": 2, "allowed_count": 1, "denied_count": 1 }
}

validate_policy:

{ "policy": { "allow": ["*", "https://api.example.com", "api.example.com/v1"] } }

Returns issues for the * wildcard, the scheme prefix, and the path suffix — common mistakes when first writing a policy.

Why a separate MCP server

@mukundakatta/agentguard is a zero-dependency JavaScript library. This MCP server makes its decision engine accessible from any MCP-aware AI assistant: ask Claude "does my agent's tool list pass this firewall?" or "which of these 50 URLs would my policy block?" and the assistant calls these tools directly.

Note: this MCP server only checks URLs — it does not actually wrap fetch or block real requests. For runtime enforcement, use @mukundakatta/agentguard directly inside your Node process.

Sibling MCP servers

Part of the agent-stack series:

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.