{"id":48894160,"url":"https://github.com/rice-awa/mc-mcp-server","last_synced_at":"2026-04-16T10:05:28.188Z","repository":{"id":296566077,"uuid":"993806612","full_name":"rice-awa/mc-mcp-server","owner":"rice-awa","description":"使用python构建的基于WebSocket和mcp-server的minecraft bedrock  AIAgent服务器","archived":false,"fork":false,"pushed_at":"2025-06-09T05:05:43.000Z","size":219,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-09T05:25:56.048Z","etag":null,"topics":["aiagent","deepseek","gpt","llm","mcbe","mcp-server","minecraft","python","scriptapi","websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rice-awa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-31T15:07:26.000Z","updated_at":"2025-06-09T05:06:16.000Z","dependencies_parsed_at":"2025-06-01T04:14:48.863Z","dependency_job_id":"4a3c075f-e68a-4726-9dd6-a38b082b7acb","html_url":"https://github.com/rice-awa/mc-mcp-server","commit_stats":null,"previous_names":["rice-awa/mc-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rice-awa/mc-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rice-awa%2Fmc-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rice-awa%2Fmc-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rice-awa%2Fmc-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rice-awa%2Fmc-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rice-awa","download_url":"https://codeload.github.com/rice-awa/mc-mcp-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rice-awa%2Fmc-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiagent","deepseek","gpt","llm","mcbe","mcp-server","minecraft","python","scriptapi","websocket"],"created_at":"2026-04-16T10:05:28.117Z","updated_at":"2026-04-16T10:05:28.181Z","avatar_url":"https://github.com/rice-awa.png","language":"Python","readme":"# Minecraft MCP服务器文档索引\n\n## 项目概述\n\nMinecraft MCP服务器是一个集成系统，由两个核心组件组成：AIAgent(MCP-server)负责管理AI工具和处理LLM交互，以及基于WebSocket和脚本API的MC服务器负责处理游戏交互。系统支持两种请求路径：外部MCP客户端调用和游戏内聊天监听。\n\n## 文档目录\n\n### 1. 项目需求文档\n\n- [项目需求描述文档 (PRD)](/docs/prd/pr.md) - 详细描述项目的核心功能、请求路径、用户交互流程和验收标准\n\n### 2. 技术规范文档\n\n- [技术架构文档](/docs/prd/technical_architecture.md) - 描述系统的整体架构、核心组件和技术栈\n- [WebSocket通信规范](/docs/prd/websocket_spec.md) - 定义客户端与服务器之间的WebSocket通信协议和脚本API集成\n- [MCP集成规范](/docs/prd/mcp_integration.md) - 说明如何集成Model Context Protocol标准和两种请求路径\n\n### 3. 外部参考文档\n\n- [MCP Python SDK](/docs/MCP_PYTHON_SDK.md) - Model Context Protocol的Python实现参考\n- [Minecraft脚本API文档](https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/) - Minecraft脚本API官方文档\n- [MCP客户端示例](/docs/mcp_client_example.md) - 如何使用外部MCP客户端与服务器通信的示例\n\n## 系统组件\n\n1. **AIAgent (mc-server)** - 基于WebSocket和脚本API的服务器，处理游戏交互\n2. **MCP服务器** - 负责管理AI工具和处理LLM交互，通过MCP前端服务器实现外部MCP客户端的访问\n\n## 请求路径\n\n1. **外部MCP客户端路径** - 外部MCP客户端通过AIAgent与Minecraft交互\n2. **游戏内聊天路径** - 玩家通过游戏内聊天触发AIAgent\n\n## 快速入门\n\n1. 阅读[项目需求描述文档](/docs/prd/pr.md)了解项目概况\n2. 参考[技术架构文档](/docs/prd/technical_architecture.md)了解系统设计\n3. 查看[WebSocket通信规范](/docs/prd/websocket_spec.md)了解通信协议和脚本API集成\n4. 学习[MCP集成规范](/docs/prd/mcp_integration.md)了解LLM集成方式和请求路径\n\n## 项目结构规范\n\n```\nmc-mcp-server/\n├── server/\n│   ├── __init__.py\n│   ├── mc_server.py       # WebSocket服务器实现\n│   ├── agent_server.py      # Agent服务器实现\n│   └── utils/\n│       ├── __init__.py\n│       ├── auth.py        # 认证相关工具\n│       ├── llm.py         # 大语言模型调用工具\n│       └── logging.py     # 日志工具\n│\n├── resources/             # MCP资源定义\n│   ├── __init__.py\n│   ├── player.py\n│   └── world.py\n├── tools/                 # MCP工具定义\n│   ├── __init__.py\n│   ├── commands.py\n│   └── messages.py\n├── config/                # 配置文件\n│   ├── default.json\n│   └── production.json\n├── tests/                 # 测试目录\n│   ├── __init__.py\n│   ├── test_mc_server.py\n│   └── test_mcp_server.py\n├── docs/                  # 文档目录\n├── main.py                # 主入口文件\n├── requirements.txt       # 依赖声明\n└── README.md              # 项目说明\n\n```\n\n## 开发指南\n\n1. 安装依赖:\n   ```\n   pip install -r requirements.txt\n   ```\n2. 设置环境变量:\n   ```\n   export DEEPSEEK_API_KEY=your_api_key\n   ```\n3. 启动MC服务器:\n\n  **使用uv (推荐)**\n\n- 安装uv\n\n```python\npip install uv\n```\n\n- 使用uv运行\n\n```python\nuv run main.py --full --mcp\n```\n\n- 调试模式（记录WebSocket数据包）\n\n```python\nuv run main.py --full --mcp --debug\n```\n\n- 直接运行\n\n```python\npython main.py --full --mcp\n```\n\n- 调试模式\n\n```python\npython main.py --full --mcp --debug\n```\n\n4. 连接Minecraft客户端到MC服务器(默认端口8080)\n5. (可选)连接外部mcp客户端(http://0.0.0.0:8000/sse)\n\n## 调试与日志\n\n服务器提供了调试模式和增强的日志功能，帮助开发者诊断和解决问题：\n\n- **调试模式**：使用 `--debug` 参数启动服务器，记录所有WebSocket数据包\n- **日志文件**：日志自动保存在 `logs` 目录下\n  - 主服务器日志：`logs/server_YYYYMMDD-HHMMSS.log`\n  - WebSocket数据包日志：`logs/packets/packets_YYYYMMDD-HHMMSS.log`\n\n详细信息请参阅 [调试模式和日志功能文档](/docs/DEBUG_MODE.md)。\n\n## 贡献指南\n\n1. 遵循项目的代码风格和架构设计\n2. 提交前确保代码通过测试\n3. 更新相关文档以反映代码变更\n\n## 版本历史\n\n## 许可信息\n\n- 本项目以[MIT](./LICENSE)开源\n- 其他项目许可证见[LICENSES](/licenses/mcp-python-sdk-LICENSE)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frice-awa%2Fmc-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frice-awa%2Fmc-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frice-awa%2Fmc-mcp-server/lists"}