codemirror-mcpSAFE
CodeMirror extension to hook up a Model Context Provider (MCP)
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A CodeMirror extension that implements the Model Context Protocol (MCP) for resource mentions and prompt commands.
Features
- Resource Completion: Autocomplete for
@resourcementions - Resource Decorations: Visual styling for
@resourcementions with click handling - Prompt Completion: Autocomplete for
/promptcommands - 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 ga8a9a9f0768aOBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add codemirror-mcp -- npx -y @marimo-team/[email protected]
{
"mcpServers": {
"codemirror-mcp": {
"command": "npx",
"args": [
"-y",
"@marimo-team/[email protected]"
]
}
}
}Exposed tools (4)
4 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
file.txt | read | A file |
prompt1 | read | Test prompt 1 |
prompt2 | read | Test prompt 2 |
test.txt | read | A test file |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
CLAUDE.md
@biomejs/biome, @codemirror/lang-javascript, @codemirror/lang-markdown, @codemirror/view, @modelcontextprotocol/sdk, @types/node, @uiw/codemirror-extensions-mentions, codemirror
Gates applied: no_behavioural_pass.
a8a9a9f0768afull audit observations/trust-audit/mcp-server/marimo-team__codemirror-mcp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | a8a9a9f0768a | SAFE | B | 89 | first audit |
Questions
What is the @marimo-team/codemirror-mcp MCP server?
CodeMirror extension to hook up a Model Context Provider (MCP)
What tools does @marimo-team/codemirror-mcp expose?
4 in total: 4 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is @marimo-team/codemirror-mcp safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does @marimo-team/codemirror-mcp need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (a8a9a9f0768a), read on 2026-10-12. The repository is watched and re-audited when it changes.