Skip to content
cccskills
FreePublished on GitHub

managing-mcp-servers

Manage MCP server settings in ThinkRail when servers need to be added, changed, enabled, or troubleshot. It explains user and repository configuration, safe credential references, approval and sign-in steps, and how to load deferred tools.

OriginalShow the original description

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.

Works withGitHub

Run score Not tested

See how to install

Good for

  • Adding or removing an MCP server
  • Changing server settings or exposure
  • Troubleshooting missing or failing MCP tools
  • Preparing a server that requires sign-in
  • Explaining repository server approval

Files included (1)

  • SKILL.md3.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.json in 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 with tool_search first), direct (a few always-useful tools), or hidden. codemode is treated as deferred.
  • Prefer the user-level file for personal servers; only put a server in .pi/mcp.json when 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\"" }
    }
  }
}
  • /readonly is GitHub's documented read-only mode (same as an X-MCP-Readonly: true header). Use https://api.githubcopilot.com/mcp/ only when the user asks for tools that change data.
  • The header command runs each time a chat connects. While gh is logged out it fails instead of sending an empty token; the user runs gh auth login in 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 a deferred server, call tool_search to 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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Helps an agent ask focused questions when a workflow needs user decisions. It groups independent questions into rounds, frames choices as visible outcomes, and explains how to continue when answers are skipped or interactive questions are unavailable.

  • Gathering scope and behavior decisions for a feature
  • Clarifying choices that depend on earlier answers
  • Confirming an inference with clear options
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

brainstorming

FreeSummary

Clarify the product goal and technical choices before a feature, behavior change, or bug fix is built. The workflow records an agreed task specification, guides implementation against it, and updates durable project specs when the work lands.

  • Clarifying goals before building a feature
  • Agreeing on behavior changes before coding
  • Investigating and planning a bug fix
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

Route new project setup, pull request lifecycle work, and product changes such as features or bug fixes to the workflow that governs them. It also identifies when a request needs no workflow, so routine questions and nonbehavioral edits can proceed directly.

  • Choosing a workflow for a new project
  • Routing a feature or bug fix
  • Handling pull request checks or review feedback
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

Build a draft specification graph for an existing codebase that has no specs. Survey its guidance files, documentation, manifests, and code; infer project purpose and module boundaries, adopt suitable existing design documents, and validate the resulting graph for review.

  • Creating initial specs for an undocumented codebase
  • Mapping modules and their dependencies
  • Turning existing architecture documents into specs
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

Routes project setup to the appropriate workflow by checking whether specs and source code already exist. It sends an empty workspace with a new idea toward a requirements document, or an existing codebase toward an initial spec graph, and offers review when specs are already present.

  • Setting up a project with no existing specifications
  • Routing a new idea to a requirements workflow
  • Preparing initial specs for an existing codebase
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

shipping-a-pr

FreeSummary

Create and maintain pull requests for finished work. The workflow can sync a branch, update PR details or screenshots, report checks, monitor CI when asked, and address review comments while confirming the latest Git and GitHub state.

  • Opening a pull request for finished changes
  • Syncing a PR branch with its base
  • Updating a PR title, body, or screenshots
JetBrains/thinkrail1.8KUpdated Oct 26, 2026

See all skills by JetBrains

Report a problem with this skill