# Xrk MCP

> Xrk MCP is an Agent Skill for agent building published in the sunflowermm/XRK-AGT repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

当你需要理解或扩展 MCP 工具（Model Context Protocol）、工具注册/分组/远程 MCP 连接与 LLM tool calling 的关系时使用。

- Skill name: `xrk-mcp`
- Category: [Agent Building](https://www.openparable.com/skill/agent-building/1)
- Source: https://github.com/sunflowermm/XRK-AGT/blob/HEAD/.claude/skills/xrk-mcp/SKILL.md
- Repository: sunflowermm/XRK-AGT (144 GitHub stars when collected)

## SKILL.md

## 文档与代码

`docs/mcp-guide.md`、`docs/mcp-config-guide.md`、`core/system-Core/http/mcp.js`、`commonconfig/system.js`（`aistream.mcp`）

## 要点

- 工作流内 `registerMCPTool` → `MCPToolAdapter` → OpenAI tools。
- v3 / LLMFactory 的 tool calling 最终执行 MCP 工具。
- 远程 MCP：`aistream.mcp.remote`（stdio/HTTP/SSE 等）。

## Node 26

- MCP HTTP/远程连接走全局 `fetch` + `AbortSignal.timeout`；代理见 `proxy-utils.js`。
- 工具 handler 判错用 `Error.isError` / `normalizeError`（skill **`xrk-node-runtime`**）。

---

Source: https://www.openparable.com/skill/agent-building/xrk-mcp (OpenParable). Cite the canonical URL above.
