Devhub Cms Mcp
概览
什么是 DevHub CMS MCP?
DevHub CMS MCP(内容管理系统模型上下文协议)是一个创新平台,旨在将大型语言模型(LLMs)集成到内容管理系统中。这种集成使用户能够利用先进的人工智能能力进行内容创作、管理和优化,从而提升整体用户体验和内容工作流程的效率。
DevHub CMS MCP 的特点
- LLM 集成:与各种大型语言模型无缝集成,提供智能内容建议和自动化功能。
- 用户友好的界面:设计简洁直观的界面,简化内容管理任务。
- 可定制的工作流程:提供可定制的工作流程,以适应不同的内容策略和团队结构。
- 实时协作:支持多个用户实时协作,增强团队合作和生产力。
- 分析和报告:提供深入的分析和报告工具,以跟踪内容表现和用户参与度。
- 安全性和合规性:确保数据安全并符合行业标准,保护用户信息和内容完整性。
如何使用 DevHub CMS MCP
- 注册:在 DevHub 平台上创建一个帐户以访问 CMS。
- 设置工作区:通过添加团队成员和定义角色来定制您的工作区。
- 集成 LLM:连接您首选的大型语言模型,开始利用 AI 驱动的内容建议。
- 创建内容:使用直观的编辑器创建、编辑和管理您的内容。利用 AI 建议来增强您的写作。
- 协作:邀请团队成员实时协作内容,提供反馈并根据需要进行编辑。
- 分析表现:使用分析工具监控内容表现,并根据数据做出未来内容策略的决策。
常见问题解答
问:我可以使用 DevHub CMS MCP 创建什么类型的内容?
答:您可以创建各种内容,包括博客文章、文章、着陆页等,所有内容都可以通过 AI 建议进行增强。
问:DevHub CMS MCP 适合小型企业吗?
答:是的,DevHub CMS MCP 设计为可扩展,既适合小型企业,也适合大型企业有效使用。
问:LLM 集成是如何工作的?
答:LLM 集成使 CMS 能够根据正在创建的内容提供上下文感知的建议和自动化,提高效率和创造力。
问:我可以自定义 DevHub CMS MCP 中的工作流程吗?
答:当然可以!您可以根据团队的具体需求和内容策略自定义工作流程。
问:DevHub CMS MCP 有移动版本吗?
答:是的,DevHub CMS MCP 可以在移动设备上访问,让您随时随地管理内容。
问:有哪些安全措施?
答:DevHub CMS MCP 实施了强大的安全协议,以保护用户数据并确保符合行业标准。
详情
DevHub CMS MCP
A Model Context Protocol (MCP) integration for managing content in the DevHub CMS system.
Installation
You will need the uv package manager installed on your local system.
Manual configuration of Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json
:
{
"mcpServers": {
"devhub_cms_mcp": {
"command": "uvx",
"args": [
"devhub-cms-mcp"
],
"env": {
"DEVHUB_API_KEY": "YOUR_KEY_HERE",
"DEVHUB_API_SECRET": "YOUR_SECRET_HERE",
"DEVHUB_BASE_URL": "https://yourbrand.cloudfrontend.net"
}
}
}
}
After updating the config, restart Claude Desktop.
Manual configuration for Cursor
This MCP can also be used in cursor with a similar configuration from above added to your Cursor global environment or to individual projects.
Examples here
Installing via Claude Code
Claude Code's command line supports MCP installs.
You can add the devhub-cms-mcp
by updating the environment variables below
claude mcp add devhub-cms-mcp \
-e DEVHUB_API_KEY=YOUR_KEY_HERE \
-e DEVHUB_API_SECRET=YOUR_SECRET_HERE \
-e DEVHUB_BASE_URL=https://yourbrand.cloudfrontend.net \
-- uvx devhub-cms-mcp
Installing via Smithery
To install DevHub CMS MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @devhub/devhub-cms-mcp --client claude
Local development
Clone the repo (or your fork)
git clone git@github.com:devhub/devhub-cms-mcp.git
Manual configuration of Claude Desktop
To use this server with the Claude Desktop app for local development, add the following configuration to the "mcpServers" section of your claude_desktop_config.json
:
{
"mcpServers": {
"devhub_cms_mcp": {
"command": "uv",
"args": [
"--directory",
"/YOUR/LOCAL/PATH/devhub-cms-mcp/",
"run",
"main.py"
],
"env": {
"DEVHUB_API_KEY": "YOUR_KEY_HERE",
"DEVHUB_API_SECRET": "YOUR_SECRET_HERE",
"DEVHUB_BASE_URL": "https://yourbrand.cloudfrontend.net"
}
}
}
}
After updating the config, restart Claude Desktop.
Configuration for running with uv
directly
This MCP requires the following environment variables to be set:
export DEVHUB_API_KEY="your_api_key"
export DEVHUB_API_SECRET="your_api_secret"
export DEVHUB_BASE_URL="https://yourbrand.cloudfrontend.net"
Then run the MCP
uv run main.py
Available Tools
This MCP provides the following tools for interacting with DevHub CMS:
Business and Location Management
- get_businesses(): Gets all businesses within the DevHub account. Returns a list of businesses with their IDs and names.
- get_locations(business_id): Gets all locations for a specific business. Returns detailed location information including address, coordinates, and URLs.
- get_hours_of_operation(location_id, hours_type='primary'): Gets the hours of operation for a specific DevHub location. Returns a structured list of time ranges for each day of the week.
- update_hours(location_id, new_hours, hours_type='primary'): Updates the hours of operation for a DevHub location.
- get_nearest_location(business_id, latitude, longitude): Finds the nearest DevHub location based on geographic coordinates.
- site_from_url(url): Gets the DevHub site ID and details from a URL. Returns site ID, URL, and associated location IDs.
Content Management
- get_blog_post(post_id): Retrieves a single blog post by ID, including its title, date, and HTML content.
- create_blog_post(site_id, title, content): Creates a new blog post. The content should be in HTML format and should not include an H1 tag.
- update_blog_post(post_id, title=None, content=None): Updates an existing blog post's title and/or content.
Media Management
- upload_image(base64_image_content, filename): Uploads an image to the DevHub media gallery. Supports webp, jpeg, and png formats. The image must be provided as a base64-encoded string.
Usage with LLMs
This MCP is designed to be used with Large Language Models that support the Model Context Protocol. It allows LLMs to manage content in DevHub CMS without needing direct API access integrated into the LLM natively.
Testing
This package includes a test suite with mocked requests to the DevHub API, allowing you to test the functionality without making actual API calls.
Running Tests
To run the tests, first install the package with test dependencies:
uv pip install -e ".[test]"
Run the tests with pytest:
uv run pytest
For more detailed output and test coverage information:
uv run pytest -v --cov=devhub_cms_mcp
Test Structure
tests/devhub_cms_mcp/test_mcp_integration.py
: Tests for MCP integration endpoints
Server配置
{
"mcpServers": {
"devhub-cms-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--devhub--devhub-cms-mcp--devhub-cms-mcp",
"devhub-cms-mcp"
],
"env": {
"DEVHUB_API_KEY": "devhub-api-key",
"DEVHUB_API_SECRET": "devhub-api-secret",
"DEVHUB_BASE_URL": "devhub-base-url"
}
}
}
}