DOCUMENTATION / VERIFIED v1.0

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.

01 / QUICK START

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.

INSTALL_RELEASE.SH
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
VERIFIED RELEASE PATH

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

CONTRIBUTOR_PATH.SH
git clone https://github.com/OthmaneBlial/term_mcp_deepseek.git
cd term_mcp_deepseek
./startup.sh token
./startup.sh
Stop cleanly: press Ctrl+C. The generated token and in-memory sessions disappear with the process.
Guide de démarrage rapide en français ↗
02 / MENTAL MODEL

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.

  1. Intent. A human or MCP client asks for a concrete local result.
  2. Plan. The server creates a versioned, session-bound execution plan.
  3. Policy. Argv, workspace, paths, network, mode, risk, and limits are resolved.
  4. Approval. A plan-specific state transition is required when policy says so.
  5. Process. Execution uses an argv list, no shell, reduced environment, process group, timeout, and output bounds.
  6. Receipt. Every final state is structured, redacted, and HMAC-signed.
Full architecture and diagrams ↗
03 / APPROVAL MODES

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.

ModeIntended useWritesProject codeApproval
inspectRepository discoveryBlockedBlockedLong processes only
confirmDeliberate local workPolicy-scopedAllowed by policyRequired for risky actions
trustedPre-approved automationPolicy-scopedAllowed by policyPre-approved, always receipted
Important: confirm and trusted modes are not an operating-system sandbox. Build tools and test runners can execute repository code. Use a disposable container or VM for hostile or unknown projects.
04 / MCP CLIENTS

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

MCP_CONFIG.JSON
{
  "mcpServers": {
    "term-mcp-deepseek": {
      "command": "/absolute/path/to/term-mcp",
      "args": ["stdio"],
      "env": {
        "WORKSPACE_ROOT": "/absolute/path/to/your/project",
        "APPROVAL_MODE": "inspect"
      }
    }
  }
}
Client evidenceVersionSTDIOHTTP
Official MCP Python SDK2.1.1Modern + legacy testedModern + legacy tested
MCP Inspector CLI2.4.0tools/list + tools/call testedNot 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 ↗
05 / RECEIPTS

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.

06 / SAFE RECIPES

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.

RUN_RECIPE.SH
term-mcp recipe validate examples/recipes/*.json --workspace .
term-mcp recipe run examples/recipes/inspect-repository.json --workspace .
07 / OPERATIONS

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.

LOCAL_CHECK.SH
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.
Deployment, Docker, headers, and rollback ↗
08 / DEFAULT LIMITS

Bounds are part of the plan.

LimitDefaultPurpose
Session inactivity3,600 secondsExpire abandoned state
Concurrent sessions10Bound memory and process surface
Active process per session1Keep control unambiguous
Command duration20 secondsTerminate runaway work
Command length1,000 charactersBound parsing input
Output per stream1 MiBBound stdout and stderr
HTTP request body64 KiBBound transport input
HTTP rate60/min/addressLimit local abuse
DeepSeek timeout20 secondsBound optional advisor latency
DeepSeek output1,024 tokensBound optional advisor output
09 / SECURITY

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.

No remote multi-tenant guarantee. The server is designed for localhost and one trusted operator. Do not expose it directly to an untrusted network.
No hostile-project host sandbox. Confirm and trusted modes may run project code through allowed build or test tools. Use a disposable OS boundary for untrusted repositories.