Official agent skill

MCP Servers

by PostHog in PostHog/code

Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.

OfficialMITAuto-check passedAgent Workflows

Install MCP Servers

skills CLI
$ npx skills add PostHog/code --skill mcp-servers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/code mcp-servers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/harness/src/extensions/mcp/skills/mcp-servers .claude/skills/mcp-servers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-servers
GitHub stars
179
Token cost
~1.9k tokens
SKILL.md length
940 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.

  • Works in 4 steps: Find the server's package name (stdio)… → Decide global vs project config; read… → Write the config. Validate: stdio needs… → …
  • The user asks to add/install/remove an MCP server
  • SKILL.md covers Config files, Config format, Context window control (the… and Workflow for "install X MCP…, plus 3 more sections
  • Calls npx and uvx; reaches mcp.linear.app

What it does

MCP Servers is an agent skill from PostHog/code, published by the product's own GitHub organization. Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent. Use when the user asks to add/install/remove an MCP server, connect a tool like Linear/Sentry/Supabase/GitHub via MCP, set up mcp.json, or when MCP tools are failing or need OAuth login.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol, Supabase, GitHub and Sentry. The repository describes itself as: The era of self-driving development is here. The licence is MIT.

When your agent uses it

  • The user asks to add/install/remove an MCP server
  • Connect a tool like Linear/Sentry/Supabase/GitHub via MCP
  • Set up mcp.json
  • MCP tools are failing

Example prompts

  • “/mcp-servers”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Find the server's package name (stdio) or MCP endpoint URL (remote). Use web search
  2. Decide global vs project config; read the existing file first and merge — do not
  3. Write the config. Validate: stdio needs command; http/sse needs url.
  4. Ask the user to run /reload, then /mcp to confirm the server is ready. If it

What it can do on your machine

Read from SKILL.md and the folder at commit a4c32df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • uvx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mcp.linear.app

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Servers loads about 1.9k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 940 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PostHog/code at commit a4c32df, republished under its MIT licence (© PostHog). 940 words, ~1,943 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-servers/SKILL.md (or your agent's skills folder).
name
mcp-servers
description
Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent. Use when the user asks to add/install/remove an MCP server, connect a tool like Linear/Sentry/Supabase/GitHub via MCP, set up mcp.json, or when MCP tools are failing or need OAuth login.

MCP servers

This agent has a built-in MCP client. Servers are declared in mcp.json; their tools appear as mcp_<server>_<tool> once connected. The model can also always find and call MCP tools via a single mcp proxy tool (mcp({ search: "..." }) / mcp({ tool: "...", args }) without their schemas ever being loaded into context, and without a lifecycle: "lazy" server being connected until one of its tools is actually needed — see "Context window control" below.

Config files

FileScope
~/.pi/agent/mcp.jsonglobal (all projects)
<project>/.pi/mcp.jsonproject-local, only honored in trusted projects

Project entries override global entries with the same server name; project settings keys override global ones per key. Prefer project-local config for project-specific servers, global for personal/general-purpose ones. Create the file if it doesn't exist.

Applying changes: config is read at session start. After editing mcp.json, tell the user to run /reload (this re-reads config, restarts servers, and refreshes tools). You cannot run /reload yourself.

Config format

json
{
  "settings": {
    "toolPrefix": "mcp",
    "requestTimeoutMs": 30000,
    "maxRetries": 3,
    "searchResultLimit": 15
  },
  "mcpServers": {
    "<server-name>": { ... }
  }
}

settings is optional. Server names: keep them short and lowercase; they become part of tool names.

Local (stdio) server — spawned as a subprocess
json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"],
      "env": { "SOME_VAR": "literal-value" }
    }
  }
}
  • command is required; transport defaults to "stdio".
  • env values are literals merged over the parent environment — there is no ${VAR} interpolation. If a server needs a secret, ask the user to provide it or reference their shell environment by launching via a wrapper script.
  • Most published servers run via npx -y <package> (Node) or uvx <package> (Python). If unsure of the package name, search the web for "<product> MCP server".
Remote (HTTP) server
json
{
  "mcpServers": {
    "internal": {
      "transport": "streamable-http",
      "url": "https://mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer <api-key>" }
    }
  }
}
  • transport: "streamable-http" (preferred) or "sse" (legacy); url required.
  • headers is for static API-key auth. Never invent keys — ask the user for theirs.
