ChatData MCP 服务器
Description
# ChatData MCP 服务器 ChatData MCP 服务器是一个基于 Model Control Protocol (MCP) 的服务应用程序,提供了丰富的工具集和提示系统,用于增强大型语言模型的能力。 ## 项目简介 该项目提供了一个灵活的服务器框架,允许通过MCP协议与大型语言模型进行交互。该服务器可以: - 执行各种工具函数,扩展模型的能力 - 提供预设的提示模板,简化常见任务 - 提供可直接访问的资源数据,包括文本、二进制和动态生成的内容 - 支持通过标准输入/输出或SSE方式进行通信 - 自动发现和注册新添加的工具、提示和资源…
About
# ChatData MCP 服务器 ChatData MCP 服务器是一个基于 Model Control Protocol (MCP) 的服务应用程序,提供了丰富的工具集和提示系统,用于增强大型语言模型的能力。 ## 项目简介 该项目提供了一个灵活的服务器框架,允许通过MCP协议与大型语言模型进行交互。该服务器可以: - 执行各种工具函数,扩展模型的能力 - 提供预设的提示模板,简化常见任务 - 提供可直接访问的资源数据,包括文本、二进制和动态生成的内容 - 支持通过标准输入/输出或SSE方式进行通信 - 自动发现和注册新添加的工具、提示和资源 ## 核心组件 ### 工具系统 (`tools/`)…
Details
- Author
- xiaozhch5
- GitHub stars
- 3
- Downloads
- 166
- Categories
- Other
Jump to
- Web scraping, IP lookup, HTTP client, and browser automation tools
- Data format conversion, text summarization, and math calculation tools
- Code formatting and PostgreSQL database query tools
- Image generation and text translation tools
- Weather query and echo utilities
- Predefined prompts for content generation and code review
- Text, binary, and dynamic resources (system info, time, memory)
- Automatic discovery of newly added tools, prompts, and resources
- Support for both stdio and SSE transport modes
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
ChatData MCP 服务器Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with pip install -e . or uv pip install -e ., then run playwright install. Start the server in stdio mode with server, or in SSE mode with server --transport sse --port 8000. Developers can add custom tools, prompts, and resources by following the provided templates in the respective directories.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"chatdata mcp \u670d\u52a1\u5668": {
"chatdata-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}
}
McpServers
{
"chatdata-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
ChatData MCP 服务器
ChatData MCP 服务器是一个基于 Model Control Protocol (MCP) 的服务应用程序,提供了丰富的工具集和提示系统,用于增强大型语言模型的能力。
项目简介
该项目提供了一个灵活的服务器框架,允许通过MCP协议与大型语言模型进行交互。该服务器可以:
- 执行各种工具函数,扩展模型的能力
- 提供预设的提示模板,简化常见任务
- 提供可直接访问的资源数据,包括文本、二进制和动态生成的内容
- 支持通过标准输入/输出或SSE方式进行通信
- 自动发现和注册新添加的工具、提示和资源
核心组件
工具系统 (tools/)
工具模块提供了各种功能扩展,使语言模型能够执行具体任务:
- 网络工具:
- web_scraper.py - 网页内容抓取工具
- ip_info.py - IP地址信息查询工具
- http_client.py - HTTP请求客户端
- fetch.py - 简单网页获取工具
- browser_use.py - 基于browser_use获取网络信息
- 数据处理工具:
- data_converter.py - 数据格式转换工具(JSON/YAML/XML)
- text_summary.py - 文本摘要生成工具
- calculator.py - 高级数学计算工具
- 开发辅助工具:
- code_formatter.py - 代码格式化工具
- postgres.py - PostgreSQL数据库查询工具
- 多媒体工具:
- image_gen.py - 图像生成工具
- 其他实用工具:
- translator.py - 文本翻译工具
- weather.py - 天气查询工具
- echo.py - 简单的回显工具
提示系统 (prompts/)
提示模块提供了各种预设的提示模板,用于快速生成高质量的回复:
- simple.py - 基本提示模板
- content_generator.py - 内容生成提示
- code_review.py - 代码审查提示
- utils.py - 提示工具函数
资源系统 (resources/)
资源模块提供了可直接通过MCP协议访问的数据对象:
- 文本资源:
- text_resources.py - 提供常见的文本资源(问候语、帮助信息等)
- 二进制资源:
- binary_resources.py - 提供二进制数据资源(图像、JSON数据等)
- 动态资源:
- dynamic_resources.py - 提供动态生成的资源(系统信息、当前时间、内存使用情况等)
服务器组件 (server/)
服务器模块处理客户端请求和响应,支持多种通信方式:
- 标准输入/输出 (stdio) 模式
- 服务器发送事件 (SSE) 模式
安装与使用
uv venv --python 3.12
安装依赖
pip install -e .
或使用 uv:
uv pip install -e .
安装playwright
playwright install
启动服务器
stdio 模式(默认)
server
SSE 模式
server --transport sse --port 8000
开发指南
添加新工具
1. 在 tools/ 目录中创建新的 Python 文件
2. 实现一个主函数和一个工具调用函数
3. 提供 get_tools() 函数返回工具定义
示例:
import mcp.types as types
async def my_function(param1, param2):
# 实现功能
return [types.TextContent(type="text", text="结果")]
async def my_tool(name: str, arguments: dict):
if name != "my_tool":
raise ValueError(f"Unknown tool: {name}")
# 提取参数
param1 = arguments.get("param1")
param2 = arguments.get("param2")
return await my_function(param1, param2)
def get_tools():
return [
types.Tool(
name="my_tool",
description="工具描述",
inputSchema={
"type": "object",
"required": ["param1"],
"properties": {
"param1": {
"type": "string",
"description": "参数1描述",
},
"param2": {
"type": "string",
"description": "参数2描述",
}
},
},
)
]
添加新提示
1. 在 prompts/ 目录中创建新的 Python 文件
2. 实现提示生成函数
3. 提供 get_prompts() 函数返回提示定义
示例:
import mcp.types as types
from .utils import create_messages
def my_prompt(context=None, topic=None):
messages = create_messages(context, topic)
return types.GetPromptResult(
messages=messages,
description="提示描述"
)
def get_prompts():
return [
types.Prompt(
name="my_prompt",
description="提示描述",
func=my_prompt,
args={
"context": {
"type": "string",
"description": "上下文信息"
},
"topic": {
"type": "string",
"description": "主题"
}
}
)
]
添加新资源
1. 在 resources/ 目录中创建新的 Python 文件
2. 实现资源获取函数和资源内容读取函数
3. 提供 get_resources() 和 read_resource() 函数
示例:
```python
import mcp.types as types
from pydantic import FileUrl
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



