连接克劳德

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

连接克劳德代码

MCP 服务器使用 Claude Code 本身支持的 Streamable HTTP 传输。最简单的路径是claude mcp add命令:使用-s选择范围:local(默认,仅此项目),project(通过已提交的.mcp.json共享)或user(本机上的所有项目)。对于个人设置,user通常是用户想要的:

连接克劳德桌面

两个选项: A — 本机自定义连接器(首选,如果用户的 Claude 桌面有)。在设置 → 连接器中,添加具有 URL http://<host>:8765/mcp 和标头 Authorization: Bearer <BRIDGE_CLIENT_TOKEN> 的自定义连接器。 B — 通过 mcp-remote 适配器。编辑 Claude Desktop 的配置文件:

验证连接

注册的服务器不是一个可用的服务器 - 通过实时调用进行确认:确保至少有一名玩家在世界上(许多工具的作用与玩家或世界原点相关)。致电mc_world_get_info(或mc_server_get_status)。成功的响应——时间、天气、尺寸——意味着整个链条已经启动:克劳德→

总结一下

一旦mc_world_get_info干净地返回,设置就完成了: [ ] minecraft-bedrock向Claude注册了MCP服务器。 [ ] mc_* 工具可见。 [ ] 对抗世界的现场测试通话成功。告诉用户他们已经完成了——所有四个阶段都已完成。建议后续步骤:

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Windows
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 读取环境变量
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Connect Claude to the Minecraft world (Step 4 of 4)

This is the **final** phase of the Minecraft Bedrock MCP setup. It assumes
Phase 3 (`setup-mcp-server`) is done: the MCP server is running and its bridge
handshake with the world succeeded.

Before starting, get two things from the user:

- **The `/mcp` URL** — `http://<host>:<port>/mcp`, e.g.
  `http://localhost:8765/mcp`. Use `localhost` only if Claude runs on the same
  machine as the MCP server; otherwise use the host's LAN IP or hostname. If
  the MCP server uses TLS, the scheme is `https`.
- **The `BRIDGE_CLIENT_TOKEN`** — the *first* secret from Phase 3 (the client
  token, **not** the agent token).

> **Name the server `minecraft-bedrock`.** The builder agent and skills in this
> plugin expect MCP tools under that name (`mcp__minecraft-bedrock__mc_*`).
> Use exactly `minecraft-bedrock` as the server name below.

Ask the user which Claude they're connecting: **Claude Code** (CLI / IDE
extension) or **Claude Desktop**. Follow the matching section.

## Connecting Claude Code

The MCP server speaks the **Streamable HTTP** transport, which Claude Code
supports natively. The simplest path is the `claude mcp add` command:

```sh
claude mcp add --transport http minecraft-bedrock "http://<host>:8765/mcp" \
  --header "Authorization: Bearer <BRIDGE_CLIENT_TOKEN>"
```

Pick a scope with `-s`: `local` (default, this project only), `project`
(shared via a committed `.mcp.json`), or `user` (all projects on this
machine). For a personal setup, `user` is usually what the user wants:
`-s user`.

**Do not commit the token.** If the user wants project scope, write the
`.mcp.json` with the token pulled from an environment variable instead of
inlining it. This plugin ships `.mcp.json.example` in its repo root showing
that pattern:

```json
{
  "mcpServers": {
    "minecraft-bedrock": {
      "type": "http",
      "url": "${MINECRAFT_MCP_URL:-http://localhost:8765/mcp}",
      "headers": { "Authorization": "Bearer ${MINECRAFT_MCP_TOKEN}" }
    }
  }
}
```

With that, the user sets `MINECRAFT_MCP_URL` and `MINECRAFT_MCP_TOKEN` in their
environment and the committed file stays secret-free.

After adding it, the user restarts Claude Code (or reloads the window in the
IDE extension). Confirm the server shows up with `claude mcp list` or
`/mcp` — it should report `minecraft-bedrock` as connected.

## Connecting Claude Desktop

Two options:

**A — Native custom connector (preferred, if the user's Claude Desktop has
it).** In **Settings → Connectors**, add a custom connector with the URL
`http://<host>:8765/mcp` and a header `Authorization: Bearer <BRIDGE_CLIENT_TOKEN>`.

**B — Via the `mcp-remote` adapter.** Edit Claude Desktop's config file:

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`

Add under `mcpServers`:

```json
{
  "mcpServers": {
    "minecraft-bedrock": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://<host>:8765/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer <BRIDGE_CLIENT_TOKEN>"
      }
    }
  }
}
```

The token goes through the `AUTH_HEADER` env var so its space isn't mangled by
argument parsing. Then **fully restart** Claude Desktop — the `mc_*` tools
appear under the tools (🔌) menu once it reconnects.

## Verify the connection

A registered server isn't a working one — confirm with a **live call**:

1. Make sure at least one player is in the world (many tools act relative to
   players or the world origin).
2. Call **`mc_world_get_info`** (or `mc_server_get_status`). A successful
   response — time, weather, dimensions — means the full chain is up: Claude →
   MCP server → bridge → behavior pack → world.
3. As a visible smoke test, call `mc_world_send_message` with a short greeting
   and confirm the user sees it in the in-game chat.

If a call fails:

- **Auth / 401** — wrong token, or the agent token was used instead of the
  client token. The client token is the *first* secret from Phase 3.
- **Connection refused / timeout** — MCP server not running, wrong host:port,
  or a firewall between Claude and the host.
- **Tools connect but calls hang or error about the bridge** — the world side
  is down: re-check the Phase 3 handshake (BDS running, behavior pack active,
  `secrets.json` token).

## Wrap up

Once `mc_world_get_info` returns cleanly, the setup is complete:

- [ ] `minecraft-bedrock` MCP server registered with Claude.
- [ ] `mc_*` tools visible.
- [ ] A live test call succeeded against the world.

Tell the user they're done — all four phases are complete. Suggest next steps:

- Try a simple prompt: *"What's the time and weather? Set it to clear midday."*
- Try building: *"Build a small stone-brick house near the nearest player."*
  Claude works through the `mc_*` tools to plan and place blocks in the world.

---
> Source: [chapmanjw/minecraft-bedrock-claude-plugin](https://github.com/chapmanjw/minecraft-bedrock-claude-plugin) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。