Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Codemirror Mcp

    CodeMirror extension to hook up a Model Context Provider (MCP)

    78 stars
    TypeScript
    Updated Oct 18, 2025
    codemirror
    codemirror-extension
    mcp

    Table of Contents

    • Features
    • Installation
    • Peer Dependencies
    • Usage
    • Resources
    • Prompts
    • Development
    • License

    Table of Contents

    • Features
    • Installation
    • Peer Dependencies
    • Usage
    • Resources
    • Prompts
    • Development
    • License

    Documentation

    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

    bash
    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

    ts
    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

    bash
    # Install dependencies
    pnpm install
    
    # Run tests
    pnpm test
    
    # Run demo
    pnpm dev

    License

    MIT

    Similar MCP

    Based on tags & features

    • MC

      Mcp Open Library

      TypeScript·
      42
    • AN

      Anilist Mcp

      TypeScript·
      57
    • MC

      Mcp Server Kubernetes

      TypeScript·
      1.1k
    • BR

      Browser Control Mcp

      TypeScript·
      183

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • MC

      Mcp Open Library

      TypeScript·
      42
    • AN

      Anilist Mcp

      TypeScript·
      57
    • MC

      Mcp Server Kubernetes

      TypeScript·
      1.1k
    • BR

      Browser Control Mcp

      TypeScript·
      183

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k