Borrowing it
Nothing to install: this file belongs to alejoair/mcp-terminal. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/alejoair/mcp-terminal/develop/CLAUDE.mdgit clone --depth 1 https://github.com/alejoair/mcp-terminalWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/alejoair/mcp-terminal/claude-md)<a href="https://agentmods.dev/instructions/alejoair/mcp-terminal/claude-md"><img src="https://agentmods.dev/badge/instructions/alejoair/mcp-terminal/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/alejoair/mcp-terminal/claude-md"><img src="https://agentmods.dev/badge/instructions/alejoair/mcp-terminal/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01004 | $0.01004 |
| Opus 5 | $0.00502 | $0.00502 |
| Sonnet 5 | $0.00201 | $0.00201 |
| Haiku 4.5 | $0.00100 | $0.00100 |
Grade C, and why
mcp-terminal CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf dist build *.egg-info src/*.egg-info What it actually says
-
● Arquitectura del Proyecto MCP Terminal
src/mcp_terminal/ ├── core/ # Lógica de negocio │ └── terminal/ │ ├── manager.py # Gestión de sesiones terminales │ ├── session.py # Sesión terminal individual (pty) │ └── buffer.py # Buffer de pantalla virtual │ ├── api/ # Capa HTTP/REST │ ├── dependencies.py # ✅ Singleton TerminalManager │ ├── lifespan.py # ✅ Startup/Shutdown hooks │ └── endpoints.py # 🔜 HTTP endpoints (CRUD terminales) │ ├── models/ # Pydantic schemas │ └── terminal.py # Request/Response models │ └── server.py # 🔜 FastAPI app + CORS + MCP mount
Flujo:
- server.py → Configura FastAPI + middlewares + monta MCP
- endpoints.py → Define rutas HTTP usando TerminalManagerDep
- dependencies.py → Provee singleton de TerminalManager
- core/terminal/ → Implementa lógica de terminales (pty, buffers)
- models/ → Define contratos de API (request/response)
Patrón: Arquitectura en capas con inyección de dependencias (FastAPI Depends).
-
Arquitectura Actual - MCP Terminal
src/mcp_terminal/ ├── server.py # FastAPI app + CORS + MCP mount (56 líneas) ├── api/ │ ├── dependencies.py # Singleton TerminalManager + DI │ ├── lifespan.py # Startup/shutdown hooks │ └── endpoints.py # REST + WebSocket (ahora con operation_id) ├── core/terminal/ │ ├── manager.py # Gestión múltiples terminales + reader interno │ ├── session.py # PTY session individual (terminado) │ └── buffer.py # Buffer visual (pyte) + ANSI parsing └── models/ └── terminal.py # Pydantic schemas (Request/Response)
Flujo:
- create_terminal → Inicia PTY + reader interno
- Reader lee PTY → Actualiza buffer circular (5 snapshots)
- get_snapshot → Consulta cache instantáneo
- send_input → Escribe al PTY
- WebSocket /ws → I/O bidireccional (opcional)
Patrón: Arquitectura en capas + DI + Event-driven (reader interno automático)
Ahora voy a verificar y commitear los cambios de operation_id.
● Arquitectura MCP Terminal
Terminal creado ↓ Reader interno (auto-start) → Lee PTY cada 50ms ↓ Buffer circular (5 snapshots) → Actualizado automáticamente ↓ REST API (consulta cache) + WebSocket (streaming opcional)
Componentes:
- server.py - FastAPI + MCP mount
- api/endpoints.py - 6 endpoints REST + 1 WebSocket
- api/dependencies.py - Singleton TerminalManager
- core/terminal/manager.py - Coordina sessions + buffers + readers
- core/terminal/session.py - PTY wrapper (terminado)
- core/terminal/buffer.py - Screen buffer (pyte)
API:
- create_terminal - Crea PTY + inicia reader
- get_terminal_snapshot - Consulta instantánea del cache
- send_terminal_input - Escribe al PTY
- resize_terminal - Cambia dimensiones
- close_terminal - Limpia recursos
- list_terminals - Lista activos
Stack: FastAPI + terminado (PTY) + pyte (buffer) + asyncio
-
Publicar Nueva Versión en PyPI (Resumen Rápido)
- Actualizar versión en pyproject.toml: version = "0.2.2" # Incrementar
- Limpiar y construir: rm -rf dist build .egg-info src/.egg-info python -m build
- Publicar: python -m twine upload dist/*
- Commit: git add pyproject.toml git commit -m "Bump version to 0.2.2" git push
Versionado: X.Y.Z
- X = Major (breaking changes)
- Y = Minor (nuevas features)
- Z = Patch (bugfixes)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 99 lines · 1,004 tokens per session scan C a345b8a2ac15
mcp-terminal CLAUDE.md is an instructions file published in the GitHub repository alejoair/mcp-terminal (1 stars, last pushed 9mo ago), licensed MIT. It adds 1,004 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.