codemirror-mcp is a CodeMirror extension for integrating the Model Context Protocol (MCP) into the CodeMirror editor, mainly aimed at code editing scenarios that require resource references and prompt commands.
In terms of purpose, the extension is built around two types of interaction: first, resource mentions, and second, prompt commands, enabling the editor to recognize and operate resources and prompts based on the MCP protocol.
The main capabilities include:
- Resource completion: provides autocompletion for @resource mentions.
- Resource decoration: adds visual styling for @resource mentions and supports click handling.
- Prompt completion: provides autocompletion for /prompt commands.
- Theme support: styles are customizable.
- Hover tooltips: display resource details.
In terms of usage, the materials state that the @resource-uri syntax is used to reference resources; resources are visually decorated and clickable, clicking can trigger resource interaction, and hovering can display resource details; the /command syntax is used to use prompt commands, and autocompletion is supported for available prompts.
In terms of dependency requirements, this module requires the following peer dependencies: @codemirror/view, @codemirror/state, @modelcontextprotocol/sdk.
The applicable scenarios are mainly MCP resource references and prompt command integration in the CodeMirror editor environment. Regarding specific installation commands, configuration details, the specific supported editor versions, and the complete API description, the materials do not currently provide them.