Skip to main content
Glama
MCNeteaseDevs

NetEase ModSDK MCP Server

🎮 NetEase ModSDK MCP Server

Model Context Protocol Server for Minecraft China (NetEase) ModSDK Development

Provides document retrieval, code generation, and code review capabilities for AI programming assistants (Claude Desktop, Cursor, etc.), significantly improving NetEase ModSDK development efficiency.


✨ Core Capabilities

Capability

Description

🔍 Intelligent Doc Retrieval

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

📝 Code Generation

Automatically generates Mod projects, Server/Client Systems, and custom items/blocks/entities compliant with NetEase standards

🔧 Tool & Weapon Generation

One-click generation of JSON for swords, pickaxes, axes, shovels, hoes, bows, armor, food, and throwable items

📋 Recipes & Loot Tables

Generates shaped/shapeless recipes, furnace recipes, loot tables, and spawn rules

🔬 Code Review

Detects Python 2.7 compatibility issues, client/server cross-contamination, and performance anti-patterns

📚 Component Encyclopedia

Queries usage and configuration for items, blocks, entities, and NetEase-specific components

Best Practices

Built-in official performance optimization standards, automatically applied to generated code


Related MCP server: MCP SpecNavigator

🚀 Quick Start

Prerequisites

  • Python ≥ 3.10

  • pip (Python package manager)

1. Install Dependencies

cd "D:/ModSDK MCP Server"
pip install -r requirements.txt

2. Configure Your AI Client

General Note: All clients should use the absolute path to start_mcp.py for startup. No cwd parameter is required, ensuring maximum compatibility. Please replace D:/ModSDK MCP Server in the examples below with your actual installation path.

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": ["D:/ModSDK MCP Server/start_mcp.py"]
    }
  }
}

Save and restart Claude Desktop.

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

claude mcp add "modsdk-mcp-server" -- python "D:/ModSDK MCP Server/start_mcp.py"

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

{
  "mcpServers": {
    "modsdk-mcp-server": {
      "command": "python",
      "args": ["D:/ModSDK MCP Server/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": ["D:/ModSDK MCP Server/start_mcp.py"]
    }
  }
}

⚠️ Common Issues (VS Code / Cursor)

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

Error: tool parameters array type must have items

Reason:

In the parameter schema of the MCP tool, some fields are declared as "type": "array" but lack the "items" field.

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

Solution:

Modify the parameter definition of the corresponding tool, for example:

❌ Incorrect:

{
  "type": "array"
}

✅ Correct:

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

Start the SSE service:

python "D:/ModSDK MCP Server/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 your AI assistant:

搜索 GetEngineCompFactory 的用法

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


📖 MCP Tool Overview

Document Query

Tool

Description

search_docs

Search documentation (supports fuzzy matching, camelCase, Chinese)

get_document

Get full content of a specified document

get_document_section

Get a specific section of a document

get_document_structure

Get the document directory structure

list_documents

List all available documents

reload_documents

Reload document index

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 recipe JSON (shaped/shapeless/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, enchantment, 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 (charge time, durability)

generate_food_json

Custom food (hunger, saturation, potion effects)

generate_armor_json

Custom armor (armor value, slot)

generate_throwable_json

Custom throwable item

Code Review & Best Practices

Tool

Description

review_code

Review code (Python 2.7 compatibility, architecture, performance)

get_best_practices

Get best practice rules

search_components

Search Bedrock Edition components

get_component_details

Get component details

list_components

List all available components

list_modsdk_events

List common events


📂 Project Structure

ModSDK MCP Server/
├── modsdk_mcp/                     # MCP Server 核心模块
│   ├── __init__.py                 # 包标识
│   ├── __main__.py                 # python -m 入口
│   ├── server.py                   # MCP Server 主程序(工具注册、请求处理)
│   ├── docs_reader.py              # 文档读取与搜索引擎
│   ├── knowledge_base.py           # 组件知识库 & 最佳实践规则
│   └── templates.py                # 代码模板 & JSON 生成器
├── docs/                           # ModSDK 官方文档(Markdown)
│   ├── 接口/                       #   API 接口文档
│   ├── 事件/                       #   事件文档
│   ├── 枚举值/                     #   枚举值文档
│   └── 更新信息/                   #   版本更新日志
├── standard/                       # 官方开发规范文档
├── skills/                         # Claude 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

MODSDK_SKILLS_PATH

Skills file directory path

./skills

MODSDK_STANDARD_PATH

Standard documentation directory path

./standard

MCP_HOST

SSE mode listening address

0.0.0.0

MCP_PORT

SSE mode listening port

8000


🎯 Built-in Code Standards

All code generated by the MCP Server automatically follows these mandatory NetEase ModSDK standards:

Standard

Description

Client/Server Separation

ServerSystem must not import clientApi, and vice versa

CompFactory Caching

CF = serverApi.GetEngineCompFactory() module-level caching

Top-level Imports

All imports must be at the top of the file; imports inside functions are prohibited

Tick Throttling

Use prime number modulo for Tick events to throttle frame rates

BlockTick Salting

Use coordinate hashing for ServerBlockEntityTickEvent

P2P Communication

Prioritize NotifyToClient, use BroadcastToAllClient with caution

Python 2.7 Compatibility

f-strings, type hints, and print() functions are prohibited

📚 See the standard/ directory or use the get_best_practices tool for the full specification.


📝 Usage Examples

Generate Mod Project

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

Generate 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 组件的详细用法

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • MCP server for GLM chat completions using Zhipu AI models via AceDataCloud

View all MCP Connectors

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