MiaoMcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MiaoMcp What's the current time in Beijing?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MiaoMcp
将本地 FastMCP 工具和任意数量的远程 MCP 服务同时接入小智。目前本地提供:
calculator.calculate:安全计算基础算术表达式;time.get_current:查询指定 IANA 时区的当前日期和时间,默认北京时间。
每个启用的 MCP Server 都拥有独立的 WebSocket 连接、进程和重连循环。一个远程服务故障不会阻塞其他服务。
配置
编辑根目录下被 Git 忽略的 mcp_config.json:
{
"xiaozhi": {
"endpoint": "wss://小智后台生成的完整接入点URL"
},
"mcpServers": {
"miaomcp-local": {
"type": "stdio",
"command": "miaomcp-server"
},
"modelscope-weather": {
"type": "sse",
"url": "https://mcp.api-inference.modelscope.net/服务ID一/sse"
},
"modelscope-search": {
"type": "sse",
"url": "https://mcp.api-inference.modelscope.net/服务ID二/sse"
}
}
}在 mcpServers 中继续添加条目即可接入更多服务。支持的类型:
stdio:本地 MCP 命令;sse:远程 SSE MCP,自动通过mcp-proxy转换;streamablehttp或http:远程 Streamable HTTP MCP;设置
"disabled": true可临时停用某项。
需要请求头的服务可以配置:
{
"type": "sse",
"url": "https://example.com/sse",
"headers": {
"Authorization": "Bearer token"
}
}mcp_config.json 和其中的 URL、token 都不应提交。可提交模板见 mcp_config.example.json。
Related MCP server: FastMCP Tools Calculator
运行
uv sync
uv run miaomcp指定其他配置文件:
uv run miaomcp --config /path/to/mcp_config.json仅启动本地 stdio 工具服务:
uv run miaomcp-server添加本地工具
在 src/miaomcp/tools/ 中编写业务函数,然后在 src/miaomcp/server.py 使用 @mcp.tool() 注册。不需要修改网关或配置。
项目结构
src/miaomcp/
├── cli.py 命令行入口
├── server.py 本地 FastMCP 服务及工具注册
├── gateway/
│ ├── config.py 配置模型、加载与校验
│ ├── commands.py stdio 与远程代理命令构造
│ ├── bridge.py 单个 MCP 与小智的双向桥接
│ └── manager.py 多服务并发和断线重连
└── tools/
├── calculator.py 安全计算器
└── current_time.py 时区时间查询
tests/ 按模块组织的测试
mcp_config.example.json 可提交的配置模板
mcp_config.json 本地敏感配置,Git 忽略
pyproject.toml 项目元数据、依赖和命令入口测试
uv run python -m unittest discover -s tests -vAvailable Tools
2 toolscalculator.calculateA
计算一个基础算术表达式。当用户询问加减乘除、取模或乘方结果时调用。expression 示例:(12.5 + 7.5) * 2。仅计算,不执行代码。
Inputs: expression (required). Returns: object
time.get_currentA
获取指定时区的当前日期和时间。当用户询问现在几点、今天日期或星期时调用。timezone 使用 IANA 名称,例如 Asia/Shanghai;省略时默认北京时间。
Inputs: timezone. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools, calculator.calculate and time.get_current, target entirely distinct domains: arithmetic and time information. There is no overlap or ambiguity between them.
Both tool names follow the same 'domain.action' pattern with snake_case: calculator.calculate and time.get_current. This is consistent and predictable.
With only 2 tools, the server feels minimal but appropriate for a small utility purpose. It is borderline thin but not unreasonably so.
For a simple calculator/time server, the basic operations are covered. Minor gaps exist (e.g., timezone conversion or date arithmetic), but the core use cases are addressed.
Maintenance
Related MCP Connectors
Remote MCP for JSON repair, hashing, formatting, IDs, dates, units, and other small tools.
Concierge MCP for agentic workflows: verified time + drift, uuid, diff, calc, attest, verify.
Free calculators as MCP tools: finance, taxes, health, units, dates. Search, fetch & compute.
Reasoning, code, anti-deception, memory harness MCP tools. Stdio or HTTPS api.ejentum.com/mcp
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects local LLMs to external tools (calculator, knowledge base) via MCP protocol, enabling automatic tool detection and execution to enhance query responses.MIT
- FlicenseNot gradedqualityDmaintenanceA demonstration MCP server that provides calculator functionality through both stdio and FastAPI implementations. Enables users to perform mathematical calculations via MCP tools using the FastMCP framework.-
- FlicenseNot gradedqualityDmaintenanceProvides tools for calculating math expressions and querying weather, demonstrating how to build an MCP server using FastMCP or raw SDK.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing 150+ mathematical functions across arithmetic, trigonometry, statistics, unit conversions, and more, consolidated into 15 powerful tools for seamless integration with VS Code Copilot and other MCP-compatible clients.MIT