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
伺服器配置
{
"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"
}
}
}
}