EAG MCP Demo
EAG v3 — 带有 Prefab UI 的 MCP 演示
一个 FastMCP 服务器,包含三个工具,分别用于 (1) 互联网访问,(2) 本地文件 CRUD,以及 (3) 通过 Prefab 实现的生成式 UI。专为在 Claude Desktop 中运行而设计。
工具
工具 | 类型 | 用途 |
| 互联网 | DuckDuckGo 即时答案 API — 返回摘要 + 相关主题 |
| 本地 CRUD | 单一工具,通过 |
| UI | 将保存的笔记渲染为 Prefab 卡片网格(使用 |
设置
需要 uv (brew install uv) 和 Claude Desktop。
cd /Users/nitingangwar/Documents/Code/eagv3/mcp
uv sync连接到 Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json 并添加(或合并) mcpServers 块:
{
"mcpServers": {
"eag-mcp-demo": {
"command": "/opt/homebrew/bin/uv",
"args": [
"run",
"--directory",
"/Users/nitingangwar/Documents/Code/eagv3/mcp",
"python",
"server.py"
]
}
}
}重启 Claude Desktop。MCP 指示器应显示 eag-mcp-demo 以及三个工具。
纯 Python 回退(无 uv)
python3 -m venv .venv
.venv/bin/pip install -e .然后在 Claude Desktop 配置中使用:
"command": "/Users/nitingangwar/Documents/Code/eagv3/mcp/.venv/bin/python",
"args": ["/Users/nitingangwar/Documents/Code/eagv3/mcp/server.py"]演示提示词
在服务器连接后,将此内容粘贴到 Claude Desktop 中:
通过网页搜索查找 Tata Sons 的所有权详情,将 2-3 句摘要保存到我的笔记文件中,键名为
tata_sons,然后打开仪表板以便我查看。
预期行为:
web_search("Tata Sons ownership")→ DDG 摘要。notes_file("create", "tata_sons", "<summary>")→ 写入notes.json。show_dashboard()→ 内联渲染一个包含一张卡片的 Prefab 卡片网格。
换一家公司(例如“Reliance Industries”)重新运行,仪表板现在会显示两张卡片。
冒烟测试
# Server starts and blocks on stdin (correct):
uv run python server.py
# Or interactive inspector:
npx @modelcontextprotocol/inspector uv run python server.py在检查器中:列出工具,调用 web_search("Tata Sons"),然后调用 notes_file("create", "x", "y") 并确认 notes.json 在磁盘上已更新。
回退方案
Prefab 渲染器未启动(Claude Desktop 返回 JSON 而不是 UI):将
show_dashboard装饰器从@mcp.tool(app=True)更改为普通的@mcp.tool,并使其返回一个由notes.json构建的 Markdown 表格。DuckDuckGo 查询返回为空:DDG 仅对知名实体提供即时答案。演示时请使用著名的公司/人物/地点。
文件
server.py # FastMCP server with the 3 tools
notes.json # backing store for notes_file (starts as {})
pyproject.toml # deps: fastmcp[apps], prefab-ui==0.19.1, httpxThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SkinnyMonk/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server