mcp-servers
What it does
This skill walks the AI through adding and fixing MCP servers, which give an assistant access to outside services. It is for people who want to connect tools like GitHub, Linear or Sentry to their AI.
When to use it
- ✓When you want to connect a tool such as Linear, Sentry or GitHub to your AI.
- ✓When an MCP tool fails or its tools do not show up in your assistant.
- ✓When you need to sign in to an MCP server that uses an OAuth login.
Skill link
https://github.com/PostHog/posthog/blob/master/packages/agent/packages/harness/src/extensions/mcp/skills/mcp-servers/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Help me connect my Linear account to my AI through an MCP server.”
5 new skills a week. 1 minute to read.
How it works
It explains where the MCP settings file lives, how to add a server entry with its options, and when to reload the settings so the new tools appear. It also covers common errors and sign-in steps.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
| File | Scope |
|---|---|
~/.pi/agent/mcp.json |
global (all projects) |
<project>/.pi/mcp.json |
project-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
{
"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
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"],
"env": { "SOME_VAR": "literal-value" }
}
}
}
commandis required;transportdefaults to"stdio".envvalues 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) oruvx <package>(Python). If unsure of the package name, search the web for "<product> MCP server".
Remote (HTTP) server
{
"mcpServers": {
"internal": {
"transport": "streamable-http",
"url": "https://mcp.example.com/mcp",
"headers": { "Authorization": "Bearer <api-key>" }
}
}
}
transport:"streamable-http"(preferred) or"sse"(legacy);urlrequired.headersis for static API-key auth. Never invent keys — ask the user for theirs.
Remote server with OAuth (user login in browser)
{
"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 themcp_authtool (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, notstdio. - If dynamic client registration is rejected (e.g. a client-name policy error), set
"clientName"in theauthobject and retry.
Other per-server options
lifecycle:"lazy"(default — starts on first use of one of its tools via themcpproxy 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 bymcpsearch 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 viamcp),true(all tools load straight into context), or an array of MCP-side tool names to keep direct while the rest stay proxy-o
FAQ
Where is the MCP setup stored?
In an mcp.json file, either in your personal settings or inside a project folder. Project settings apply only to that project.
Why don't my new tools show up?
Settings are read when a session starts, so you usually need to reload the configuration before the new tools appear.
Can it set up any service?
It covers any MCP server you can add to the settings file. Each service may still need its own account and sign-in.
Details
Original description by the author
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.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6821
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
mcporter
394kHelps your agent list, call, and inspect MCP servers and their tools over HTTP or stdio, and manage their sign-in settings.
fastmcp
260kHelps you build, test, and deploy a Python MCP server that gives AI assistants access to your API, database, or files as tools.
mcp-oauth-remote-gateway
260kWalks you through OAuth sign-in for a remote MCP server when Hermes runs on a server, where the normal browser sign-in cannot reach it.