Skip to main content
Glama
MCNeteaseDevs

NetEase ModSDK MCP Server

🎮 NetEase ModSDK MCP Server

Model Context Protocol Server for Minecraft China Edition (NetEase) ModSDK development

Provides AI coding assistants with versioned development guidance, official documentation retrieval, artifact generation, and unified validation for ModSDK 3.9 / BE 1.21.120. Runs fully offline at runtime, reading only in-repo snapshots.


✨ Core Capabilities

Capability

Description

🔍 Smart Documentation Search

Fuzzy search, camelCase tokenization, Chinese search, covering API interfaces & event documentation

📝 Code Generation

Automatically generates NetEase-compliant Mod projects, Server/Client Systems, custom items/blocks/entities

🔧 Tool & Weapon Generation

One-click generation of sword, pickaxe, axe, shovel, hoe, bow, armor, food, throwable item JSON

📋 Recipe & Loot Table

Generates ordered/unordered crafting recipes, furnace recipes, loot tables, spawn rules

🔬 Code Review

Detects Python 2.7 compatibility, client/server misuse, performance anti-patterns

🧭 Versioned Guidance

Selects rules by goal, domain, and side, returning source confidence levels and 3.9 evidence boundaries

📚 Component Encyclopedia

Queries usage and configuration of item/block/entity/NetEase-specific components

Best Practices

Projects official rules, MCP policies, and bounded engineering recommendations from the versioned registry


Related MCP server: MCP SpecNavigator

🚀 Quick Start

Prerequisites

  • Python ≥ 3.10

  • pip (Python package manager)

1. Install Dependencies

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

2. Configure Your AI Client

General Notes: All clients uniformly launch via the absolute path of start_mcp.py, no cwd parameter needed, best compatibility. Replace <PROJECT_ROOT> in the examples below with the project root directory on your machine.

Edit the configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

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

Save and restart Claude Desktop.

Claude Code does not support the cwd parameter; use the absolute path of start_mcp.py:

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

Or manually edit ~/.claude/settings.json:

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

Create .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code) in the project root:

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

⚠️ Common Issue (VS Code / Cursor)

If you encounter the following error when starting MCP in VS Code or Cursor:

Error: tool parameters array type must have items

Cause:

In the parameter schema of MCP tools, some fields are declared as "type": "array" but do not provide an "items" field.

According to the JSON Schema specification, all array types must define "items"; otherwise, strict validation environments (such as VS Code / Cursor) will report an error.

Solution:

Modify the parameter definitions of the corresponding tools, for example:

❌ Incorrect:

{
  "type": "array"
}

✅ Correct:

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

Start the SSE service:

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

Configure in the client:

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

3. Verify Connection

Enter the following test command in the AI assistant:

搜索 GetEngineCompFactory 的用法

If API documentation content is returned, the MCP Server has connected successfully.


📖 MCP Tools Overview

Documentation Query

Tool

Description

search_docs

Search documentation (supports fuzzy matching, camelCase tokenization, Chinese)

search_api

Search structured API/event index

get_api_detail

Read signatures, notes, examples, and source metadata of same-name multi-side APIs/events

get_document

Get the full content of a specified document

get_document_section

Get a specified section of a document

get_document_structure

Get the document table of contents structure

list_documents

List all available documents

reload_documents

Reload the document index

get_development_guidance

Return the most relevant rules and validation suggestions by goal, domain, side, and version

Code Generation

Tool

Description

generate_mod_project

Generate a complete Mod project template (including entry, server, client)

generate_server_system

Generate server system code

generate_client_system

Generate client system code

generate_event_listener

Generate event listener code

generate_custom_command

Generate custom command code

generate_custom_item

Generate custom item code and JSON

generate_custom_block

Generate custom block code and JSON

JSON Generation

Tool

Description

generate_item_json

Generate item JSON (behavior pack + resource pack)

generate_block_json

Generate block JSON

generate_recipe_json

Generate crafting recipe JSON (ordered/unordered/furnace)

generate_entity_json

Generate entity JSON (behavior pack + resource pack)

generate_loot_table_json

Generate loot table JSON

generate_spawn_rules_json

Generate spawn rules JSON

One-Click Tool & Weapon Generation

Tool

Description

generate_sword_json

Custom sword (damage, durability, enchantments, repair)

generate_pickaxe_json

Custom pickaxe (mining speed, durability)

generate_axe_json

Custom axe (damage, mining speed)

generate_shovel_json

Custom shovel

generate_hoe_json

Custom hoe

generate_bow_json

Custom bow (draw time, durability)

generate_food_json

Custom food (hunger, saturation, potion effects)

generate_armor_json

Custom armor (armor value, slots)

generate_throwable_json

Custom throwable item

Code Review & Best Practices

Tool

Description

review_code

Unified review of explicitly passed Python/JSON artifacts

get_best_practices

Legacy-compatible projection of registry rules

search_components

Search Bedrock components

get_component_details

Get detailed component information

list_components

List all available components

get_architecture_pattern

Get and validate core architecture examples


📂 Project Structure

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                       # 本文件

⚙️ Environment Variables

Variable Name

Description

Default Value

MODSDK_DOCS_PATH

ModSDK documentation directory path

./docs

MCP_HOST

SSE mode listen address

0.0.0.0

MCP_PORT

SSE mode listen port

8000


🎯 Built-in Code Standards

The MCP Server's generators uniformly pass through structure-aware validation. Only provably severe violations and string prefixes explicitly prohibited by the project will block; performance, JSON UI, and lifecycle engineering suggestions default to warnings or manual confirmation.

Standard

Description

Client/Server Separation

ServerSystem is forbidden from importing clientApi, and vice versa

Python 2.7 Compatibility

Real u/U/ur/ru string prefixes and Python 3-only syntax are forbidden; files must contain a UTF-8 declaration

Exact Import Whitelist

Uses the 456 official snapshots in the repo; project modules must be explicitly declared

Contextual Performance Warnings

Only prompts about spam, repeated creation, or rate reduction when the loop, Tick, or high-frequency event context is sufficient

Point-to-Point Communication

Prefer NotifyToClient, use BroadcastToAllClient with caution

JSON Format Tiers

Base items 1.10; blocks support legacy_1_10, scalar_1_16, modern_1_19_20

standard/registry/ is the single source of truth for standards. Prefer get_development_guidance; get_best_practices only retains a compatibility projection.


📝 Usage Examples

Generate a Mod Project

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

Generate a Custom Diamond Sword

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

Code Review

帮我审查这段代码:

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

Query Component Usage

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MCNeteaseDevs/modsdk_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server