How does MCP Server allow external AI clients to connect to AnQiCMS
Through the MCP Server, external AI clients such as Claude, Cursor, and others can directly call the content management, SEO configuration, site operations, and other capabilities of AnQiCMS using natural language, without writing API call code. MCP (Model Context Protocol) is a standardized protocol for large language models. AnQiCMS's tool layer is unified convergence based on the intent directory, supports Bearer Token authentication and round-level operation approval, and writes operation merging to ensure security.
What is the MCP protocol
MCP is the bridge that connects large language models with external systems. Traditional API calls require developers to understand endpoints, parameters, and authentication methods, while MCP encapsulates system capabilities into 'tools', allowing AI clients to describe requirements in natural language, which is then parsed and executed by the MCP Server.
AnQiCMS's MCP Server is rebuilt based on the intent directory, converging all exposed capabilities by domain. Each intent domain has clear input-output contracts, and the AI client only needs to state 'What do I want to do,' without concerning itself with the underlying implementation details. This design lowers the threshold for AI integration and also makes permission control more fine-grained.
How to unify the tool interface of the intention directory
The intent directory is the core architecture of AnQiCMS MCP Server. It groups all exposed operations by business domain, such as content management domain, SEO configuration domain, site operation domain, etc. Tools within each domain share the same authorization strategy and approval rules.
| Intentional domain | Typical tool | Default status | Approval requirements |
|---|---|---|---|
| Content Management | Create articles, update categories, query tags | On | Single item confirmation |
| SEO configuration | Set up pseudo static, generate Sitemap, push links | On | Batch confirmation |
| Site operations | Backup and restore, multi-site switching, system upgrade | turned off | Explicitly enable + confirm item by item |
| User management | VIP grouping, permission allocation, order inquiry | On | Single item confirmation |
High-risk areas such as backup, upgrade, and multi-site operations are set to closed by default, and need to be explicitly enabled by the administrator in the background to be called by AI clients. This 'default deny' design prevents data loss or system failures caused by incorrect operations.
Bearer Token authorization configuration
The MCP Server uses Bearer Token for authentication. The configuration process: Generate the access token on the MCP settings page of the AnQiCMS backend, the system will allocate independent permission scopes for each token. Configure the generated token in the connection settings of the AI client, and test whether the connection is successful.
The permissions of the token should follow the principle of minimization: If you only need the AI to help write articles, do not grant access permissions to the site operation domain. Regularly rotating the token is also a good security practice.
Round-level operation approval mechanism
Turn-based approval is a security feature of the AnQiCMS MCP Server. When the AI client initiates an operation that may modify the data, the system does not execute it immediately but waits for manual confirmation.
The specific process: The AI client sends an operation request to the MCP Server, the Server parses the intention and generates a task to be confirmed, and returns it to the client to display to the user. After the user confirms, the Server will actually execute the operation and return the result. If the user refuses, the operation will be canceled without leaving a trace.
For batch operations, such as updating the categories of multiple articles at once, the system will treat the entire batch as a confirmation unit. Users can view the complete operation list and choose to confirm all or partially confirm. This design ensures both security and avoids the麻烦 of confirming each one individually.
The actual scenario of merging write operations for confirmation
Suppose you use Claude to let AI help you organize website content: 'Add the 'search engine optimization' tag to the articles published in the past three months.' AI will first query the list of articles that meet the criteria, and then display the operation list that will be executed. You can preview this list and click 'Execute All' after confirming that it is correct. If you find any articles that should not be tagged, you can manually remove them from the list and confirm again.
This merging confirmation mechanism is especially suitable for batch scenarios. The confirmation cost of a single operation is diluted while still retaining the key link of manual review. For read-only operations such as querying article lists and obtaining statistical data, confirmation is not required and the result is returned directly to ensure smooth interaction.
Claude and Cursor integration
For example, add AnQiCMS configuration items including server address and token value in the MCP configuration file for Claude Desktop. After restarting Claude Desktop, you can interact with AnQiCMS using natural language. For example: 'Can you tell me how many articles were published in the past week?' or 'Add the tag 'cybersecurity' to articles with titles containing 'security'.
The configuration method of Cursor is similar, just add the MCP server address and token in the extension settings. Both clients can automatically discover the tool list exposed by AnQiCMS and intelligently call in the conversation.
Common precautions
Firstly, the high-frequency interface calling capabilities of MCP Server include document list and details, category and tag management, image upload, message and comment processing, friend link management, etc. The complete list of these capabilities can be viewed in the in-site interface help.
Second, do not store tokens in plain text in code repositories or public documents. It is recommended to use environment variables or key management services to store token values.
Third, regularly check the operation logs of MCP Server to understand which tools are frequently called and whether there is any abnormal behavior.
Fourth, if a certain intent domain has not been used for a long time, consider closing it to reduce the attack surface.
Common questions
Question: Will MCP Server affect website performance?
Answer: MCP Server runs as an independent service module and consumes resources only when a request is received. For low-frequency usage scenarios, the performance impact can be ignored.
Question: Can we restrict AI to only perform read-only operations?
Answer: Yes. When generating tokens, only read-type intent domains are granted permissions, not write-type domains. In this way, AI can query data but cannot modify any content.
Question: Can multiple AI clients connect simultaneously?
Answer: Supported. Each client uses an independent token, and the system controls access based on the permission range of the token. You can view the usage of each token in the background, and you can revoke a specific token individually without affecting other clients.