PostHog / PostHog/posthog

mcp: let clients filter or disable the resources the server advertises

Open
#73,653 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature/mcp team/self-driving
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Description

Is your feature request related to a problem?

The hosted MCP server advertises 210 resources (208 posthog://skills/* plus 2 docs entries, as of 2026-07-24) and there is no way for a client to narrow that list. In clients that mix MCP resources into their file autocomplete, this pushes the user's own files out of view. One user reported that pressing @ in Claude Code returns mostly PostHog skills, and that of the several MCP servers they have installed (Cloudflare, Ahrefs, PlanetScale, Facebook Ads, PostHog), PostHog is the only one that exposes resources at all. The existing features, tools and readonly query params only filter tools: resources/list is routed straight to ResourceCatalog.getResourcesList(), which returns everything with no request context (services/mcp/src/hono/dispatcher.ts, services/mcp/src/hono/resource-catalog.ts).

Describe the solution you'd like

A way to opt out of resources, or to narrow them, at connection time, in the same place the tool filters already live (a query param or header on https://mcp.posthog.com/mcp). Turning the whole list off is the important case. Being able to keep just a category or two would be a useful extra, given the current split: 68 ai-observability, 37 integration, 22 error-tracking, 22 feature-flags, 13 error-tracking-upload-source-maps, 12 logs, and a long tail.

Describe alternatives you've considered

Nothing on the server side works: features, tools, readonly and mode all filter tools only. On the client side the only levers are all-or-nothing on the whole server, so the user gives up every PostHog tool to get their file picker back. In Claude Code that means toggling the server off per project via /mcp, moving it from user scope to project scope so it only loads in some repos, or starting a session with --strict-mcp-config. There is no client-side setting that filters MCP resources out of the autocomplete.

Worth a look while someone is in here: the FAQ still says "Currently we support Next.js, with more frameworks in progress" under Prompts and resources (https://posthog.com/docs/model-context-protocol/faq), which is stale by about 200 resources.

Additional context

From: https://us.posthog.com/project/2/support/tickets/64449

Debug info

Not applicable, this is about the hosted MCP server rather than a project's configuration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in services/mcp/src/hono/dispatcher.ts and services/mcp/src/hono/resource-catalog.ts, tracing how resources/list differs from the existing tool filters. Define the connection-time behavior for disabling or narrowing resources while preserving tool filtering, then verify that the hosted MCP endpoint no longer advertises excluded resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.