# Tool Filter MCP

> Tool Filter MCP is an MCP server for developer tools. Proxy that hides unwanted tools from another MCP server with regex allow and deny lists. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/respawn-llc/tool-filter-mcp
- **MCP Registry name:** io.github.respawn-llc/tool-filter-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-23

## About

Some agents keep a tool's full description in context even after the tool is denied, and may still try to call it. For large servers such as GitHub, Supabase, JetBrains and Atlassian, the README estimates this wastes 40 to 60 thousand tokens. This proxy sits in front of an upstream server and removes the tools you do not want before the client ever sees them.

It connects to an upstream over HTTP/SSE with `--upstream`, or spawns a stdio server after `--upstream-stdio --`. Comma-separated regular expressions go in `--deny` and `--allow`; matching is case-sensitive and partial unless you anchor with `^` and `$`, and deny wins when both match. Invalid or unsafe patterns raise an error. `--list-tools` prints the upstream's tools as a table, names or JSON, with filters applied, so you can preview results.

It can forward custom headers with environment-variable expansion and pass environment variables to a stdio upstream, which makes it a drop-in wrapper in a `.mcp.json` entry.

## Features

- **Regex deny list:** Removes upstream tools whose names match the patterns.
- **Regex allow list:** Exposes only tools that match; deny takes precedence.
- **HTTP/SSE and stdio upstreams:** Wraps remote servers or spawns local ones.
- **Tool listing:** --list-tools shows tools as a table, names or full JSON, after filtering.
- **Header and env passthrough:** Forwards auth headers and environment variables to the upstream.
- **Pattern safety check:** Rejects invalid or unsafe regex patterns with an error.

## Good for

- Trim a large MCP server down to the few tools you need
- Block destructive tools for an agent
- Cut token use from unused tool descriptions
- Preview exactly which tools a filter exposes
- Wrap an authenticated remote server in a local config

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add tool-filter-mcp -- npx -y @respawn-app/tool-filter-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tool-filter-mcp -- npx -y @respawn-app/tool-filter-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tool-filter-mcp]
command = "npx"
args = ["-y", "@respawn-app/tool-filter-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user tool-filter-mcp npx -- -y @respawn-app/tool-filter-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tool-filter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@respawn-app/tool-filter-mcp"
      ]
    }
  }
}
```

## FAQ

### Why filter tools?

Many agents keep denied tools' descriptions in context, which costs tokens and invites failed calls.

### How do I run Tool Filter MCP?

With npx @respawn-app/tool-filter-mcp, using --upstream for HTTP/SSE or --upstream-stdio -- followed by the command.

### What wins when allow and deny both match?

Deny takes precedence.

### Is pattern matching exact?

No, it is case-sensitive and can match part of a name unless you use ^ and $.

### How do I add Tool Filter MCP to Claude Code?

Run this command in your terminal: claude mcp add tool-filter-mcp -- npx -y @respawn-app/tool-filter-mcp

### What are the best alternatives to Tool Filter MCP?

The closest alternatives to Tool Filter MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/tool-filter-mcp-2
