npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trustkit/mcp-guard

v0.1.0

Published

AI execution firewall for MCP-based tools

Readme

TrustKit MCP Guard

CI npm Docker License

Table of Contents

AI execution firewall for MCP-based tools.

MCP Guard is a proxy that sits between AI clients and MCP servers, enforcing security policies on tool calls. It validates, controls, and audits every tool execution.

Features

  • Policy engine — allowlist/denylist rules with glob patterns
  • Default deny — block everything not explicitly allowed
  • Audit logging — structured JSON events for every decision
  • Read-only mode — restrict tools to read operations only

Running

From npm

No build step required. Run directly with npx:

npx @trustkit/mcp-guard --config guard.yaml

Or install globally:

npm install -g @trustkit/mcp-guard
mcp-guard --config guard.yaml

Docker (production)

Use the pre-built image from GitHub Container Registry:

docker run --rm -p 31415:31415 \
  -v ./guard-config:/etc/mcp-guard:ro \
  -v ./guard-data:/data \
  -v ./my-project:/data/project:ro \
  ghcr.io/trustkithq/mcp-guard:latest \
  --config /etc/mcp-guard/guard.yaml

Or use the production compose file:

docker compose -f docker-compose.prod.yaml up

The compose file mounts three volumes:

| Volume | Container path | Purpose | |---|---|---| | ./guard-config/ | /etc/mcp-guard/ | Guard configuration (read-only) | | ./guard-data/ | /data/ | Audit database and persistent state | | ./my-project/ | /data/project/ | Your project files (read-only) |

Edit docker-compose.prod.yaml to adjust paths for your setup.

From source (development)

git clone https://github.com/trustkithq/trustkit-mcp-guard.git
cd trustkit-mcp-guard
pnpm install
pnpm build
node dist/cli.js --config examples/basic-config.yaml

A development compose file is included for building from source:

docker compose build
docker compose up mcp-guard-http    # HTTP mode
docker compose run --rm mcp-guard   # stdio mode

Client Configuration

HTTP mode

The guard listens on a port (default 31415) and AI clients connect via URL. Use this when you want a long-running guard process, persistent audit data, or read-only project access.

Claude Code (~/.claude/settings.json):

{
  "mcpServers": {
    "mcp-guard": {
      "type": "url",
      "url": "http://localhost:31415/mcp"
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "mcp-guard": {
      "url": "http://localhost:31415/mcp"
    }
  }
}

Codex:

codex --mcp-server-uri http://localhost:31415/mcp

Stdio mode

The AI client spawns the guard as a child process. No port to manage, no Docker required.

Claude Code (~/.claude/settings.json):

{
  "mcpServers": {
    "mcp-guard": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@trustkit/mcp-guard", "--config", "guard.yaml"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "mcp-guard": {
      "command": "npx",
      "args": ["-y", "@trustkit/mcp-guard", "--config", "guard.yaml"]
    }
  }
}

Codex:

codex --mcp-server "npx -y @trustkit/mcp-guard --config guard.yaml"

Configuration

See examples/basic-config.yaml for a complete example with stdio transport, and examples/http-config.yaml for HTTP transport.

License

This project is licensed under Apache 2.0.