data-tool-xjc
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
data-tool-xjc
一个基于 MCP(Model Context Protocol) Python SDK 的最小 MCP Server 示例,通过 stdio 传输向大模型客户端暴露工具能力。
仓库地址:https://github.com/xjc12138-shift/MCP12138
功能
工具名 | 描述 | 返回值 |
| 返回当前的年月日 | 形如 |
Related MCP server: datetime-mcp-server
目录结构
.
├── mcp-server-stdio.py # MCP Server 入口,定义工具并启动 stdio 服务
├── requirements.txt # 依赖清单
├── chatmcp.yaml # MCP 托管/发布描述文件
├── LICENSE
└── README.md环境要求
Python 3.10+
依赖:
mcp>=1.28.1
安装
从源码安装:
git clone https://github.com/xjc12138-shift/MCP12138.git
cd MCP12138
pip install -r requirements.txt运行
python mcp-server-stdio.py启动后进程会以 stdio 方式等待 JSON-RPC 消息,不要手动在终端输入内容,应由 MCP 客户端连接。直接在终端运行看起来像“卡住”,属于正常现象。
工具说明
get_time() 无需参数,返回服务器本地时区的当前日期:
@mcp.tool()
def get_time():
"""返回当前的年月日,格式YYYY-MM-DD"""
return datetime.now().strftime('%Y-%m-%d')接入 MCP 客户端
方式一:Claude Desktop / 兼容客户端配置
{
"mcpServers": {
"data-tool-xjc": {
"command": "python",
"args": ["/absolute/path/to/MCP12138/mcp-server-stdio.py"]
}
}
}方式二:LangChain / LangGraph 客户端
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"data-tool-xjc": {
"transport": "stdio",
"command": "python",
"args": ["mcp-server-stdio.py"],
}
})
tools = await client.get_tools()注意事项
command建议使用当前环境的绝对路径(例如E:\soft\Anaconda\envs\env\python.exe),避免因 PATH 找不到解释器导致FileNotFoundError。stdio 传输只适合本地进程调用,如需公网共享请改用
streamable_http或 SSE 传输。若客户端报
Connection closed,先在终端用同样的command+args手动启动一次,确认服务端没有启动即退出的错误。
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Remote MCP for JSON repair, hashing, formatting, IDs, dates, units, and other small tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server built with FastMCP that provides tools for retrieving the current local date and time. It allows LLMs to access precise temporal information directly from the host environment.9MIT
- AlicenseAqualityDmaintenanceProvides a tool to retrieve the current date and time with customizable formatting placeholders for year, month, day, hour, minute, and second. It supports both stdio and HTTP transport modes for integration with Model Context Protocol clients.116 npmMIT
- AlicenseAqualityCmaintenanceProvides the current date in multiple formats (e.g., European, ISO, US) via a simple MCP tool.1ISC
- FlicenseNot gradedqualityBmaintenanceMinimal MCP server exposing a single tool, run_date, to execute the local date command via a Streamable HTTP endpoint.-