HumanCode MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
⌨️ HumanCode MCP
Watch AI program like a human. OpenCode / Claude Code / Codex → MCP Server → VS Code Extension → real Editor API. Open, type, run, fix — all visible on screen.
User: "Create a login page."
HumanCode:
Opening src/pages/Login.tsx ...
Typing ................... 184 chars
Running npm test ...
2 errors detected.
Opening src/components/Input.tsx ...
Fixing ............
Tests passed ✓No mouse-coordinate hacks. No fake animations. Every keystroke is a real progressive edit through the VS Code API. The goal is not to fool anyone — it's observability: supervision, demos, education, recordings, debugging agents.
Architecture
flowchart LR
Client["MCP Client<br/>(OpenCode / Claude / Codex)"] -- "stdio :: vscode_* tools" --> Server["@humancode/mcp-server<br/>(MCP SDK + WS bridge)"]
Server -- "ws://127.0.0.1:38475<br/>hello / request / event / ping" --> Ext["humancode-vscode<br/>(VS Code Extension)"]
Ext -- "Editor API<br/>(window, workspace, Terminal)" --> IDE["Your open project<br/>(what you see on screen)"]MCP Client (OpenCode / Claude / Codex)
│ stdio :: MCP tools (vscode_*)
▼
@humancode/mcp-server (Node, MCP SDK oficial)
│ WebSocket ws://127.0.0.1:38475 :: hello/welcome, request/response, events, ping/pong
▼
humancode-vscode (VS Code Extension)
│ VS Code Editor API (window, workspace, languages, Terminal)
▼
Projeto aberto no VS Code (o que você vê na tela)Transport: WebSocket localhost. Server escuta, extensões discam. Token de sessão (
HUMANCODE_TOKEN), binding padrão127.0.0.1, handshake comprotocolVersionantes de qualquer tool.Protocolo compartilhado:
packages/shared(@humancode/shared) —BridgeRequest/Response/Event, zod schemas,ErrorCode,TypingConfig. Server e extensão importam do mesmo lugar; nada duplicado.Fila:
ActionQueue(idle/running/paused/cancelled/failed) serializa edições — mutex do editor + Pause/Resume/Stop.Typing:
HumanTypingEnginecom presets instant/fast/natural/human/presentation/custom, jitter de delay, pausas contextuais (; , ) } newline), typo simulation opcional (default0), chunk 1–4 chars por edit (barato mas visível), guard contra auto-closing duplicado.Terminal: sempre o integrado real. Leitura via
onDidWriteTerminalData+ shell-integration fallback (documentado no código — a API padrão não expõe buffer PTY).Multi-window: cada extensão tem
instanceId;vscode_list_instances/vscode_select_instance.
Related MCP server: vscode-mcp-api
Monorepo
human-code-mcp/
├── packages/shared/ # protocolo, tipos, schemas zod
├── apps/mcp-server/ # MCP stdio + bridge WS + 25+ tools + security
├── apps/vscode-extension/ # editor/typing/terminal/diagnostics/queue/ui
├── tests/ # typing, queue, protocolo (node:test, determinísticos)
├── examples/opencode|claude-code|codex/Install & build
npm install
npm run build:shared
npm run build:server
npm run build:extension # requer VS Code types; saída em apps/vscode-extension/out
npm test # ver "Testing" abaixoPré-requisitos: Node >= 18, VS Code >= 1.85.
Run
# 1. MCP server (stdio; o bridge WS sobe junto)
HUMANCODE_PORT=38475 HUMANCODE_HOST=127.0.0.1 HUMANCODE_TOKEN=sua-senha \
node apps/mcp-server/dist/index.js
# 2. Extensão: abra apps/vscode-extension no VS Code, F5 (Extension Development Host),
# ou `npx vsce package` + instalar o .vsix. Configure:
# humanCode.bridge.port = 38475, humanCode.bridge.token = sua-senhaMCP client config
OpenCode (opencode.json): ver examples/opencode/ — formato real mcp + type: local.
Claude Code (.mcp.json ou claude mcp add): ver examples/claude-code/.
Codex (~/.codex/config.toml [mcp_servers.humancode]): ver examples/codex/.
Tools (28)
Tool | O que faz |
| conexão, workspace, arquivo ativo, cursor, abas, terminal, fila |
| multi-window |
| abre (linha/coluna, preview) |
| cria |
| digitação visível (preset, cps, delays, typoChance) |
| substitui, com |
| seleciona visualmente |
| backspace/delete/line/selection/range |
| move cursor |
| salva |
| path+conteúdo+cursor+seleção+dirty |
| inteiro ou por linhas, com cap |
| glob/ignore/maxDepth |
| texto + contexto |
| terminal integrado real |
| erros TS/ESLint/etc |
| linguagem |
| controle da fila |
Resources: workspace://status, workspace://diagnostics, workspace://active-file.
Prompt: human-code-development (workflow observar→editar→salvar→diagnosticar→testar→corrigir).
Modes & settings
humanCode.mode:fast(direto) ·human(tudo animado) ·hybrid(anima ≤hybrid.maxAnimatedCharacters, default 300).humanCode.typing.preset: instant/fast/natural/human/presentation/custom + delays,typoChance(default 0).humanCode.followEditor(default true),humanCode.focusLock(true),humanCode.confirmTerminalCommands(never/dangerous/always),humanCode.previewChanges.Status bar: Connected/Typing/Paused/Disconnected → abre o Control Panel (webview com Pause/Resume/Stop).
Command Palette:
HumanCode: Connect/Disconnect/Pause/Resume/Stop/Open Control Panel/Change Mode/Change Typing Speed.
Suggested agent system prompt
You are controlling VS Code through HumanCode MCP.
When editing code:
1. Inspect the current workspace (vscode_get_status, vscode_list_files).
2. Read relevant files (vscode_read_file / vscode_get_active_file).
3. Open the file being changed (vscode_open_file) so the user can watch.
4. Apply changes through HumanCode tools: vscode_type_text for small visible
edits; vscode_replace_range (animate=true) for surgical fixes; create_file
for new files. Prefer targeted modifications over whole-file rewrites.
5. Keep edits observable in Human/Hybrid mode — one logical change at a time.
6. Save after meaningful changes (vscode_save).
7. Inspect diagnostics (vscode_get_diagnostics / vscode_get_problems).
8. Run relevant tests in the integrated terminal (vscode_terminal_run with
waitForCompletion) and read output (vscode_terminal_read).
9. On failure, vscode_reveal_problem, fix visibly, re-run. Fix issues before finishing.
Never run destructive shell commands without explicit user confirmation.Testing
# unit/deterministic (typing com Clock+Random injetados, queue, protocolo):
npx tsx --test tests/*.test.tsTroubleshooting
Sintoma | Causa provável |
| extensão não conectada; confira porta/token e o OutputChannel "HumanCode" |
| versões diferentes de server/extensão; rebuild ambos |
|
|
Terminal |
|
Digitação duplicando | auto-closing; a engine já faz skip-over, reporte o caso |
Security
Loopback-only por padrão (warning se bind não-local), token de sessão, allowlist de execute_command, política de confirmação de comandos destrutivos (rm -rf, del /s, format, shutdown, git reset --hard...), sem any indiscriminado, schemas zod em toda borda.
Limitations (honest)
Leitura de buffer PTY não existe na API estável → stream capture + shell-integration fallback.
vscode.executeCommandallowlist é conservadora; amplie emeditorController.executeCommandse precisar.Typing muito rápido (< 4ms/char) agrupa em chunks — ainda são edits reais.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to access live VS Code editor state, symbol navigation, diagnostics, and language-aware editing through MCP, bridging the gap between what the agent can infer from disk and what the editor actually knows.MIT
- AlicenseNot gradedqualityBmaintenanceExposes a running VS Code instance to AI agents via MCP, enabling file operations, LSP diagnostics, terminal commands, Git workflows, and refactoring.23MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a running VSCode instance for real-time LSP diagnostics, symbol/type information, references, and workspace-wide symbol renames instead of waiting on slow tsc or eslint runs. It also supports listing workspaces, opening files, and executing VSCode commands through the MCP protocol or an equivalent CLI.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and AI coding agents to pull real-time editor intelligence from a running VSCode instance, including LSP diagnostics and hover/definition/signature info, symbol references with usage context, workspace-wide renames, and file opening across open workspaces. This replaces slow tsc/eslint/build round-trips with instant language-server results over a per-workspace socket.-