What is MCP Server and how to allow external AI clients to access CMS
MCP Server is the model context protocol server built into the AnQiCMS enterprise content management system, the tool interface is based on the intent directory for unified convergence, supports Bearer Token authentication and round-level operation approval (write operation merge confirmation), and can be accessed by external AI clients such as Claude, Cursor, etc. Through MCP Server, enterprises can open the management capabilities of CMS to AI assistants to realize operations such as natural language-driven content publishing, site configuration, data analysis, while maintaining strict security control.
What is the core function of MCP Server?
MCP (Model Context Protocol) is a standard protocol that allows large language models to interact with external systems. The role of MCP Server is to act as a bridge between CMS and external AI clients, exposing the functions of CMS in a way that AI can understand.
The problem with traditional APIs: RESTful APIs require developers to write code to call them, AI models cannot directly understand the parameter structure and business meaning of APIs. Even if API documentation is provided, AI needs to go through complex parsing to generate the correct request.
Advantages of MCP: MCP Server encapsulates APIs into 'tools' with natural language descriptions, each tool includes a name, description, parameter schema, and usage examples. AI clients can directly understand these metadata, automatically generate correct call requests, and do not require an intermediate conversion layer.
In AnQiCMS, the MCP Server covers a variety of tools for content management, SEO configuration, site settings, data statistics, and more, which can be completed by AI through natural language instructions, tasks that originally required manual operation.
How to unify the tool interface of the intention directory
The intention directory is the organizational method of MCP tools in AnQiCMS. The system categorizes related functions according to intention, forming a hierarchical tool directory structure.
The division of intention domains:
- Content domain: Article creation, editing, deletion, publishing, recycle bin management, etc.
- SEO domain: Sitemap generation, link push, anchor text management, keyword library maintenance, etc.
- Site domain: Multi-site creation, template switching, navigation configuration, single-page management, etc.
- Operations domain: Backup and recovery, system upgrade, log query, health check, etc.
- High-risk domain: Full-site operations such as batch deletion, database migration, permission changes, etc.
Each intent domain has several specific tools, for example, the content domain includescreate_article/update_article/delete_articleand other tools. The AI client must specify the intent domain when calling the tool, and the system will decide whether to allow execution based on the exposure range of the domain.
The design of the intent directory makes tool management more orderly, AI clients can subscribe to specific intent domains as needed, rather than exposing all functionality.
Bearer Token authentication workflow
To ensure that only authorized AI clients can access the MCP Server, the system adopts Bearer Token authentication mechanism.
Workflow:
- Administrators generate MCP access tokens (Token) in the CMS background
- Configure the token to the AI client (such as Claude Desktop's configuration file)
- Each time the AI client calls the MCP tool, it carries in the HTTP request header
Authorization: Bearer <token> - The MCP Server validates the validity of the token, refusing invalid or expired requests
Token management suggestions:
- Allocate independent tokens for different AI clients to facilitate tracking and revocation
- Regularly rotate tokens to reduce the risk of leakage
- Limit the IP source range of the token, only allowing access from trusted networks
- Monitor the token usage logs, and alert promptly for abnormal calls
Bearer Token is the standard OAuth 2.0 authorization method, widely supported by mainstream AI clients
How to reduce confirmation costs for round-based batch approvals
For write operations (such as publishing articles, modifying configurations), MCP Server supports a round-based operation approval mechanism.
The problem with traditional approval: If AI needs to perform 10 write operations, the traditional method requires the user to confirm 10 times sequentially, which is fragmented and inefficient.
Round-based approval: AI packages multiple write operations into a 'round', and the user only needs to confirm once to execute all operations. The system will display a summary of all pending operations before execution, and the user will confirm before submitting them in bulk.
Applicable scenarios:
- Batch publish multiple articles that have passed the review
- Modify the shared configuration of multiple sites at the same time
- Import a large amount of content in one go and automatically classify it
Approval at the turn level significantly improves operational efficiency while ensuring safety, especially suitable for complex tasks independently arranged by AI Agents.
Security design for high-risk areas is turned off by default
The MCP interface sets the exposure range according to the intent domain, high-risk areas (backup/upgrades/multi-site operations, etc., full-site operations) are turned off by default and need to be explicitly turned on.
Reason for default offOnce a high-risk operation is mistakenly executed, it may lead to serious consequences such as data loss and service interruption. Turning it off by default can prevent AI clients from executing dangerous operations without obtaining explicit authorization.
Turn on the process:
- The administrator enters the MCP settings interface
- Find the intent domain to be enabled (such as "Operations Domain")
- Click to enable and confirm the risk alert
- Optional: Set additional approval rules, such as requiring a second confirmation or allowing execution only during specific time periods
This layered exposure design allows enterprises to flexibly adjust the AI permission scope according to their own risk tolerance. More features can be opened in the test environment, while the production environment maintains the principle of minimum permissions
Common questions
Which AI clients can connect to the MCP Server?
Any AI client that supports the MCP protocol can be connected, including Claude Desktop, Cursor, and custom-developed AI applications. When connecting, you need to specify the MCP Server's URL and Bearer Token in the client configuration file.
Does the MCP Server need to be deployed separately?
No. The MCP Server is an integrated component of AnQiCMS and is deployed with the system. Simply enable the MCP feature in the background and generate an access token to start using it.
How to monitor operations performed by AI through MCP?
The system will record logs of all MCP calls, including call time, tools used, parameter values, execution results, and information about the operator. Administrators can view historical records on the MCP audit page in the background and can also configure real-time alert rules to monitor abnormal calls.