Click on "Install 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., "@Utility MCP ServerWhat is the current time in Tokyo?"
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.
MCP Server - 通用功能服务器
一个基于 Model Context Protocol (MCP) 的通用功能服务器,为 AI 提供扩展能力。
支持 本地模式 (stdio) 和 远程模式 (SSE) 双模式运行。
✨ 功能
🕐 时间工具
工具 | 描述 |
| 获取指定时区的当前时间 |
| 获取当前 Unix 时间戳 |
| 将时间戳转换为可读格式 |
🚀 快速开始
安装依赖
# 使用 uv 安装依赖
uv sync本地模式运行
uv run mcp-server远程模式运行
uv run mcp-server --remote --port 8000🔌 客户端集成
本地模式配置
适用于 Cursor / Claude Desktop:
{
"mcpServers": {
"utility-server": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-server", "run", "mcp-server"]
}
}
}远程模式配置
先启动远程服务器,然后使用 mcp-remote 适配器连接:
{
"mcpServers": {
"utility-server": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://your-server:8000/sse"]
}
}
}🐳 Docker 部署
使用 Docker Compose(推荐)
# 构建并启动
docker compose up -d
# 查看日志
docker compose logs -f
# 停止
docker compose down手动 Docker 命令
# 构建镜像
docker build -t mcp-server .
# 运行容器
docker run -d -p 8000:8000 --name mcp-server mcp-server
# 自定义端口
docker run -d -p 9000:9000 -e PORT=9000 --name mcp-server mcp-server从 GitHub Container Registry 拉取
docker pull ghcr.io/love-gwen2025/mcp-server:main
docker run -d -p 8000:8000 ghcr.io/love-gwen2025/mcp-server:main🧪 开发测试
使用 MCP Inspector 进行交互式测试:
uv run mcp dev src/mcp_server/server.py📖 架构说明
┌─────────────────────────────────────────────────────────────┐
│ 运行模式 │
├─────────────────────────────────────────────────────────────┤
│ │
│ 本地模式 (--remote 未设置) │
│ ├── 使用 stdio 传输 │
│ └── AI 客户端直接启动服务器进程 │
│ │
│ 远程模式 (--remote) │
│ ├── 使用 SSE 传输 │
│ ├── 监听 HTTP 端口 │
│ └── AI 客户端通过网络连接 │
│ │
└─────────────────────────────────────────────────────────────┘📄 许可证
MIT