1. Conduid
  2. Developer Tools
  3. codemirror
MCP server · Developer Tools

codemirror

CodeMirror plugin for Model Context Provider

Unclaimed devtools
39Low

Scored 5 months ago · breakdown

About codemirror

codemirror is an MCP server published by git+marimo-team in the Developer Tools category: codeMirror plugin for Model Context Provider.

Install

Install
npx @marimo-team/codemirror-mcp
Claude Code
claude mcp add codemirror-mcp-gitmarim -- npx -y @marimo-team/codemirror-mcp
npx
npx -y @marimo-team/codemirror-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about codemirror

Powered by Claude · Grounded in docs

I know everything about codemirror. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

4 checks have not been run yet.

README

codemirror-mcp

A CodeMirror extension that implements the Model Context Protocol (MCP) for resource mentions and prompt commands.

Features

  • Resource Completion: Autocomplete for @resource mentions
  • Resource Decorations: Visual styling for @resource mentions with click handling
  • Prompt Completion: Autocomplete for /prompt commands
  • Theme Support: Customizable styling

Installation

npm install @marimo-team/codemirror-mcp @modelcontextprotocol/sdk
# or
pnpm add @marimo-team/codemirror-mcp @modelcontextprotocol/sdk

Peer Dependencies

This module requires the following peer dependencies:

  • @codemirror/view
  • @codemirror/state
  • @modelcontextprotocol/sdk

Usage

import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
import { mcpExtension, extractResources } from '@marimo-team/codemirror-mcp';
import { EditorView } from '@codemirror/view';

const transport = new WebSocketClientTransport(new URL('ws://localhost:8080'));

const view = new EditorView({
  extensions: [
    // ... other extensions

    mcpExtension({
      // Required options
      transport: transport,

      // Optional options
      logger: console,
      clientOptions: {
        name: 'your-client',
        version: '1.0.0'
      },
      onResourceClick: (resource) => {
        // Open resource
        // e.g. open in a tab, etc.
      },
    }),

    // Handle submit
    keymap.of([
      {
        key: 'Enter',
        run: () => {
          const resources = extractResources(view);
          const formattedResources = resources
            .map(
              ({ resource }) =>
                `${resource.uri} (${resource.type}): ${resource.description || resource.name}`
            )
            .join('\n');
          const prompt = `${view.state.doc.toString()}\n\nResources:\n${formattedResources}`;
          // ... submit prompt to AI server
          // const response = await generateText(prompt);
        },
      },
    ]),
  ],
  parent: document.querySelector('#editor'),
});

Resources

  • Use @resource-uri syntax to reference resources
  • Resources are visually decorated and clickable
  • Click handling for resource interactions
  • Hover tooltips show resource details
  • Customizable theme

Prompts

  • Use /command syntax for prompt commands
  • Autocomplete for available prompts

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Run demo
pnpm dev

License

MIT

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About codemirror

How do I install codemirror?

Run npx @marimo-team/codemirror-mcp, then add the server to your MCP client's configuration.

Is codemirror safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 2 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is codemirror still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.