Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DeepSeek-TUI

Why this agent

DeepSeek-TUI is an open-source terminal AI coding assistant built in Rust as a Codex-style 13-crate workspace. It talks to api.deepseek.com directly, ships sandboxed tool execution on macOS / Linux / Windows, and is both an MCP client AND an MCP server (deepseek mcp serve).

Prerequisites

  • DeepSeek-TUI installed (npm install -g deepseek-tui, cargo install deepseek-tui-cli, or a release binary). deepseek --version must succeed.
  • A DeepSeek API key configured (via deepseek auth or DEEPSEEK_API_KEY env var).
  • espctl installed somewhere stable on disk (full path needed below).
  • (Optional, for remote builds) An Aegis build server URL + MCP_AUTH_SECRET.

Install snippet (or alternative)

DeepSeek-TUI reads MCP servers from ~/.deepseek/mcp.json. Paste the following block (or use deepseek mcp add espctl /path/to/espctl mcp serve from the CLI):

{
  "mcpServers": {
    "espctl": {
      "command": "/path/to/espctl",
      "args": ["mcp", "serve"],
      "env": {
        "CONTROL_BASE_URL": "https://esphome.cloud",
        "MCP_AUTH_SECRET": "your-access-key"
      }
    }
  }
}

Replace:

  • /path/to/espctl — full path to the espctl program on your computer.
  • CONTROL_BASE_URL — your Aegis build server URL. Leave it (and MCP_AUTH_SECRET) out to run in plan-only mode.
  • MCP_AUTH_SECRET — your access key from the build server.

Unlike Claude Code, DeepSeek-TUI is invoked from the project directory (cd /path/to/project && deepseek), so no cwd field is needed in the snippet.

Alternative — fetch a pre-filled snippet:

Read the install://deepseek-tui resource.

First-run verification

Run deepseek mcp list from the project directory to confirm espctl appears in the registered servers, then launch DeepSeek-TUI and ask:

deepseek
> What espctl tools do you have?

Expected: a list of ~40 espctl tools.

Troubleshooting

  • mcp.json parse error on startup → run deepseek mcp list in isolation; the parser error message points at the offending line.
  • Tools listed but every call returns “auth required” → your MCP_AUTH_SECRET is missing or has been revoked. Get a fresh access key from the control plane and paste it into the config.
  • DeepSeek-TUI starts but no MCP servers registered → check that ~/.deepseek/mcp.json exists and is valid JSON. deepseek doctor reports common config issues.

Tested as-of 2026-05-19

DeepSeek-TUI as an MCP server

deepseek serve --http exposes a /v1/* runtime API. If you want DeepSeek-TUI itself to be reachable as an MCP server (in addition to hosting espctl as an MCP client), see DeepSeek-TUI’s RUNTIME_API.md.