NetEase ModSDK MCP Server logo

NetEase ModSDK MCP Server

Community
MCNeteaseDevs

为 AI 编程助手提供 ModSDK 3.9 / BE 1.21.120 的版本化开发指导、官方文档检索、产物生成与统一校验。运行时完全离线,只读取仓库内快照。

PublisherMCNeteaseDevs
Repositorymodsdk_mcp_server
LanguagePython
Forks
15
Stars
96
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseGPL-3.0
Links
  • Connect tools to AI workflows

    NetEase ModSDK MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    96 stars and 15 forks from the linked repository.

🎮 NetEase ModSDK MCP Server

Model Context Protocol Server for 我的世界中国版(网易)ModSDK 开发

为 AI 编程助手提供 ModSDK 3.9 / BE 1.21.120 的版本化开发指导、官方文档检索、产物生成与统一校验。运行时完全离线,只读取仓库内快照。


✨ 核心能力

能力说明
🔍 智能文档检索模糊搜索、驼峰分词、中文搜索,覆盖 API 接口 & 事件文档
📝 代码生成自动生成符合网易规范的 Mod 项目、Server/Client System、自定义物品/方块/实体
🔧 工具 & 武器生成一键生成剑、镐、斧、锹、锄、弓、盔甲、食物、可投掷物品 JSON
📋 配方 & 战利品表生成有序/无序合成配方、熔炉配方、战利品表、生成规则
🔬 代码审查检测 Python 2.7 兼容性、客户端/服务端混用、性能反模式
🧭 版本化指导按目标、领域和端侧选择规则,并返回来源等级与 3.9 证据边界
📚 组件百科查询物品/方块/实体/网易特有组件的用法和配置
⚡ 最佳实践从版本化注册表投影官方规则、MCP 策略与带边界的工程建议

🚀 快速开始

前置要求

  • Python ≥ 3.10
  • pip(Python 包管理器)

1. 安装依赖

bash
cd "<PROJECT_ROOT>"
pip install -r requirements.txt

2. 选择你的 AI 客户端进行配置

通用说明:所有客户端统一使用 start_mcp.py 绝对路径启动,无需 cwd 参数,兼容性最好。 请将下方示例中的 <PROJECT_ROOT> 替换为你本机的项目根目录。

编辑配置文件:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
json
{
  "mcpServers": {
    "modsdk-mcp-server": {
      "command": "python",
      "args": ["<PROJECT_ROOT>/start_mcp.py"]
    }
  }
}

保存后重启 Claude Desktop。

Claude Code 不支持 cwd 参数,使用 start_mcp.py 绝对路径即可:

bash
claude mcp add "modsdk-mcp-server" -- python "<PROJECT_ROOT>/start_mcp.py"

或手动编辑 ~/.claude/settings.json:

json
{
  "mcpServers": {
    "modsdk-mcp-server": {
      "command": "python",
      "args": ["<PROJECT_ROOT>/start_mcp.py"]
    }
  }
}

在项目根目录创建 .cursor/mcp.json(Cursor)或 .vscode/mcp.json(VS Code):

json
{
  "servers": {
    "modsdk-mcp-server": {
      "command": "python",
      "args": ["<PROJECT_ROOT>/start_mcp.py"]
    }
  }
}

⚠️ 常见问题(VS Code / Cursor)

如果在 VS Code 或 Cursor 中启动 MCP 时出现以下错误:

Error: tool parameters array type must have items

原因:

MCP 工具的参数 schema 中,某些字段声明为 "type": "array",但没有提供 "items" 字段。

根据 JSON Schema 规范,所有数组类型必须定义 "items",否则在严格校验环境(如 VS Code / Cursor)中会报错。

解决方法:

修改对应工具的参数定义,例如:

❌ 错误写法:

json
{
  "type": "array"
}

✅ 正确写法:

json
{
  "type": "array",
  "items": {
    "type": "object"
  }
}

启动 SSE 服务:

bash
python "<PROJECT_ROOT>/start_mcp.py" --sse
# 默认监听 http://0.0.0.0:8000

在客户端中配置:

json
{
  "mcpServers": {
    "modsdk-mcp-server": {
      "transport": "sse",
      "url": "http://localhost:8000/sse"
    }
  }
}

3. 验证连接

在 AI 助手中输入以下测试指令:

搜索 GetEngineCompFactory 的用法

如果返回了 API 文档内容,说明 MCP Server 已成功连接。


📖 MCP 工具一览

文档查询

工具描述
search_docs搜索文档(支持模糊匹配、驼峰分词、中文)
search_api搜索结构化 API/事件索引
get_api_detail读取同名多端 API/事件的签名、备注、示例和来源元数据
get_document获取指定文档完整内容
get_document_section获取文档指定章节
get_document_structure获取文档目录结构
list_documents列出所有可用文档
reload_documents重新加载文档索引
get_development_guidance按目标、领域、端侧和版本返回最相关规则与验证建议

代码生成

工具描述
generate_mod_project生成完整 Mod 项目模板(含入口、服务端、客户端)
generate_server_system生成服务端系统代码
generate_client_system生成客户端系统代码
generate_event_listener生成事件监听器代码
generate_custom_command生成自定义命令代码
generate_custom_item生成自定义物品代码和 JSON
generate_custom_block生成自定义方块代码和 JSON

JSON 生成

工具描述
generate_item_json生成物品 JSON(行为包 + 资源包)
generate_block_json生成方块 JSON
generate_recipe_json生成合成配方 JSON(有序/无序/熔炉)
generate_entity_json生成实体 JSON(行为包 + 资源包)
generate_loot_table_json生成战利品表 JSON
generate_spawn_rules_json生成生成规则 JSON

