mcptest_connection00
一个使用FastMCP构建的示例MCP服务器,提供实用工具、数据资源和可重用提示,用于执行各种任务,如计算数学表达式、生成密码、分析文本等。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"utility-toolbox": {
"args": [
"server.py"
],
"command": "python"
}
}
}
Streamable HTTP 传输配置
{
"mcpServers": {
"fast-mcp-demo": {
"url": "http://0.0.0.0:8005/mcp"
}
}
}
服务介绍
Utility Toolbox MCP 服务器
一个使用 FastMCP 构建的示例 MCP 服务器,提供实用工具、数据资源和可重用的提示。
快速开始
# Install dependencies
pip install -r requirements.txt
# Run with stdio transport (default, for IDE integration)
python server.py
# Or run with streamable-http transport (for Inspector / remote access)
# Change transport in server.py or use: uv run --with mcp server.py
功能
工具
| 工具 | 描述 |
|---|---|
calculate |
安全地评估数学表达式(如 2 + 3 * 4、sqrt(16)、sin(pi/2)) |
generate_password |
生成具有可配置长度和字符集的随机密码 |
word_count |
分析文本——字符数、单词数、行数、句子数 |
资源
| URI | 描述 |
|---|---|
server://info |
服务器元数据和功能列表 |
server://time |
当前本地/UTC 时间和 UNIX 时间戳 |
quotes://{category} |
按类别整理的名言(如 motivation、tech、humor) |
提示
| 提示 | 描述 |
|---|---|
code_review |
在五个维度上进行结构化的代码审查 |
summarize_text |
可配置风格和受众的文本摘要 |
explain_concept |
以选定的深度解释技术概念 |
Cursor IDE 集成
在您的 .cursor/mcp.json 文件中添加:
{
"mcpServers": {
"fast-mcp-demo": {
"url": "http://0.0.0.0:8005/mcp"
}
}
}
使用 MCP Inspector 进行测试
npx -y @modelcontextprotocol/inspector
# Then connect to the running server