Remote server with OAuth (user login in browser)
json
{
  "mcpServers": {
    "linear": {
      "transport": "streamable-http",
      "url": "https://mcp.linear.app/mcp",
      "auth": { "type": "oauth" }
    }
  }
}
  • auth: { "type": "oauth" } is enough for most servers (discovery + dynamic client registration + PKCE are automatic). Optional fields: scope, clientId, clientSecret, redirectUrl (only for pre-registered clients), clientName.
  • After /reload, the first connection will fail with "Authentication required" — that is expected. Start the login yourself with the mcp_auth tool (opens the user's browser), or tell the user to run /mcp:auth <server-name>. Tokens are stored and refreshed automatically afterwards.
  • OAuth is only valid for streamable-http/sse, not stdio.
  • If dynamic client registration is rejected (e.g. a client-name policy error), set "clientName" in the auth object and retry.
Other per-server options
  • lifecycle: "lazy" (default — starts on first use of one of its tools via the mcp proxy tool, or manually with /mcp:start <name>) or "eager" (starts at session start). Use eager only for a server you want connected from the very first turn.
  • requestTimeoutMs, healthCheckIntervalMs: numeric overrides, rarely needed.
  • idleTimeoutMs: lifecycle: "lazy" only — auto-disconnect this many ms after the server's last tool call. Good for servers used in bursts, e.g. 600000 (10 min).
  • description: one-line summary shown by mcp search before this server has ever connected (its real tool list isn't known yet). Set this on lazy servers so the model can find them via search before the first connection.
  • directTools: false (default — all tools stay searchable-only via mcp), true (all tools load straight into context), or an array of MCP-side tool names to keep direct while the rest stay proxy-only. Set true (or list specific names) only for a small server used on nearly every turn, where a search round-trip isn't worth it.
Show full SKILL.md (402 more words)Show less

Context window control (the mcp proxy tool)

A single mcp tool is always available, independent of mcp.json:

  • mcp({ search: "keywords" }) — finds relevant tools/servers by keyword, including ones that are not currently connected (their cached or configured description metadata is searched instead of connecting).
  • mcp({ tool: "<name>", args: '{"key":"value"}' }) — calls a tool by its exact name (from search), starting its server automatically if needed. Passing a bare server name instead of a tool name connects that server and lists its tools without calling anything.

You do not need to do anything for this to work — it's automatic for every configured server. Only mention directTools/idleTimeoutMs/description to the user if they ask about reducing context usage or about servers not starting immediately.

Workflow for "install X MCP server"

  1. Find the server's package name (stdio) or MCP endpoint URL (remote). Use web search if unsure; official docs usually show an mcpServers JSON snippet you can adapt.
  2. Decide global vs project config; read the existing file first and merge — do not clobber other servers.
  3. Write the config. Validate: stdio needs command; http/sse needs url.
  4. Ask the user to run /reload, then /mcp to confirm the server is ready. If it uses OAuth, start the login with the mcp_auth tool once the server exists.

Agent tool

  • mcp_auth ({ "server": "<name>" }): queues the interactive browser OAuth flow for a configured server. Use it when the user asks you to log in / authenticate an MCP server. The flow starts after your turn ends; the user completes it in the browser.

Commands (user-facing — suggest these, you cannot run them)

CommandPurpose
/mcpstatus of all servers
/mcp <name>state, last error, recent server logs
/mcp:start <name> / /mcp:stop <name>start/stop a server
/mcp:auth <name> [reset]browser OAuth login (reset wipes stored credentials)
/reloadapply mcp.json changes

Troubleshooting

  • Server stuck at stopped with an error: suggest /mcp <name> to see its stderr log. Common causes: package name typo, missing runtime (npx/uvx not installed), missing env var/API key, wrong URL.
  • 401/Unauthorized on an OAuth server: mcp_auth tool or /mcp:auth <name>; if it keeps failing, /mcp:auth <name> reset.
  • OAuth registration rejected with a client-name error: set "clientName" in the server's auth config to a compliant name, /reload, and retry the login.
  • Tools missing after config edit: /reload was probably not run.
  • Project config ignored: the project may not be trusted; move the server to ~/.pi/agent/mcp.json or have the user trust the project.

© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/harness/src/extensions/mcp/skills/mcp-servers of PostHog/code.

Open the folder on GitHubat commit a4c32df

Compare with similar skills

MCP Servers next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Servers compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Servers this skillPostHog/code179—~1.9kAutomated safety check: PassMIT
Superset Integration Toolssuperset-sh/superset15k—~1.6kAutomated safety check: WarnCustom licence
Ops Triagedavepoon/buildwithclaude3.6k—~2kAutomated safety check: NotesMIT
Skill Seekers Builderyusufkaraaslan/Skill_Seekers15k—~760Automated safety check: PassMIT
MCP Apps Builderawslabs/cli-agent-orchestrator1.4k—~1.7kAutomated safety check: PassApache-2.0
Agent RecallGoldentrii/AgentRecall-X371—~5.2kAutomated safety check: NotesMIT

Similar skills

  • Superset Integration Tools

    superset-sh/superset

    Lists and calls the tools of connected integrations such as Linear, GitHub, Sentry or Notion through the superset mcp command, without storing a token on the machine.

    15k GitHub stars~1.6k tokensUpdated today
    Agent WorkflowsAuto-check: warnings
  • Ops Triage

    davepoon/buildwithclaude

    Cross-platform issue triage. An agent skill from davepoon/buildwithclaude.

    3.6k GitHub stars~2k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Skill Seekers Builder

    yusufkaraaslan/Skill_Seekers

    Detects the type of a knowledge source and uses the Skill Seekers MCP tools to turn docs, repos, PDFs or videos into packaged AI skills.

    15k GitHub stars~760 tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • MCP Apps Builder

    awslabs/cli-agent-orchestrator

    Official

    Load the official MCP Apps builder skills (create-mcp-app, migrate-oai-app, add-app-to-server, convert-web-app) from github.com/modelcontextprotocol/ext-apps.

    1.4k GitHub stars~1.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agent Recall

    Goldentrii/AgentRecall-X

    Persistent compounding memory for AI agents. An agent skill from Goldentrii/AgentRecall-X.

    371 GitHub stars~5.2k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check: notes
  • Release

    jgravelle/jcodemunch-mcp

    Publishing a jMunch release (jcodemunch-mcp, jdocmunch-mcp, jdatamunch-mcp, jragmunch-cli), reviewing/merging/closing PRs, and responding to the community.

    2.7k GitHub stars~6.5k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from PostHog/code

All 10 skills in this repo
  • Canvas Templates

    PostHog/code

    Official

    How PostHog "canvas" dashboards work end-to-end — the two rendering tiers (json-render vs freeform React-in-iframe), the agent system prompts that steer each, and the RIGHT way to fetch PostHog data…

    179 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Dynamic Workflows

    PostHog/code

    Official

    How to write JavaScript workflow scripts for the workflow tool - fanning work out across many isolated subagents with agent(), parallel(), and pipeline(), then synthesizing one result.

    179 GitHub stars~2.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Merging PRs

    PostHog/code

    Official

    Merge a PR into main through the Trunk merge queue and babysit it until it lands.

    179 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Onboarding Videos

    PostHog/code

    Official

    Add, replace, and optimize the looping demo videos in the onboarding "welcome" bento grid (packages/ui/src/features/onboarding).

    179 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Quill Code

    PostHog/code

    Official

    Edit the @posthog/quill design system locally and consume the change in this repo (posthog-code) before it is published to npm.

    179 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Storybook Stories

    PostHog/code

    Official

    Write Storybook stories for PostHog UI components. An agent skill from PostHog/code.

    179 GitHub stars~929 tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about MCP Servers

What does MCP Servers do?

Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent. MCP Servers is an agent skill from PostHog/code, published by the product's own GitHub organization. Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.

When should I use MCP Servers?

MCP Servers fits situations like: the user asks to add/install/remove an MCP server; connect a tool like Linear/Sentry/Supabase/GitHub via MCP; set up mcp.json; MCP tools are failing.

How do I install MCP Servers in Claude Code?

Run `npx skills add PostHog/code --skill mcp-servers -a claude-code`. Or copy the skill folder (packages/harness/src/extensions/mcp/skills/mcp-servers in PostHog/code) into .claude/skills/mcp-servers in your project. Claude Code loads it when a task matches its description.

How do I install MCP Servers in Codex?

Run `npx skills add PostHog/code --skill mcp-servers -a codex`. Or copy the skill folder (packages/harness/src/extensions/mcp/skills/mcp-servers in PostHog/code) into .agents/skills/mcp-servers in your project. Codex loads it when a task matches its description.

Can I use MCP Servers in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/code --skill mcp-servers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-servers, .gemini/skills/mcp-servers, .github/skills/mcp-servers and .opencode/skills/mcp-servers in your project.

What does MCP Servers need to run?

Going by SKILL.md and its folder, MCP Servers needs the command-line tools its instructions call (npx and uvx). Our summary lists: Node.js.

Does MCP Servers access the network?

SKILL.md names 1 domain. In commands or code: mcp.linear.app; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is MCP Servers safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MCP Servers use?

MCP Servers is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Servers use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Servers?

Skills that share tags, products or a category with MCP Servers: Superset Integration Tools (superset-sh/superset, 15k stars), Ops Triage (davepoon/buildwithclaude, 3.6k stars), Skill Seekers Builder (yusufkaraaslan/Skill_Seekers, 15k stars) and MCP Apps Builder (awslabs/cli-agent-orchestrator, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Servers?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/code, which has 179 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on August 5, 2026.

Source: PostHog/code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.