Umbraco MCP服务器
Umbraco CMS的模型上下文协议(MCP)服务器实现,允许LLM通过标准化接口访问和操纵Umbraco内容。
概述
该存储库提供了一个连接到Umbraco CMS的模型上下文协议服务器,使像Claude这样的AI模型能够:
- 从Umbraco检索内容
- 针对Umbraco Management API执行操作
- 访问文档类型、媒体和其他Umbraco资源
- 通过标准化的工具界面执行操作
安装
# Clone the repository
git clone https://github.com/HappydanceLabs/umbraco-mcp-server.git
# Navigate to the project directory
cd umbraco-mcp-server
# Install dependencies
npm install
# Generate Umbraco API types
npm run generate:umbraco
# Start the development server
npm run dev服务器将在以下时间可用 http://localhost:8787/
连接MCP检查器
探索MCP API并测试可用资源和工具:
- 启动MCP检查器:
npm run mcp:inspector- 在检查器界面中,将传输类型切换为
SSE并进入http://localhost:8787/mcp作为URL。
- 单击“连接”并按照任何身份验证提示进行操作。
- 连接后,您可以列出并调用可用的资源和工具。
连接到克劳德桌面
要将此MCP服务器与Claude一起使用:
- 安装Claude Desktop并按照以下步骤操作 Anthropic的MCP快速入门
- 在Claude Desktop中,转到“设置”>“开发人员”>“编辑配置”
- 将配置替换为:
{
"mcpServers": {
"umbraco": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/mcp"
]
}
}
}- 重新启动Claude,您将能够直接从Claude使用Umbraco工具。
部署
- 为OAuth创建KV命名空间:
npx wrangler kv namespace create OAUTH_KV- 将KV命名空间ID添加到
wrangler.jsonc
- 部署到Cloudflare Workers:
npm run deploy- 更新您的Claude配置以使用您部署的URL:
{
"mcpServers": {
"umbraco": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-worker-url.workers.dev/sse"
]
}
}
}项目结构
/src/api:Umbraco API客户端和接口/src/resources:用于读取Umbraco数据的MCP资源实现/src/tools:用于执行操作的MCP工具实现/src/helpers:实用函数和共享代码/src/types:TypeScript类型定义
发展
有关MCP协议的更多信息,请参阅 官方文件.
调试
如果您遇到问题:
# Test direct connection to the MCP server
npx mcp-remote http://localhost:8787/sse
# Clear MCP authentication cache if needed
rm -rf ~/.mcp-auth