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

mcp-filter

v0.6.0

Published

MCP server proxy to filter tools, resources, and prompts from upstream MCP servers

Readme

mcp-filter

npm version License: MIT

Filter tools, resources, and prompts from MCP servers. Control what AI agents can access.

Quick Start

Add to your MCP client config (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "playwright-safe": {
      "command": "npx",
      "args": [
        "mcp-filter",
        "--exclude", "browser_close",
        "--exclude", "browser_evaluate",
        "--include", "browser_*",
        "--",
        "npx", "@playwright/mcp@latest"
      ]
    }
  }
}

This allows all browser_* tools except browser_close and browser_evaluate.

Why?

  • Security - Block dangerous tools (eval, delete, admin operations)
  • Control - Whitelist only the tools your agent needs
  • Works everywhere - Proxy any MCP server (local or remote)

Installation

npx mcp-filter [options] -- <server-command>
# or install globally
npm install -g mcp-filter

How Patterns Work

Use --include and --exclude with glob patterns:

--include "browser_*"     # Allow all browser_* tools
--exclude "browser_close" # Block browser_close
--exclude "delete_*"      # Block all delete_* tools

Order matters! Patterns are evaluated in order, first match wins:

# CORRECT: exclude first, then include
--exclude "browser_close" --include "browser_*"
# Result: browser_close blocked, other browser_* allowed

# WRONG: include first (exclude never matches!)
--include "browser_*" --exclude "browser_close"
# Result: ALL browser_* allowed (browser_* matches first)

Configuration

JSON Config (Claude Desktop, Cursor, VS Code)

Each argument must be a separate string in the array:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": [
        "mcp-filter",
        "--exclude", "dangerous_*",
        "--include", "safe_*",
        "--",
        "npx", "your-mcp-server"
      ]
    }
  }
}

Config file locations:

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
  • Cursor: .cursor/mcp.json or ~/.cursor/mcp.json

CLI Usage

# Local server (stdio)
npx mcp-filter --exclude "admin_*" -- npx @playwright/mcp

# Remote server (HTTP)
npx mcp-filter --exclude "delete_*" --upstream-url https://mcp.example.com/mcp

# With authentication header
npx mcp-filter --exclude "admin_*" \
  --upstream-url https://api.example.com/mcp \
  --header "Authorization: Bearer token"

Common Mistakes

JSON args must be separate strings

WRONG:

"args": ["mcp-filter", "--include browser_* --", "npx", "server"]

CORRECT:

"args": ["mcp-filter", "--include", "browser_*", "--", "npx", "server"]

The shell splits arguments for you. JSON doesn't - you must split them manually.

mcp-filter detects this and shows a helpful error:

Malformed argument: "--include browser_* --"

WRONG:
  "args": ["--include browser_* --", ...]

CORRECT:
  "args": ["--include", "browser_*", "--", ...]

Pattern order matters

Put --exclude patterns before --include to create exceptions:

# Block browser_close, allow other browser_* tools
--exclude "browser_close" --include "browser_*"

Options Reference

| Option | Description | |--------|-------------| | --include <pattern> | Include items matching pattern (whitelist) | | --exclude <pattern> | Exclude items matching pattern (blocklist) | | --upstream-url <url> | Connect to remote HTTP/SSE server | | --transport <type> | Transport: stdio, http, sse (auto-detected) | | --header <header> | HTTP header (format: "Key: Value") | | --help | Show help |

Options can be repeated. Patterns use glob syntax via minimatch.

How It Works

MCP Client → mcp-filter → Upstream MCP Server
                ↓
         Filters tools/list
         Blocks excluded calls
  1. Proxies requests between your MCP client and upstream server
  2. Filters tools/list, resources/list, prompts/list responses
  3. Blocks calls to filtered items with error responses

Development

pnpm install
pnpm run build
pnpm test

Links

License

MIT