MCP Protocol Access Guide: Allow Claude, Cursor to directly operate your CMS

MCP (Model Context Protocol) is an open protocol that allows large language models to interact with external systems. Through the built-in MCP Server of AnQiCMS, you can expose content management capabilities to external AI clients such as Claude, Cursor, etc., allowing them to directly perform queries, create, or update operations without manually clicking through the back-end interface. The core of this mechanism lies in the unified convergence of intent directories, Bearer Token authentication, and round-level approval processes for write operations.

What problem does the MCP protocol solve?

Traditional content management systems require users to log in to the backend and complete various operations through a graphical interface. When it comes to batch processing or complex workflows, this manual method is inefficient. The introduction of the MCP protocol allows AI assistants to understand users' natural language instructions and convert them into specific calls to the CMS. For example, you can tell Cursor 'Mark the three articles published last week as drafts', and the AI will automatically complete this series of operations through the MCP interface, without you having to enter the editing page one by one.

AnQiCMS's MCP Server is based on the intent directory reconstruction tool interface, which classifies scattered functions by business domains, allowing the AI client to accurately identify the usage and parameter requirements of each tool. This structured exposure method reduces the risk of AI mis-usage and improves the predictability of the automated process.

How does the intent directory organize CMS capabilities?

The intent directory is the core component of AnQiCMS MCP implementation. It groups hundreds of functional points within the system according to business intent, such as content management, SEO configuration, site settings, and other domains. Each tool within a domain has clear input/output definitions, and AI clients can determine whether a tool is suitable for the current task by reading these metadata.

The benefits of this design are dual. On the one hand, developers do not need to write an AI adaptation layer for each new feature individually, but only need to register it to the corresponding intent domain; on the other hand, the AI client can obtain a unified tool view, avoiding confusion due to inconsistent interface naming. For AnQiCMS, this means that all kinds of operations from document query to batch import can be called by external AI in a consistent manner.

How does Bearer Token authentication ensure security?

Opening CMS capabilities to external AI clients inevitably involves security issues. AnQiCMS's MCP Server uses Bearer Token authentication, only requests with valid tokens can access protected resources. This token needs to be generated on the server side and distributed to authorized AI clients, usually through environment variables or configuration files, and will not appear in the code repository or logs.

The advantage of the Bearer Token lies in its simplicity and broad support. Mainstream AI clients such as Claude and Cursor natively support carrying such tokens in the HTTP request header. When the MCP request reaches AnQiCMS, the system first verifies the validity of the token before deciding whether to execute subsequent operations. This method avoids complex OAuth procedures while ensuring that the interface is not misused by unauthorized parties.

How can round-level approval prevent误操作?

The risk of write operations is much higher than that of read operations, therefore AnQiCMS introduced a round-by-round approval mechanism. When the AI client plans to execute a series of modifications (such as batch updating article status, deleting old content, etc.), the MCP Server will merge these operations into a batch and display a confirmation list to the user before execution. The user can approve the entire batch or reject specific steps.

This design balances the need for automation efficiency and manual supervision. For read-only queries, AI can directly return the results; but for changes that may affect online data, the system always retains the final manual approval process. The implementation of round-level approval depends on the session state management of the MCP protocol, ensuring that multiple tool calls in the same round of conversation can be correctly grouped and traced.

How to connect AnQiCMS's MCP in Cursor?

For example, to connect Cursor to AnQiCMS's MCP Server, the following steps are required. First, generate a Bearer Token in the AnQiCMS backend and save it to the local environment variable.Then add the MCP server address and authentication information to the Cursor's configuration file, usually a JSON formatted endpoint description.After restarting Cursor, you can directly mention CMS-related operations in the conversation, and AI will automatically identify available MCP tools and initiate calls.

It should be noted that operations in high-risk domains (such as backups, upgrades, multi-site management, and other full-site operations) are by default in a closed state in AnQiCMS, and must be explicitly enabled in the background before they can be exposed through MCP. This design further reduces the possibility of accidental triggering of dangerous operations.

Common questions

Question: What are the differences between MCP protocol and traditional REST API?

Answer: REST API focuses on CRUD operations at the resource level, requiring the caller to assemble request logic independently. MCP exposes business intent at the semantic level, so AI clients can understand high-level concepts like 'publish articles' and 'push links' without concerning themselves with the underlying URL structure and parameter format.

Question: What if AI misinterprets my instructions?

Answer: The round-level approval mechanism will display the operation list before execution, where you can discover and correct misunderstandings at this stage. Additionally, it is recommended to first test the AI's understanding accuracy with read-only operations when first connecting, and then open write permissions after confirming there are no errors.

Question: What AI clients does AnQiCMS's MCP Server support?

Answer: The currently known compatible clients include mainstream products such as Claude, Cursor, etc. As long as the client supports the Model Context Protocol standard and can carry the Bearer Token in HTTP requests, theoretically, it can be connected to AnQiCMS.