Tool Filter MCP
tool-filter-mcp
정규식 기반의 차단 목록을 통해 업스트림 MCP 서버의 도구를 필터링하는 MCP 프록시 서버입니다.
유지보수: ✅ 예 (26년 봄/여름)
왜 이 도구를 사용하나요?
효과적인 컨텍스트 엔지니어링을 위해 불필요한 토큰을 최소화해야 합니다. 현재 대부분의 주요 에이전트(예: Claude Code)는 컨텍스트에서 도구 설명을 제거하지 않습니다. 도구가 완전히 차단되어 사용되지 않더라도 모델은 여전히 전체 설명을 전달받으며, 여전히 해당 도구를 호출하려고 시도합니다(그리고 오류 메시지를 받게 됩니다). github, supabase, jetbrains IDE, atlassian과 같은 대규모 MCP의 경우, 이는 컨텍스트에 치명적이며 40-60k의 쓸모없는 토큰으로 인한 컨텍스트 오염을 초래합니다. 에이전트가 jira 티켓 설명을 볼 수 있기를 원하셨나요? 그렇다면 confluence 페이지의 담당자를 수정하는 44개의 쓸모없는 도구도 함께 보게 될 것입니다.
이 MCP는 오버헤드 없이 이 문제를 완전히 해결합니다. 기여를 환영합니다!
Related MCP server: mcp-tool-filter
설치
# For HTTP/SSE MCP servers
npx @respawn-app/tool-filter-mcp --upstream <url> --deny <patterns>
# For stdio MCP servers
npx @respawn-app/tool-filter-mcp --upstream-stdio --deny <patterns> -- <command> [args...]사용법
기본 예제 (HTTP/SSE)
HTTP MCP 서버에서 .*_file$ 패턴과 일치하는 도구를 필터링합니다:
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--deny ".*_file$"기본 예제 (stdio)
로컬 stdio MCP 서버에서 도구를 필터링합니다:
npx @respawn-app/tool-filter-mcp \
--upstream-stdio \
--deny "dangerous_.*" \
-- npx my-mcp-server환경 변수 사용 (stdio)
업스트림 stdio 서버에 환경 변수를 전달합니다:
npx @respawn-app/tool-filter-mcp \
--upstream-stdio \
--env "API_KEY=secret123" \
--env "DEBUG=true" \
--deny "admin_.*" \
-- npx my-mcp-server다중 패턴
쉼표로 구분된 패턴을 사용합니다:
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--deny "get_file_text,create_new_file,replace_text"인증 헤더 사용
인증을 위한 사용자 지정 헤더를 추가합니다:
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--header "Authorization: Bearer your-token-here" \
--header "X-API-Key: your-api-key"헤더는 환경 변수 확장을 지원합니다(앱에서 아직 확장되지 않은 경우):
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--header "Authorization: Bearer $AUTH_TOKEN"사용 가능한 도구 목록 확인
필터를 설정하기 전에 사용 가능한 도구를 확인합니다:
# Default table format
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--list-tools
# Get comma-separated names for copy-paste
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--list-tools --format=names
# Get full JSON with schemas
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--list-tools --format=json
# Preview filtered results
npx @respawn-app/tool-filter-mcp \
--upstream http://localhost:3000/sse \
--deny ".*_file$" \
--list-tools --format=namesClaude Code와 함께 사용
HTTP/SSE 업스트림 서버
.mcp.json에 추가합니다:
{
"mcpServers": {
"filtered-http-server": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream",
"http://localhost:3000/sse",
"--deny",
"dangerous_tool_1,dangerous_tool_2"
],
"type": "stdio"
}
}
}인증 헤더 포함(환경 변수 확장 지원):
{
"mcpServers": {
"filtered-http-server": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream",
"http://localhost:3000/sse",
"--header",
"Authorization: Bearer ${API_TOKEN}",
"--header",
"X-Custom-Header: $CUSTOM_VALUE",
"--deny",
"sensitive_.*"
],
"type": "stdio"
}
}
}Stdio 업스트림 서버
{
"mcpServers": {
"filtered-zen": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream-stdio",
"--deny",
"dangerous_.*,sensitive_.*",
"--",
"npx",
"my-mcp-server"
],
"type": "stdio"
}
}
}업스트림 서버에 여러 인수를 전달하는 경우:
{
"mcpServers": {
"filtered-stdio-server": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream-stdio",
"--deny",
"admin_.*",
"--",
"node",
"my-mcp-server.js",
"--config=config.json",
"--verbose"
],
"type": "stdio"
}
}
}대시로 시작하는 인수를 사용하는 경우(예: uvx):
{
"mcpServers": {
"filtered-uvx-server": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream-stdio",
"--deny",
"test_.*",
"--",
"uvx",
"--from",
"git+https://github.com/BeehiveInnovations/zen-mcp-server.git",
"zen-mcp-server"
],
"type": "stdio"
}
}
}업스트림 stdio 서버에 환경 변수를 사용하는 경우:
{
"mcpServers": {
"filtered-server-with-env": {
"command": "npx",
"args": [
"@respawn-app/tool-filter-mcp",
"--upstream-stdio",
"--env",
"API_KEY=${MY_API_KEY}",
"--env",
"DEBUG=true",
"--deny",
"admin_.*",
"--",
"npx",
"my-mcp-server"
],
"type": "stdio"
}
}
}CLI 옵션
도구 목록
프록시 서버를 시작하지 않고 사용 가능한 도구 목록을 출력합니다
--list-tools: 업스트림에서 사용 가능한 도구를 나열하고 종료합니다--format <type>:--list-tools의 출력 형식 (기본값:table)table: 설명이 포함된 사람이 읽을 수 있는 표 (100자로 잘림)json: 전체 스키마가 포함된 전체 JSON 출력names: 쉽게 복사/붙여넣기 할 수 있도록 쉼표로 구분된 도구 이름
연결 모드 (상호 배타적)
프록시 서버를 시작하려면 다음 중 정확히 하나를 지정해야 합니다:
--upstream <url>: 업스트림 HTTP/SSE MCP 서버에 연결--upstream-stdio: 업스트림 stdio MCP 서버를 실행하고 연결--구분 기호 뒤에 명령과 인수가 필요합니다예:
--upstream-stdio -- npx zen-mcp-server
공통 옵션
--deny <patterns>: 필터링할 도구에 대한 쉼표로 구분된 정규식 패턴
HTTP/SSE 모드 옵션
--upstream과 함께 사용할 때만 적용 가능:
--header <name:value>: 업스트림 서버로 전달할 사용자 지정 HTTP 헤더 (여러 헤더에 대해 반복 가능)형식:
--header "Header-Name: value"환경 변수 확장 지원:
$VAR또는${VAR}예:
--header "Authorization: Bearer $TOKEN"
Stdio 모드 옵션
--upstream-stdio와 함께 사용할 때만 적용 가능:
--env <KEY=value>: 업스트림 stdio 서버로 전달할 환경 변수 (여러 변수에 대해 반복 가능)형식:
--env "KEY=value"예:
--env "API_KEY=secret" --env "DEBUG=true"
--구분 기호 뒤에 명령과 모든 인수를 제공합니다--뒤의 모든 내용은 업스트림 서버로 전달됩니다대시로 시작하는 인수 지원 (예:
--from,--config등)예:
--upstream-stdio -- uvx --from git+https://... package-name
요구 사항
Node.js >= 20.0.0
다음을 갖춘 업스트림 MCP 서버:
SSE 또는 스트리밍 가능한 HTTP 전송 (
--upstream용), 또는stdio 전송 (
--upstream-stdio용)
라이선스
MIT
Copyright (c) 2026 Respawn LLC
This server cannot be deployed
Maintenance
Related MCP Connectors
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP enforcement layer that intercepts AI agent actions and blocks rule violations before execution.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA configurable proxy that filters GitHub MCP server tools via YAML whitelist, reducing context consumption from 100+ tools to only the ones you need while providing meta-tools to discover available functionality.MIT
- AlicenseNot gradedqualityDmaintenanceA generic MCP proxy that filters which tools are exposed from a remote MCP server, reducing context window token usage by only loading the tools you actually need.7 npm1MIT
- AlicenseNot gradedqualityCmaintenanceReduces AI token consumption by optimizing MCP tool definitions and responses, with a probe for measurement and a gate for filtered tool exposure and cost reduction.MIT
- AlicenseNot gradedqualityBmaintenanceReduces token costs from MCP tool schemas by analyzing bloat, compressing descriptions, and selecting only relevant tools for AI agents.MIT