MCP Filter

v1.0.0Developer Toolsstable

A proxy MCP (Model Context Protocol) server that filters the upstream tool surface to just the tools you need.

mcp-filtermcpai-integration
Share:
49
Stars
0
Downloads
0
Weekly
0/5

What is MCP Filter?

MCP Filter is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to proxy mcp (model context protocol) server that filters the upstream tool surface to just the tools you need.

A proxy MCP (Model Context Protocol) server that filters the upstream tool surface to just the tools you need.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A proxy MCP (Model Context Protocol) server that filters the

Use Cases

Filter upstream MCP tools to expose only relevant ones
Reduce tool surface and simplify agent interactions
pro-vi

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-filter

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Filter

MCP Filter is a lightweight proxy MCP server that sits between your AI client and one or more upstream MCP servers, exposing only the subset of tools you explicitly allow. By trimming an upstream server's tool surface — for example reducing a Supabase server from 20+ tools to just three — it can cut the token overhead of tool descriptions by more than 90%, making AI sessions faster and cheaper. It supports both stdio and HTTP (SSE) upstream connections, tool allowlisting by name, deny patterns via regex, and optional tool renaming via a configurable prefix.

Prerequisites

  • Python 3.11 or higher installed
  • pip or uv package manager
  • At least one upstream MCP server to proxy (e.g., a Supabase or filesystem MCP server)
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Install mcp-filter

Install via pip or uv. The uv method lets you run it directly with uvx without a permanent installation.

# With pip:
pip install mcp-filter

# With uv (no permanent install):
uvx mcp-filter --version
2

Identify the tools you want to expose

Start the upstream MCP server on its own and list its available tools, then decide which ones your AI client actually needs. This determines your allowlist.

3

Run mcp-filter wrapping an upstream server

Launch mcp-filter in stdio mode, pointing it at the upstream server binary. Use -a to specify the tool names to allow. This example wraps the Supabase MCP server and exposes only three tools.

mcp-filter run \
  -t stdio \
  --stdio-command npx \
  --stdio-arg "-y @supabase/mcp-server-supabase@latest --access-token YOUR_TOKEN" \
  -a "execute_sql,list_tables,get_project"
4

Use environment variables instead of flags (optional)

All CLI flags have MF_-prefixed environment variable equivalents, which is convenient when embedding the configuration in claude_desktop_config.json.

export MF_TRANSPORT=stdio
export MF_ALLOW_TOOLS=execute_sql,list_tables,get_project
export MF_STDIO_COMMAND=npx
export MF_STDIO_ARGS="-y @supabase/mcp-server-supabase@latest --access-token YOUR_TOKEN"
mcp-filter run
5

Configure Claude Desktop to use mcp-filter

Add mcp-filter as the MCP server in your client config. The client sees only the filtered tool surface.

{
  "mcpServers": {
    "filtered-supabase": {
      "command": "mcp-filter",
      "args": [
        "run",
        "-t", "stdio",
        "--stdio-command", "npx",
        "--stdio-arg", "-y @supabase/mcp-server-supabase@latest --access-token YOUR_TOKEN",
        "-a", "execute_sql,list_tables,get_project"
      ],
      "env": {}
    }
  }
}

MCP Filter Examples

Client configuration

Claude Desktop config that wraps the Supabase MCP server and exposes only three tools, reducing tool-description token cost from ~20k to ~2k.

{
  "mcpServers": {
    "filtered-supabase": {
      "command": "mcp-filter",
      "args": [
        "run",
        "-t", "stdio",
        "--stdio-command", "npx",
        "--stdio-arg",
        "-y @supabase/mcp-server-supabase@latest --access-token YOUR_SUPABASE_TOKEN",
        "-a", "execute_sql,list_tables,get_project"
      ],
      "env": {}
    }
  }
}

Prompts to try

With only the relevant tools exposed, prompts are cleaner and the AI is less likely to pick the wrong tool.

- "List all tables in my Supabase database"
- "Run a SQL query to count the number of users created in the last 7 days"
- "What tools are currently available through this MCP server?"
- "Enable the health check tool and show the current server status"

Troubleshooting MCP Filter

No tools appear in the AI client after configuring mcp-filter

Check that the tool names passed to -a exactly match the names the upstream server exposes (case-sensitive). Run the upstream server independently and list its tools to get the exact names.

Upstream server fails to start when launched by mcp-filter

Test the upstream command in isolation first (e.g., run 'npx -y @supabase/mcp-server-supabase@latest --access-token YOUR_TOKEN' directly). Fix any credential or path issues before adding mcp-filter to the chain.

MF_ environment variables are not picked up

Environment variables must be set in the same process that runs mcp-filter. When using claude_desktop_config.json, place them in the 'env' object of the server config rather than relying on your shell profile.

Frequently Asked Questions about MCP Filter

What is MCP Filter?

MCP Filter is a Model Context Protocol (MCP) server that proxy mcp (model context protocol) server that filters the upstream tool surface to just the tools you need. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Filter?

Follow the installation instructions on the MCP Filter GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP Filter?

MCP Filter works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Filter free to use?

Yes, MCP Filter is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-filter": { "command": "npx", "args": ["-y", "mcp-filter"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Filter?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides