Operate the boundary, not a black box.
This is the shortest path from installation to a bounded local result. It also makes the trust boundary explicit before you widen permissions or connect a model.
First signed result.
Requirements: macOS or Linux, Python 3.10–3.13, and pipx. A DeepSeek API key is not required for local discovery, planning, execution, receipts, or the guided demos.
pipx install "git+https://github.com/OthmaneBlial/term_mcp_deepseek.git@v1.0.0"
cd /path/to/the/repository/you/want/to/inspect
term-mcp serve
The server prints a one-time bearer token. Open http://127.0.0.1:8000,
paste the token, select Inspect workspace, then build and execute the
visible pwd plan. The expected result is a signed succeeded
receipt with exit code 0.
From a clone
git clone https://github.com/OthmaneBlial/term_mcp_deepseek.git
cd term_mcp_deepseek
./startup.sh token
./startup.sh
Ctrl+C. The generated token and
in-memory sessions disappear with the process.
One path. No shortcut.
DeepSeek may suggest text, but model output is never an execution trigger. Human and MCP clients use the same deterministic server, policy engine, execution service, and receipt signer.
- Intent. A human or MCP client asks for a concrete local result.
- Plan. The server creates a versioned, session-bound execution plan.
- Policy. Argv, workspace, paths, network, mode, risk, and limits are resolved.
- Approval. A plan-specific state transition is required when policy says so.
- Process. Execution uses an argv list, no shell, reduced environment, process group, timeout, and output bounds.
- Receipt. Every final state is structured, redacted, and HMAC-signed.
Start narrow.
The default is inspect with network denied. A wider mode is a deliberate
operator decision, not something a prompt or model can select.
| Mode | Intended use | Writes | Project code | Approval |
|---|---|---|---|---|
| inspect | Repository discovery | Blocked | Blocked | Long processes only |
| confirm | Deliberate local work | Policy-scoped | Allowed by policy | Required for risky actions |
| trusted | Pre-approved automation | Policy-scoped | Allowed by policy | Pre-approved, always receipted |
STDIO first. HTTP when needed.
The server targets modern MCP 2026-07-28 and supports the legacy
2025-11-25 initialize lifecycle. Both transports share one dispatcher and
tool catalog.
Recommended local STDIO configuration
{
"mcpServers": {
"term-mcp-deepseek": {
"command": "/absolute/path/to/term-mcp",
"args": ["stdio"],
"env": {
"WORKSPACE_ROOT": "/absolute/path/to/your/project",
"APPROVAL_MODE": "inspect"
}
}
}
}
| Client evidence | Version | STDIO | HTTP |
|---|---|---|---|
| Official MCP Python SDK | 2.1.1 | Modern + legacy tested | Modern + legacy tested |
| MCP Inspector CLI | 2.4.0 | tools/list + tools/call tested | Not tested |
“Not tested” is preserved as evidence, not converted into a compatibility claim. STDOUT contains protocol JSON only; diagnostics go to STDERR.
Dated compatibility matrix and reproduction commands ↗Readable locally. Safe to redact.
Schema 1.0 records command digest, mode, risk, approval, policy, status, timestamps, duration, exit code, signal, bounded stdout/stderr, truncation, and signature.
- succeeded — the bounded process reached exit code 0.
- failed — the process completed unsuccessfully without being conflated with cancellation.
- cancelled — an operator stopped the process and the termination signal is retained.
- timed_out — the approved hard duration was crossed.
A share-safe export replaces command, workspace, arguments, stdout, and stderr with
redaction markers, adds sharing_redacted: true, then signs the transformed
receipt again.
Portable inspection workflows.
Public recipes declare intent, prerequisites, permissions, steps, expected output, anonymized receipt preview, and risk. Semantic validation requires inspect mode, no network, no writes, low risk, and production-policy acceptance.
term-mcp recipe validate examples/recipes/*.json --workspace .
term-mcp recipe run examples/recipes/inspect-repository.json --workspace .
Fail closed by configuration.
The no-key defaults are sufficient for local inspection. Use term-mcp doctor
--json to verify Python, shell, typed configuration, workspace permissions, and
STDIO readiness.
cp .env.example .env
term-mcp token
term-mcp doctor --json
term-mcp demo
- AUTH_TOKEN — generated ephemerally when absent; configured values shorter than 32 characters are refused.
- WORKSPACE_ROOT — keep it scoped to the smallest directory needed.
- ALLOW_NETWORK — false by default; widen only for a specific reviewed workflow.
- ALLOWED_ORIGINS — exact origins only; wildcard configuration is refused.
- DEEPSEEK_API_KEY — optional and used only by the isolated advisory panel.
Bounds are part of the plan.
| Limit | Default | Purpose |
|---|---|---|
| Session inactivity | 3,600 seconds | Expire abandoned state |
| Concurrent sessions | 10 | Bound memory and process surface |
| Active process per session | 1 | Keep control unambiguous |
| Command duration | 20 seconds | Terminate runaway work |
| Command length | 1,000 characters | Bound parsing input |
| Output per stream | 1 MiB | Bound stdout and stderr |
| HTTP request body | 64 KiB | Bound transport input |
| HTTP rate | 60/min/address | Limit local abuse |
| DeepSeek timeout | 20 seconds | Bound optional advisor latency |
| DeepSeek output | 1,024 tokens | Bound optional advisor output |
Know what is—and is not—guaranteed.
Inspect mode parses commands without a shell, blocks interpreters and network clients, validates paths against the workspace, rejects symlink escapes, and emits signed, redacted receipts.