Chuyển đến nội dung
Skillpedia
Trình kết nối (MCP)7.1k · #13497

managing-mcp-servers

Skill này làm gì

Skill này cho AI cách thiết lập các máy chủ MCP, kết nối các công cụ AI với dịch vụ bên ngoài, bên trong ứng dụng ThinkRail. Phù hợp với người muốn kết nối các công cụ như tài liệu hoặc trình duyệt với trợ lý của họ.

Khi nào nên dùng

  • ✓Khi bạn muốn thêm một dịch vụ bên ngoài, như công cụ tài liệu hoặc trình duyệt, vào trợ lý của bạn.
  • ✓Khi một công cụ từ máy chủ MCP bị thiếu, cần đăng nhập hoặc bị lỗi.
  • ✓Khi bạn muốn bật hoặc tắt một máy chủ MCP, hoặc gỡ bỏ một máy chủ.

Liên kết skill

https://github.com/JetBrains/thinkrail/blob/main/packages/server/skills/managing-mcp-servers/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/JetBrains/thinkrail/blob/main/packages/server/skills/managing-mcp-servers/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kết nối trợ lý của tôi với máy chủ tài liệu của công ty, và cho tôi biết nó có cần tôi đăng nhập không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI chỉnh sửa tệp cấu hình của máy chủ, chỉ bạn đến trang cài đặt ThinkRail để phê duyệt và đăng nhập, và không bao giờ ghi bí mật vào tệp.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.
Câu hỏi thường gặp

Tôi lưu cài đặt máy chủ MCP ở đâu?

Trong một tệp cấp người dùng dùng cho mọi dự án, hoặc trong tệp dự án mà bạn phê duyệt trong Cài đặt.

Mật khẩu của tôi có được lưu trong tệp không?

Không. Bí mật được đọc từ biến môi trường hoặc một bước đăng nhập, không bao giờ ghi vào tệp.

Tôi có cần phê duyệt máy chủ trước khi nó chạy không?

Với tệp dự án thì có. Máy chủ không chạy cho đến khi bạn phê duyệt trong Cài đặt, và mọi thay đổi sau đó đều cần phê duyệt lại.

Chi tiết

Mô tả gốc của tác giả

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.

repo: JetBrains/thinkrail

Độ phổ biến

Sao GitHub
7.1k
Vị trí xếp hạng
#13497
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự