JetBrains/thinkrail / packages/server/skills/managing-mcp-servers
managing-mcp-servers
VerifiedUse when the user asks to add, change, remove, enable or disable an MCP server, or when an MCP tool is missing, needs sign-in, fails, or was blocked. ThinkRail runs pi in-process, so there is no `pi` command to call.
Managing MCP servers in ThinkRail
ThinkRail uses pi's built-in MCP support but has no pi executable. Never run pi mcp add,
pi mcp login or other pi commands; edit the configuration files and point the user at
Settings › MCP servers for everything that needs them.
Where servers are configured
- User level — pi's agent directory, usually
~/.pi/agent/mcp.json: available in every project. - This repository —
.pi/mcp.jsonin the worktree, tracked in git. A server defined here does not run until the user approves it in Settings, and any later change to its entry needs approval again. It only loads when the user trusts the project.
Both files use pi's format:
{
"mcpServers": {
"docs": { "url": "https://example.com/mcp" },
"browser": { "command": "npx", "args": ["-y", "@playwright/mcp@0.0.83"] }
}
}
- Pin package versions in
args; never@latest. - Never write a secret into either file. Reference it as
${ENV_VAR}(from the host's environment) or!command(the command's output, for example!gh auth token), or let the user sign in. exposure:deferred(the default here — load the server's tools withtool_searchfirst),direct(a few always-useful tools), orhidden.codemodeis treated asdeferred.- Prefer the user-level file for personal servers; only put a server in
.pi/mcp.jsonwhen the user wants it shared with the repository.
GitHub
GitHub is a recipe, not a preset: its hosted server, authenticated with the user's GitHub CLI sign-in. Add it to the user-level file (Settings › MCP servers offers the same entry under Paste JSON):
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/readonly",
"headers": { "Authorization": "!t=$(gh auth token) && echo \"Bearer $t\"" }
}
}
}
/readonlyis GitHub's documented read-only mode (same as anX-MCP-Readonly: trueheader). Usehttps://api.githubcopilot.com/mcp/only when the user asks for tools that change data.- The header command runs each time a chat connects. While
ghis logged out it fails instead of sending an empty token; the user runsgh auth loginin a terminal. - Unverified: whether GitHub accepts the GitHub CLI token's scopes for every toolset. If the server
rejects it, ask the user for a token in an environment variable:
"Authorization": "Bearer ${GITHUB_TOKEN}".
After editing
The host reloads idle chats on its own and a busy chat picks the change up when it is idle. Tell the user when a step is theirs: approving a repository server, or Sign in for a server that uses OAuth (both in Settings › MCP servers). Do not ask them to restart ThinkRail.
Using MCP tools
- Tools are named
mcp__<server>__<tool>. For adeferredserver, calltool_searchto load them. - Subagents cannot call MCP tools: call them yourself and put what the subagent needs in its task.
- ThinkRail asks the user before a call that may change data. A denied or cancelled call is final for that call; do not retry it without asking the user first.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 463k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 463k | Updated | Claude CodeCodex | Verified | Install |
| discernment-nudgeanthropics/skillsAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| internal-commsanthropics/skillsA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.). | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |