Skip to main content

Tool Filtering

The PagerDuty MCP Server exposes 55 tools across 14 domains. While comprehensive, this large number of tools can degrade AI performance โ€” LLMs perform better with a focused, relevant set of tools.

This guide explains how to filter tools using mcp-proxy, a lightweight proxy server that sits between your MCP client and the PagerDuty MCP Server.

Background

This solution addresses the request in GitHub Issue #68: "Can we add a flag to filter MCP tools by area?" While native filtering is not yet built into the server, the mcp-proxy approach provides an effective workaround.

Local Server Only

Tool filtering via mcp-proxy is not available for the Remote MCP Server. The proxy works by wrapping a local subprocess โ€” it cannot intercept a remotely-hosted connection.

How It Worksโ€‹

MCP Client โ†’ mcp-proxy (localhost:9090) โ†’ PagerDuty MCP Server
โ†‘
Tool filter applied here

The proxy starts the PagerDuty MCP Server as a subprocess and only forwards a selected subset of tools to your client.

Installationโ€‹

Install mcp-proxy:

# Using Go
go install github.com/TBXark/mcp-proxy@latest

# Or download a pre-built binary from:
# https://github.com/TBXark/mcp-proxy/releases

Configurationโ€‹

Create a mcp_proxy_config.json file:

Allow List (Whitelist)โ€‹

Only expose the tools you explicitly list:

{
"mcpProxy": {
"baseURL": "http://localhost:9090",
"addr": ":9090",
"type": "streamable-http"
},
"mcpServers": {
"pagerduty": {
"command": "uvx",
"args": ["pagerduty-mcp"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-api-token-here"
},
"options": {
"toolFilter": {
"mode": "allow",
"list": [
"get_user_data",
"list_incidents",
"get_incident",
"list_oncalls",
"list_schedules"
]
}
}
}
}
}

Deny List (Blacklist)โ€‹

Expose all tools except those you list:

{
"mcpProxy": {
"baseURL": "http://localhost:9090",
"addr": ":9090",
"type": "streamable-http"
},
"mcpServers": {
"pagerduty": {
"command": "uvx",
"args": ["pagerduty-mcp"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-api-token-here"
},
"options": {
"toolFilter": {
"mode": "deny",
"list": [
"list_status_pages",
"list_status_page_severities",
"list_status_page_impacts",
"list_status_page_statuses",
"get_status_page_post",
"list_status_page_post_updates",
"create_status_page_post",
"create_status_page_post_update"
]
}
}
}
}
}

With Write Toolsโ€‹

{
"mcpProxy": {
"baseURL": "http://localhost:9090",
"addr": ":9090",
"type": "streamable-http"
},
"mcpServers": {
"pagerduty": {
"command": "uvx",
"args": ["pagerduty-mcp", "--enable-write-tools"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-api-token-here"
},
"options": {
"toolFilter": {
"mode": "allow",
"list": [
"list_incidents",
"get_incident",
"create_incident",
"manage_incidents",
"add_note_to_incident"
]
}
}
}
}
}

Starting the Proxyโ€‹

mcp-proxy --config mcp_proxy_config.json

The proxy starts on http://localhost:9090 by default.

Configuring Your MCP Clientโ€‹

Point your client to the proxy instead of running the server directly.

Cursor / Claude Desktopโ€‹

{
"mcpServers": {
"pagerduty": {
"url": "http://localhost:9090/mcp"
}
}
}

VS Codeโ€‹

{
"mcp": {
"servers": {
"pagerduty": {
"type": "http",
"url": "http://localhost:9090/mcp"
}
}
}
}

Suggested Tool Sets by Use Caseโ€‹

Use CaseRecommended Tools
Incident Managementlist_incidents, get_incident, list_incident_notes, manage_incidents, add_note_to_incident
On-Call Overviewlist_oncalls, list_schedules, get_schedule, list_schedule_users
Service Healthlist_services, get_service, list_change_events, list_log_entries
Team Operationslist_teams, get_team, list_team_members, list_users
Minimal Read-Onlyget_user_data, list_incidents, get_incident, list_oncalls, list_schedules