Managing MCP Servers
Use when the user asks to add, change, remove, enable or disable an MCP server, or when...
Install
npx skills add JetBrains/thinkrail --skill managing-mcp-servers -g -a claude-code -y- Repository
- JetBrains/thinkrail7k
- Category
- AI and agents
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Lightabout 775 tokens
- Runs scripts
- No, instructions only
What it does
Use 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\"" }
}
}
}

