minecraft-document-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: minecraft-document-mcp
3
+ Version: 0.1.0
4
+ Summary: Minecraft Wiki 文档 MCP 服务器
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: beautifulsoup4>=4.14.3
8
+ Requires-Dist: dataclasses-json>=0.6.7
9
+ Requires-Dist: fastmcp==3.1.1
10
+ Requires-Dist: lxml>=6.0.2
11
+ Requires-Dist: markdownify>=1.2.2
12
+ Requires-Dist: requests>=2.32.5
13
+
14
+ # Minecraft Document MCP
15
+
16
+ [![Python](https://img.shields.io/badge/Python-3.12+-blue.svg)](https://www.python.org/)
17
+ [![FastMCP](https://img.shields.io/badge/FastMCP-3.1.1-green.svg)](https://github.com/jlowin/fastmcp)
18
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
19
+
20
+ 一个基于 FastMCP 框架的 Minecraft 文档 MCP 服务器,为 AI 助手提供中文 Minecraft Wiki 文档查询功能。
21
+
22
+ ## 功能特性
23
+
24
+ - **Wiki 在线查询** - 从中文 Minecraft Wiki 获取词条内容
25
+ - **分类浏览** - 获取 Wiki 首页主要分类列表
26
+ - **简介/完整内容** - 支持获取词条简介或完整内容
27
+ - **Markdown 输出** - 所有查询结果以 Markdown 格式返回
28
+ - **MCP 协议支持** - 兼容 Model Context Protocol,可集成到 Claude Desktop 等客户端
29
+
30
+ ## MCP 工具
31
+
32
+ | 工具名称 | 功能描述 |
33
+ |---------|---------|
34
+ | `search_wiki_intro` | 从 Wiki 搜索词条简介 |
35
+ | `search_wiki_full` | 从 Wiki 搜索词条完整内容 |
36
+ | `get_wiki_categories` | 获取 Wiki 首页主要分类列表 |
37
+
38
+ ## 安装
39
+
40
+ ### 环境要求
41
+
42
+ - Python 3.12+
43
+ - uv 包管理器(推荐)
44
+
45
+ ### 使用 uv 安装
46
+
47
+ ```bash
48
+ # 克隆仓库
49
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
50
+ cd minecraft-document-mcp
51
+
52
+ # 安装依赖
53
+ uv sync
54
+ ```
55
+
56
+ ### 使用 pip 安装
57
+
58
+ ```bash
59
+ # 克隆仓库
60
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
61
+ cd minecraft-document-mcp
62
+
63
+ # 创建虚拟环境
64
+ python -m venv .venv
65
+ source .venv/bin/activate # Linux/macOS
66
+ # .venv\Scripts\activate # Windows
67
+
68
+ # 安装依赖
69
+ pip install beautifulsoup4 dataclasses-json fastmcp==3.1.1 lxml markdownify requests
70
+ ```
71
+
72
+ ## 使用方法
73
+
74
+ ### 启动服务器
75
+
76
+ ```bash
77
+ # SSE 传输模式
78
+ python server.py
79
+
80
+ # 或使用 fastmcp 开发模式
81
+ fastmcp dev server.py
82
+ ```
83
+
84
+ ### 配置 Claude Desktop
85
+
86
+ 在 Claude Desktop 配置文件中添加:
87
+
88
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
89
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
90
+
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "minecraft-document": {
95
+ "command": "python",
96
+ "args": ["/path/to/minecraft-document-mcp/server.py"]
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ## 项目结构
103
+
104
+ ```
105
+ minecraft-document-mcp/
106
+ ├── server.py # MCP 服务器入口
107
+ ├── pyproject.toml # 项目配置
108
+ └── src/
109
+ └── mcp/
110
+ └── api/
111
+ ├── WikiApi.py # Wiki API 请求工具
112
+ └── WikiItems.py # 数据项定义
113
+ ```
114
+
115
+ ## 依赖
116
+
117
+ - [fastmcp](https://github.com/jlowin/fastmcp) - MCP 框架
118
+ - [requests](https://docs.python-requests.org/) - HTTP 请求库
119
+ - [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/) - HTML 解析
120
+ - [markdownify](https://github.com/matthewwithanm/python-markdownify) - HTML 转 Markdown
121
+ - [lxml](https://lxml.de/) - XML/HTML 解析后端
122
+ - [dataclasses-json](https://github.com/lidatong/dataclasses-json) - 数据类序列化
123
+
124
+ ## 许可证
125
+
126
+ [MIT License](LICENSE)
127
+
128
+ ## 相关链接
129
+
130
+ - [Minecraft Wiki](https://zh.minecraft.wiki/) - 中文 Minecraft Wiki
131
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 协议文档
132
+ - [FastMCP](https://github.com/jlowin/fastmcp) - FastMCP 框架
@@ -0,0 +1,119 @@
1
+ # Minecraft Document MCP
2
+
3
+ [![Python](https://img.shields.io/badge/Python-3.12+-blue.svg)](https://www.python.org/)
4
+ [![FastMCP](https://img.shields.io/badge/FastMCP-3.1.1-green.svg)](https://github.com/jlowin/fastmcp)
5
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+
7
+ 一个基于 FastMCP 框架的 Minecraft 文档 MCP 服务器,为 AI 助手提供中文 Minecraft Wiki 文档查询功能。
8
+
9
+ ## 功能特性
10
+
11
+ - **Wiki 在线查询** - 从中文 Minecraft Wiki 获取词条内容
12
+ - **分类浏览** - 获取 Wiki 首页主要分类列表
13
+ - **简介/完整内容** - 支持获取词条简介或完整内容
14
+ - **Markdown 输出** - 所有查询结果以 Markdown 格式返回
15
+ - **MCP 协议支持** - 兼容 Model Context Protocol,可集成到 Claude Desktop 等客户端
16
+
17
+ ## MCP 工具
18
+
19
+ | 工具名称 | 功能描述 |
20
+ |---------|---------|
21
+ | `search_wiki_intro` | 从 Wiki 搜索词条简介 |
22
+ | `search_wiki_full` | 从 Wiki 搜索词条完整内容 |
23
+ | `get_wiki_categories` | 获取 Wiki 首页主要分类列表 |
24
+
25
+ ## 安装
26
+
27
+ ### 环境要求
28
+
29
+ - Python 3.12+
30
+ - uv 包管理器(推荐)
31
+
32
+ ### 使用 uv 安装
33
+
34
+ ```bash
35
+ # 克隆仓库
36
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
37
+ cd minecraft-document-mcp
38
+
39
+ # 安装依赖
40
+ uv sync
41
+ ```
42
+
43
+ ### 使用 pip 安装
44
+
45
+ ```bash
46
+ # 克隆仓库
47
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
48
+ cd minecraft-document-mcp
49
+
50
+ # 创建虚拟环境
51
+ python -m venv .venv
52
+ source .venv/bin/activate # Linux/macOS
53
+ # .venv\Scripts\activate # Windows
54
+
55
+ # 安装依赖
56
+ pip install beautifulsoup4 dataclasses-json fastmcp==3.1.1 lxml markdownify requests
57
+ ```
58
+
59
+ ## 使用方法
60
+
61
+ ### 启动服务器
62
+
63
+ ```bash
64
+ # SSE 传输模式
65
+ python server.py
66
+
67
+ # 或使用 fastmcp 开发模式
68
+ fastmcp dev server.py
69
+ ```
70
+
71
+ ### 配置 Claude Desktop
72
+
73
+ 在 Claude Desktop 配置文件中添加:
74
+
75
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
76
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
77
+
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "minecraft-document": {
82
+ "command": "python",
83
+ "args": ["/path/to/minecraft-document-mcp/server.py"]
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ ## 项目结构
90
+
91
+ ```
92
+ minecraft-document-mcp/
93
+ ├── server.py # MCP 服务器入口
94
+ ├── pyproject.toml # 项目配置
95
+ └── src/
96
+ └── mcp/
97
+ └── api/
98
+ ├── WikiApi.py # Wiki API 请求工具
99
+ └── WikiItems.py # 数据项定义
100
+ ```
101
+
102
+ ## 依赖
103
+
104
+ - [fastmcp](https://github.com/jlowin/fastmcp) - MCP 框架
105
+ - [requests](https://docs.python-requests.org/) - HTTP 请求库
106
+ - [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/) - HTML 解析
107
+ - [markdownify](https://github.com/matthewwithanm/python-markdownify) - HTML 转 Markdown
108
+ - [lxml](https://lxml.de/) - XML/HTML 解析后端
109
+ - [dataclasses-json](https://github.com/lidatong/dataclasses-json) - 数据类序列化
110
+
111
+ ## 许可证
112
+
113
+ [MIT License](LICENSE)
114
+
115
+ ## 相关链接
116
+
117
+ - [Minecraft Wiki](https://zh.minecraft.wiki/) - 中文 Minecraft Wiki
118
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 协议文档
119
+ - [FastMCP](https://github.com/jlowin/fastmcp) - FastMCP 框架
@@ -0,0 +1,14 @@
1
+ [project]
2
+ name = "minecraft-document-mcp"
3
+ version = "0.1.0"
4
+ description = "Minecraft Wiki 文档 MCP 服务器"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "beautifulsoup4>=4.14.3",
9
+ "dataclasses-json>=0.6.7",
10
+ "fastmcp==3.1.1",
11
+ "lxml>=6.0.2",
12
+ "markdownify>=1.2.2",
13
+ "requests>=2.32.5",
14
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,256 @@
1
+ """
2
+ Minecraft Wiki API 请求工具模块。
3
+
4
+ 基于 MediaWiki API 从中文 Minecraft Wiki 获取游戏相关文档内容,
5
+ 支持获取词条简介和完整内容(转换为 Markdown 格式)。
6
+ """
7
+
8
+ import json
9
+ from typing import Optional, List
10
+
11
+ import requests
12
+ from bs4 import BeautifulSoup, Tag
13
+ from markdownify import markdownify
14
+
15
+ from src.mcp.api.WikiItems import CategoryItem
16
+
17
+ # Wiki 基础地址
18
+ API_HOST = "https://zh.minecraft.wiki/"
19
+
20
+ # MediaWiki API 基础配置
21
+ API_URL = (
22
+ f"{API_HOST}api.php"
23
+ "?action=query"
24
+ "&format=json"
25
+ "&prop=extracts|info"
26
+ "&redirects=true"
27
+ "&inprop=url"
28
+ "&variant=zh-cn"
29
+ )
30
+
31
+
32
+ class ContentCleaner:
33
+ """HTML 内容清理工具类。"""
34
+
35
+ @staticmethod
36
+ def remove_empty_tags(element: Tag) -> None:
37
+ """
38
+ 递归移除空的 HTML 标签。
39
+
40
+ Args:
41
+ element: BeautifulSoup Tag 对象。
42
+ """
43
+ for child in list(element.children):
44
+ if not isinstance(child, Tag):
45
+ continue
46
+ ContentCleaner.remove_empty_tags(child)
47
+ if not child.text.strip():
48
+ child.decompose()
49
+
50
+ @staticmethod
51
+ def extract_sprite_title(element: Tag) -> None:
52
+ """
53
+ 将精灵图片标签替换为其链接标题文本。
54
+
55
+ Args:
56
+ element: BeautifulSoup Tag 对象。
57
+ """
58
+ for sprite in element.find_all('span', class_='sprite-file'):
59
+ link = sprite.find('a')
60
+ if link is None:
61
+ continue
62
+
63
+ title = link.attrs.get('title')
64
+ img = link.find('img')
65
+
66
+ if title is None and img is None:
67
+ continue
68
+
69
+ sprite.clear()
70
+ sprite.string = f'{title} ' if title else ''
71
+
72
+ @staticmethod
73
+ def clean(content: Tag) -> None:
74
+ """
75
+ 清理 Wiki 页面内容,移除冗余元素。
76
+
77
+ Args:
78
+ content: BeautifulSoup Tag 对象,通常为 mw-content-text div。
79
+ """
80
+ # 提取精灵图片的标题文本
81
+ ContentCleaner.extract_sprite_title(content)
82
+
83
+ # 移除图片标签
84
+ for img in list(content.find_all('img')):
85
+ img.decompose()
86
+
87
+ # 移除编辑链接
88
+ for edit_section in content.find_all('span', class_='mw-editsection'):
89
+ edit_section.decompose()
90
+
91
+ # 移除目录
92
+ for toc in content.find_all('div', id='toc', class_='toc'):
93
+ toc.decompose()
94
+
95
+ # 移除底部导航信息表
96
+ navbox_class = 'navbox hlist collapsible navigation-not-searchable noresize'
97
+ for navbox in content.find_all('table', class_=navbox_class):
98
+ navbox.decompose()
99
+
100
+ # 移除打印页脚
101
+ for footer in content.find_all('div', class_='printfooter'):
102
+ footer.decompose()
103
+
104
+ # 解包 a 标签,保留内部文本
105
+ for link in content.find_all('a'):
106
+ link.unwrap()
107
+
108
+
109
+ class WikiApiClient:
110
+ """Wiki API 客户端,负责 HTTP 请求和响应处理。"""
111
+
112
+ @staticmethod
113
+ def fetch_json(url: str) -> Optional[dict]:
114
+ """
115
+ 发送 GET 请求并返回 JSON 数据。
116
+
117
+ Args:
118
+ url: 完整的 API 请求地址。
119
+
120
+ Returns:
121
+ Optional[dict]: 解析后的页面数据,页面不存在或请求失败时返回 None。
122
+
123
+ Raises:
124
+ RuntimeError: JSON 解析失败时抛出。
125
+ """
126
+ response = requests.get(url, timeout=30)
127
+ if not response.ok:
128
+ return None
129
+
130
+ try:
131
+ data: dict = response.json()
132
+ pages = data.get("query", {}).get("pages", {})
133
+
134
+ # 页面不存在时,API 返回 {"-1": {...}}
135
+ if len(pages) == 1 and list(pages.keys())[0] == '-1':
136
+ return None
137
+
138
+ return pages
139
+ except json.JSONDecodeError:
140
+ raise RuntimeError(f'获取 {url} 的数据失败')
141
+
142
+ @staticmethod
143
+ def fetch_html(url: str) -> Optional[str]:
144
+ """
145
+ 发送 GET 请求并返回 HTML 内容。
146
+
147
+ Args:
148
+ url: 完整的页面地址。
149
+
150
+ Returns:
151
+ Optional[str]: HTML 内容,请求失败时返回 None。
152
+ """
153
+ response = requests.get(url, timeout=30)
154
+ return response.text if response.ok else None
155
+
156
+
157
+ class WikiApiRequestUtil:
158
+ """Minecraft Wiki 文档查询工具类。"""
159
+
160
+ @staticmethod
161
+ def search_intro(text: str) -> str:
162
+ """
163
+ 搜索词条并获取简介内容(Markdown 格式)。
164
+
165
+ Args:
166
+ text: 搜索关键词,如 "村民"、"钻石"。
167
+
168
+ Returns:
169
+ str: Markdown 格式的词条简介,未找到时返回提示信息。
170
+ """
171
+ url = f"{API_URL}&exintro=true&titles={text}"
172
+ pages = WikiApiClient.fetch_json(url)
173
+
174
+ if pages is None:
175
+ return f'暂无 **{text}** 的简介'
176
+
177
+ page_data = pages.get(list(pages.keys())[0], {})
178
+ extract = page_data.get('extract', '')
179
+
180
+ if not extract:
181
+ return f'暂无 **{text}** 的简介'
182
+
183
+ return markdownify(extract).strip()
184
+
185
+ @staticmethod
186
+ def search(text: str) -> str:
187
+ """
188
+ 搜索词条并获取完整内容(Markdown 格式)。
189
+
190
+ Args:
191
+ text: 搜索关键词。
192
+
193
+ Returns:
194
+ str: Markdown 格式的词条内容,获取失败时返回提示信息。
195
+ """
196
+ url = f"{API_URL}&exintro=true&titles={text}"
197
+ pages = WikiApiClient.fetch_json(url)
198
+
199
+ if pages is None:
200
+ return f'暂无 **{text}** 的内容'
201
+
202
+ full_url = pages.get(list(pages.keys())[0], {}).get('fullurl')
203
+ if not full_url:
204
+ return f'获取 **{text}** 的链接失败'
205
+
206
+ html = WikiApiClient.fetch_html(full_url)
207
+ if html is None:
208
+ return f'获取 **{text}** 失败'
209
+
210
+ soup = BeautifulSoup(html, 'lxml')
211
+ content = soup.find('div', id='mw-content-text', class_='mw-body-content')
212
+
213
+ if content is None:
214
+ return f'获取 **{text}** 的内容失败'
215
+
216
+ # 清理内容
217
+ ContentCleaner.clean(content)
218
+
219
+ return markdownify(str(content))
220
+
221
+ @staticmethod
222
+ def get_category() -> List[dict]:
223
+ """
224
+ 获取 Wiki 首页的主要分类列表。
225
+
226
+ Returns:
227
+ List[dict]: 分类列表,每项包含 name 和 description 字段。
228
+ """
229
+ html = WikiApiClient.fetch_html(API_HOST)
230
+ if html is None:
231
+ return []
232
+
233
+ soup = BeautifulSoup(html, 'lxml')
234
+ main_icons = soup.find('div', class_='mp-icon-wrapper mp-main-icons')
235
+
236
+ if main_icons is None:
237
+ return []
238
+
239
+ result = []
240
+ for icon in main_icons.find_all('div', class_='mp-icon'):
241
+ link = icon.find('a')
242
+ if link is None:
243
+ continue
244
+
245
+ title = link.attrs.get('title')
246
+ if title is None:
247
+ continue
248
+
249
+ intro = WikiApiRequestUtil.search_intro(title)
250
+ result.append(CategoryItem(title, intro).to_dict())
251
+
252
+ return result
253
+
254
+
255
+ if __name__ == '__main__':
256
+ print(WikiApiRequestUtil.get_category())
@@ -0,0 +1,25 @@
1
+ """
2
+ Wiki API 数据项定义模块。
3
+
4
+ 定义用于 Wiki API 响应的数据结构。
5
+ """
6
+
7
+ from dataclasses import dataclass
8
+
9
+ from dataclasses_json import DataClassJsonMixin
10
+
11
+
12
+ @dataclass
13
+ class CategoryItem(DataClassJsonMixin):
14
+ """
15
+ 分类条目数据类。
16
+
17
+ 用于表示从 Wiki 首页获取的分类信息。
18
+
19
+ Attributes:
20
+ name: 分类名称。
21
+ description: 分类描述(词条简介)。
22
+ """
23
+
24
+ name: str
25
+ description: str
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: minecraft-document-mcp
3
+ Version: 0.1.0
4
+ Summary: Minecraft Wiki 文档 MCP 服务器
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: beautifulsoup4>=4.14.3
8
+ Requires-Dist: dataclasses-json>=0.6.7
9
+ Requires-Dist: fastmcp==3.1.1
10
+ Requires-Dist: lxml>=6.0.2
11
+ Requires-Dist: markdownify>=1.2.2
12
+ Requires-Dist: requests>=2.32.5
13
+
14
+ # Minecraft Document MCP
15
+
16
+ [![Python](https://img.shields.io/badge/Python-3.12+-blue.svg)](https://www.python.org/)
17
+ [![FastMCP](https://img.shields.io/badge/FastMCP-3.1.1-green.svg)](https://github.com/jlowin/fastmcp)
18
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
19
+
20
+ 一个基于 FastMCP 框架的 Minecraft 文档 MCP 服务器,为 AI 助手提供中文 Minecraft Wiki 文档查询功能。
21
+
22
+ ## 功能特性
23
+
24
+ - **Wiki 在线查询** - 从中文 Minecraft Wiki 获取词条内容
25
+ - **分类浏览** - 获取 Wiki 首页主要分类列表
26
+ - **简介/完整内容** - 支持获取词条简介或完整内容
27
+ - **Markdown 输出** - 所有查询结果以 Markdown 格式返回
28
+ - **MCP 协议支持** - 兼容 Model Context Protocol,可集成到 Claude Desktop 等客户端
29
+
30
+ ## MCP 工具
31
+
32
+ | 工具名称 | 功能描述 |
33
+ |---------|---------|
34
+ | `search_wiki_intro` | 从 Wiki 搜索词条简介 |
35
+ | `search_wiki_full` | 从 Wiki 搜索词条完整内容 |
36
+ | `get_wiki_categories` | 获取 Wiki 首页主要分类列表 |
37
+
38
+ ## 安装
39
+
40
+ ### 环境要求
41
+
42
+ - Python 3.12+
43
+ - uv 包管理器(推荐)
44
+
45
+ ### 使用 uv 安装
46
+
47
+ ```bash
48
+ # 克隆仓库
49
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
50
+ cd minecraft-document-mcp
51
+
52
+ # 安装依赖
53
+ uv sync
54
+ ```
55
+
56
+ ### 使用 pip 安装
57
+
58
+ ```bash
59
+ # 克隆仓库
60
+ git clone https://github.com/PYmili/minecraft-document-mcp.git
61
+ cd minecraft-document-mcp
62
+
63
+ # 创建虚拟环境
64
+ python -m venv .venv
65
+ source .venv/bin/activate # Linux/macOS
66
+ # .venv\Scripts\activate # Windows
67
+
68
+ # 安装依赖
69
+ pip install beautifulsoup4 dataclasses-json fastmcp==3.1.1 lxml markdownify requests
70
+ ```
71
+
72
+ ## 使用方法
73
+
74
+ ### 启动服务器
75
+
76
+ ```bash
77
+ # SSE 传输模式
78
+ python server.py
79
+
80
+ # 或使用 fastmcp 开发模式
81
+ fastmcp dev server.py
82
+ ```
83
+
84
+ ### 配置 Claude Desktop
85
+
86
+ 在 Claude Desktop 配置文件中添加:
87
+
88
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
89
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
90
+
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "minecraft-document": {
95
+ "command": "python",
96
+ "args": ["/path/to/minecraft-document-mcp/server.py"]
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ## 项目结构
103
+
104
+ ```
105
+ minecraft-document-mcp/
106
+ ├── server.py # MCP 服务器入口
107
+ ├── pyproject.toml # 项目配置
108
+ └── src/
109
+ └── mcp/
110
+ └── api/
111
+ ├── WikiApi.py # Wiki API 请求工具
112
+ └── WikiItems.py # 数据项定义
113
+ ```
114
+
115
+ ## 依赖
116
+
117
+ - [fastmcp](https://github.com/jlowin/fastmcp) - MCP 框架
118
+ - [requests](https://docs.python-requests.org/) - HTTP 请求库
119
+ - [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/) - HTML 解析
120
+ - [markdownify](https://github.com/matthewwithanm/python-markdownify) - HTML 转 Markdown
121
+ - [lxml](https://lxml.de/) - XML/HTML 解析后端
122
+ - [dataclasses-json](https://github.com/lidatong/dataclasses-json) - 数据类序列化
123
+
124
+ ## 许可证
125
+
126
+ [MIT License](LICENSE)
127
+
128
+ ## 相关链接
129
+
130
+ - [Minecraft Wiki](https://zh.minecraft.wiki/) - 中文 Minecraft Wiki
131
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 协议文档
132
+ - [FastMCP](https://github.com/jlowin/fastmcp) - FastMCP 框架
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/mcp/api/WikiApi.py
4
+ src/mcp/api/WikiItems.py
5
+ src/minecraft_document_mcp.egg-info/PKG-INFO
6
+ src/minecraft_document_mcp.egg-info/SOURCES.txt
7
+ src/minecraft_document_mcp.egg-info/dependency_links.txt
8
+ src/minecraft_document_mcp.egg-info/requires.txt
9
+ src/minecraft_document_mcp.egg-info/top_level.txt
@@ -0,0 +1,6 @@
1
+ beautifulsoup4>=4.14.3
2
+ dataclasses-json>=0.6.7
3
+ fastmcp==3.1.1
4
+ lxml>=6.0.2
5
+ markdownify>=1.2.2
6
+ requests>=2.32.5