一键生成工具 & 武器

工具描述
generate_sword_json自定义剑(伤害、耐久、附魔、修复)
generate_pickaxe_json自定义镐(挖掘速度、耐久)
generate_axe_json自定义斧(伤害、挖掘速度)
generate_shovel_json自定义锹
generate_hoe_json自定义锄
generate_bow_json自定义弓(蓄力时间、耐久)
generate_food_json自定义食物(饥饿值、饱和度、药水效果)
generate_armor_json自定义盔甲(护甲值、槽位)
generate_throwable_json自定义可投掷物品

代码审查 & 最佳实践

工具描述
review_code统一审查显式传入的 Python/JSON 产物
get_best_practices获取注册表规则的旧接口兼容投影
search_components搜索基岩版组件
get_component_details获取组件详细信息
list_components列出所有可用组件
get_architecture_pattern获取并校验核心架构示例

📂 项目结构

ModSDK MCP Server/
├── modsdk_mcp/                     # MCP Server 核心模块
│   ├── __init__.py                 # 包标识
│   ├── __main__.py                 # python -m 入口
│   ├── server.py                   # MCP Server 主程序(工具注册、请求处理)
│   ├── docs_reader.py              # 文档读取与搜索引擎
│   ├── standards.py                # 严格加载版本化规范注册表
│   ├── guidance.py                 # 规则筛选与稳定 guidance JSON
│   ├── validation.py               # Python/JSON 统一产物校验
│   ├── knowledge_base.py           # 组件知识库 & 最佳实践兼容投影
│   └── templates.py                # 代码模板 & JSON 生成器
├── docs/                           # ModSDK 官方文档(Markdown)
│   ├── 接口/                       #   API 接口文档
│   ├── 事件/                       #   事件文档
│   ├── 枚举值/                     #   枚举值文档
│   └── 更新信息/                   #   版本更新日志
├── standard/registry/              # 唯一规范源、版本配置与白名单快照
├── skills/                         # 兼容说明;不作为运行时规范源
├── start_mcp.py                    # Agent专用启动入口
├── .mcp.json                       # MCP 配置
├── requirements.txt                # Python 依赖
├── Dockerfile                      # Docker 镜像配置
├── docker-compose.yml              # Docker Compose 配置
├── DEPLOYMENT.md                   # 详细部署指南
└── README.md                       # 本文件

⚙️ 环境变量

变量名说明默认值
MODSDK_DOCS_PATHModSDK 文档目录路径./docs
MCP_HOSTSSE 模式监听地址0.0.0.0
MCP_PORTSSE 模式监听端口8000

🎯 内置代码规范

MCP Server 的生成器统一经过结构感知校验。只有可确定证明的严重违规以及项目明确禁止的字符串前缀会阻断;性能、JSON UI 和生命周期工程建议默认告警或人工确认。

规范说明
客户端/服务端分离ServerSystem 禁止 import clientApi,反之亦然
Python 2.7 兼容禁止真实 u/U/ur/ru 字符串前缀及 Python 3 专属语法,文件含 UTF-8 声明
精确 import 白名单使用仓库内 456 项官方快照;项目模块须显式声明
上下文性能告警仅在循环、Tick 或高频事件上下文充分时提示刷屏、重复创建或降频
点对点通信优先 NotifyToClient,慎用 BroadcastToAllClient
JSON 格式档基础物品 1.10;方块支持 legacy_1_10、scalar_1_16、modern_1_19_20

standard/registry/ 是唯一规范源。优先使用 get_development_guidance;get_best_practices 仅保留兼容投影。


📝 使用示例

生成 Mod 项目

帮我创建一个名为"传送系统"的 Mod,ID 为 teleport_sys,功能是让玩家通过命令传送到指定位置

生成自定义钻石剑

帮我生成一把自定义钻石剑,命名空间 mymod,ID 为 diamond_blade,攻击力 10,耐久 500

代码审查

帮我审查这段代码:

def OnTick(self):
    import mod.server.extraServerApi as serverApi
    comp = serverApi.GetEngineCompFactory().CreatePos(self.playerId)
    pos = comp.GetPos()

查询组件用法

搜索 minecraft:food 组件的详细用法

Installation

TypingMind
{
  "mcpServers": {
    "modsdk-mcp-server": {
      "command": "python",
      "args": [
        "-m",
        "modsdk_mcp"
      ]
    }
  }
}

Use NetEase ModSDK MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once NetEase ModSDK MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add NetEase ModSDK MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the NetEase ModSDK MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "modsdk-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the NetEase ModSDK MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the NetEase ModSDK MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use NetEase ModSDK MCP Server to help me with this task?
NetEase ModSDK MCP Server
Sure. I read it.
Here is what I found using NetEase ModSDK MCP Server.

Option 2: Add an MCP server URL

Use this when NetEase ModSDK MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for NetEase ModSDK MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the NetEase ModSDK MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the NetEase ModSDK MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the NetEase ModSDK MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use NetEase ModSDK MCP Server to help me with this task?
NetEase ModSDK MCP Server
Sure. I read it.
Here is what I found using NetEase ModSDK MCP Server.

Frequently asked questions

What is the NetEase ModSDK MCP Server MCP server used for?

NetEase ModSDK MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use NetEase ModSDK MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use NetEase ModSDK MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use NetEase ModSDK MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With NetEase ModSDK MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect NetEase ModSDK MCP Server MCP to TypingMind?

NetEase ModSDK MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does NetEase ModSDK MCP Server MCP provide in TypingMind?

NetEase ModSDK MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use NetEase ModSDK MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If NetEase ModSDK MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