# Dscode

> dscode is a coding agent that empowers digital and knowledge work. It uses MCP to connect creative workflows with the coding agent, and provides a web UI to support and showcase a variety of digital studio tasks.

- **Type:** MCP server
- **Install:** `agentstack add mcp-creativedswork-dscode`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [creativedswork](https://agentstack.voostack.com/s/creativedswork)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [creativedswork](https://github.com/creativedswork)
- **Source:** https://github.com/creativedswork/dscode

## Install

```sh
agentstack add mcp-creativedswork-dscode
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

A digital studio for content-driven creation.
    Code, write, design, and build — with an AI that thinks like a maker.
  

  
  =20" />
  
  

  中文文档

---

## See it in action

  

> dscode's editorial workshop — a creative space for code, design, and conversation.

## What makes dscode different

### 🧠 Agent as OS

dscode is designed as an operating system for Agents: the Harness is the Kernel, the Main Agent is PID 1, SubAgents are processes, `Agent.md` files are Applications, Sessions are TTYs, Drivers are device interfaces, and MCP servers are external devices. This keeps execution generic and composable — new Agent capabilities come from configuration, not specialized runtimes.

**Applications are configured. Agents are processes. Sessions are TTYs.**

### 🔌 MCP-First

Digital studios don't use one tool. They use ten. MCP turns every tool into an API — dscode is the Agent system that orchestrates them. Blender for 3D modeling, PlayCanvas for real-time graphics, browser automation for testing, documents for specs, spreadsheets for data. If your production tool has an MCP server, dscode brings it into the workflow.

**Your toolchain. Coordinated Agents. All through MCP.**

### 🧬 Spec-Driven Development

dscode is built entirely through **spec coding** with [OpenSpec](https://github.com/Fission-AI/OpenSpec). Every feature begins as a formal spec — `openspec/specs/` is the source of truth, code is the implementation. We don't encourage manual commits; all design and development flows through the SDD pipeline.

**Code is the implementation of specs — not the other way around.**

### 🔍 MCP Tool Search

Too many MCP servers? Context explosion is a real problem when every tool schema competes for token budget. dscode ships with a built-in `search_tools` driver — MCP tools are discovered **on-demand** by the model, not pre-loaded. Only the tools actually needed enter the context window. Connect dozens of MCP servers without worrying about overhead.

**All the tools. None of the bloat.**

### 🎨 Editorial Workshop

dscode is not a chatbot with a dark theme. It's a **digital studio** — a creative workspace with editorial typography, generous whitespace, and a warm, tool-like aesthetic. The interface is designed for makers: phase-labeled message groups, serif structural labels, sidebar detail panels, and a Dashboard that's a mode of Chat, not a separate page. Every pixel earns its place.

**A creative space. Not just a chat window.**

---

## Capabilities

  🖥 Terminal + Web
  Full TUI with streaming, thinking, tool calls, per-turn token usage & cost stats. Modern React Web UI with identical feature parity via WebSocket.

  🔌 MCP Connector
  Stdio, Streamable HTTP (MCP 2025-11-25), legacy SSE fallback. Auto transport inference. MCP App sandbox for server-driven UI.

  🛡 Agent Harness
  OS-style Agent processes with Agent.md Applications, foreground/background execution, process control, Worktree isolation, permissions, and persistence.

  📦 Skills System
  Declarative third-party extensions via SKILL.md. On-demand activation. User-level + project-level scopes.

  ⚙️ SubAgents
  Claude Code-compatible Agent.md Applications with foreground/background execution, inline activity, process control, and persisted results.

  🔧 Open Design
  AI-driven visual design workspace with frontend generation, image-to-code, and design-system management. Integrated via MCP.

  🎬 Dashboard & Motion
  Chat↔Dashboard cascade transition with physics-based "dscode" cluster animation. Session dashboard with context-window usage bar.

  📐 Hash-Anchor Editing
  Content-addressable file editing with 3-level adaptive resolution, atomic batch operations, checkpoint safety rollback, and structured invalidation scopes.

  🔁 Retry & Resilience
  Exponential backoff with configurable retry policy. Handles rate limits, timeouts, and server errors transparently. Respects Retry-After headers.

> **Tip:** In TUI, paste clipboard images with `Ctrl+V` (macOS) or `/image clipboard`.

---

## Agent as OS

The Main Agent runs as PID 1 and delegates work to independent SubAgent
processes. Applications use **Claude Code-compatible `Agent.md` files**; dscode
automatically discovers user and project definitions from `.claude/agents`
alongside native `.dscode/agents` directories. Terminal and Web conversations
show foreground and background process activity with persisted results.

The bundled [`vision.md`](resources/agents/vision.md) uses the same SubAgent
runtime and falls back to Tesseract OCR when needed. See
[Agent.md configuration and usage](docs/AGENT_MD.md) for supported fields,
discovery priority, and process tools, or read the full
[Agent as OS architecture](docs/ARCHITECTURE.md#设计哲学).

---

## MCP in 30 seconds

```jsonc
// ~/.dscode/settings.json
{
  "mcpServers": {
    "blender": {
      "command": "uvx",
      "args": ["blender-mcp"]
    },
    "playwright": {
      "command": "npx",
      "args": ["@anthropic/mcp-playwright"]
    }
  }
}
```

dscode auto-connects on launch. Tools appear as `mcp_blender_*` and `mcp_playwright_*`. MCP servers can also serve sandboxed UI via the App Host — no boilerplate, no SDK, no glue code.

### See what MCP can do

  
  PlayCanvas + MCP — build a jump game entirely through natural language

  
  Blender + MCP — 3D modeling and scene composition through conversation

> **Tip:** Videos play inline — these are real MCP workflows, click to watch.

## Install

```bash
npm install -g @creative-dswork/dscode
dscode              # Terminal UI
dscode --web        # Web UI → http://localhost:3000
```

> First launch? Run `/config key ` and `/config model deepseek-v4-pro` to get started. Type `/help` for the full guide.

**Build from source:**

```bash
git clone https://github.com/creativedswork/dscode.git
cd dscode && npm install && npm run build
node dist/dscode.mjs
```

---

## Configuration

dscode uses two levels of `settings.json`, merged with project settings overriding user settings:

| Scope | Path | Purpose |
|-------|------|---------|
| User | `~/.dscode/settings.json` | Defaults across all projects |
| Project | `.dscode/settings.json` | Per-project overrides |

> **Note:** Model configuration (`provider`, `modelId`, `apiKey`, `thinkingLevel`) lives in `~/.dscode/config.json`, managed via `/config` commands. Type `/help` in-session for the full command list.

### Quick reference

```jsonc
// ~/.dscode/settings.json
{
  // --- MCP Servers ---
  "mcpServers": {
    "blender": {
      "command": "uvx",
      "args": ["blender-mcp"]
    },
    "playwright": {
      "command": "npx",
      "args": ["@anthropic/mcp-playwright"]
    },
    "my-api": {
      "url": "https://my-mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer " }
    }
  },

  // --- Permissions ---
  "permissions": {
    "allow": [
      "Bash(git add *)",
      "Bash(npm *)"
    ],
    "deny": [
      "Bash(rm -rf *)"
    ],
    "rules": [
      { "tool": "Bash(curl *)", "decision": "allow", "priority": 5 }
    ]
  },

  // --- Skills ---
  "skills": ["brandkit", "minimalist-ui"],

  // --- Agent Applications ---
  "agents": { "enabled": true },
  "agentModelAliases": {
    "haiku": "deepseek/deepseek-v4-flash",
    "sonnet": "deepseek/deepseek-v4-pro"
  },

  // --- Retry ---
  // Controls how dscode retries failed API calls (rate limits, timeouts, server errors).
  // Uses exponential backoff: starts at baseDelayMs, doubles each retry, capped at maxDelayMs.
  "retry": {
    "maxRetries": 3,           // Max retry attempts before giving up
    "baseDelayMs": 1000,       // Initial delay before first retry (ms)
    "maxDelayMs": 30000,       // Upper bound on backoff delay (ms)
    "retryOnTimeout": true,    // Retry when the provider times out
    "retryOnRateLimit": true,  // Retry when hitting rate limits (respects Retry-After header)
    "retryOnServerError": true // Retry on 5xx server errors
  },

  // --- @-file limits ---
  "atFileMaxFiles": 5,
  "atFileMaxFileSize": 51200,
  "atFileMaxTotalSize": 204800
}
```

### MCP server config

Each server under `mcpServers` supports:

| Field | Type | Description |
|-------|------|-------------|
| `command` | string | Executable (for stdio transport) |
| `args` | string[] | Arguments passed to the command |
| `url` | string | HTTP endpoint (for streamable-http transport) |
| `env` | object | Extra environment variables for the server process |
| `headers` | object | Custom HTTP headers |
| `transport` | string | `"stdio"` \| `"streamable-http"` \| `"sse"` (auto-detected if omitted) |
| `preferredProtocolVersion` | string | `"2025-11-25"` \| `"2025-03-26"` \| `"2024-11-05"` |
| `requestTimeoutMs` | number | Per-request timeout |
| `connectTimeoutMs` | number | Connection timeout |

> **Tip:** Transport is auto-detected — if `url` is set without `command`, streamable-http is used. Otherwise stdio.

### Environment variables

All settings can also be set via environment variables for CI / containers:

| Variable | Setting |
|----------|---------|
| `DEEPSEEK_API_KEY` | API key (provider-specific vars also supported: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.) |
| `AGENT_PROVIDER` | Provider override |
| `AGENT_MODEL` | Model override |
| `AGENT_THINKING_LEVEL` | Thinking level override |
| `AGENT_VISION_PROVIDER` | Vision model provider |
| `AGENT_VISION_MODEL` | Vision model ID |
| `DSCODE_MAX_TOKENS` | Max tokens |
| `DSCODE_CONFIG_HOME` | Custom config directory (default: `~/.dscode`) |
| `DSCODE_DATA_HOME` | Custom data directory |
| `DSCODE_PROJECT_PATH` | Project directory |
| `DSCODE_AGENTS_ENABLED` | Enable Agent process tools (`false` restores single-Agent behavior) |
| `DSCODE_MANAGED_AGENTS_DIR` | Highest-priority managed Agent Application directory |
| `DSCODE_RETRY_MAX_RETRIES` | Retry max retries |
| `DSCODE_RETRY_BASE_DELAY_MS` | Retry base delay |
| `DSCODE_RETRY_MAX_DELAY_MS` | Retry max delay |

---

## Open Design

dscode integrates **[Open Design](https://github.com/wangcan26/open-design)** — a visual design workspace that brings AI-driven frontend generation directly into your workflow. Think of it as Figma meets AI: design tokens, components, and entire layouts generated through natural language, with real-time preview and iteration.

### What Open Design does for dscode

- **Visual design workspace** — create, edit, and iterate on frontend designs without leaving dscode
- **Image-to-code** — generate production-ready HTML/CSS from design mockups
- **Design system management** — maintain consistent design tokens, typography scales, and color palettes across projects
- **Multi-file artifact generation** — produce complete frontend projects with structured file trees

### Installation

```bash
git clone https://github.com/wangcan26/open-design.git
cd open-design
npm install
```

Then configure the MCP server in `~/.dscode/settings.json`:

```jsonc
{
  "mcpServers": {
    "open-design": {
      "command": "npx",
      "args": [
        "tsx",
        "/path/to/open-design/apps/daemon/src/cli.ts",
        "mcp",
        "--daemon-url",
        "http://127.0.0.1:7456"
      ]
    }
  }
}
```

---

## Contributing

dscode is currently a single-developer SDD project and does not accept direct code contributions (Pull Requests).

We welcome bug reports, feature ideas, and technical discussions via **[GitHub Issues](https://github.com/creativedswork/dscode/issues)**. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full policy.

| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution policy & how the SDD workflow operates |

## Learn more

| Document | What's inside |
|----------|---------------|
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | Full architecture: Agent as OS, 6-layer design, Driver/Skill model, source tree |
| [AGENT_MD.md](docs/AGENT_MD.md) | Agent.md setup, supported fields, Claude Code compatibility, process tools |
| [CONTRIBUTING.md](CONTRIBUTING.md) | How to contribute: philosophy alignment, OpenSpec SDD workflow, coding conventions |
| [STYLE.md](docs/STYLE.md) | TypeScript coding style: naming, imports, module structure, error handling |
| [Documentation archive](docs/archive/README.md) | Historical plans and research; not a source of current behavior |

---

## Acknowledgments

dscode stands on the shoulders of:

- **[OpenSpec](https://github.com/Fission-AI/OpenSpec)** — the spec-driven development framework that shapes our entire workflow

- **[@earendil-works/pi-ai](https://www.npmjs.com/package/@earendil-works/pi-ai) / [pi-agent-core](https://www.npmjs.com/package/@earendil-works/pi-agent-core)** — agent loop and model abstraction foundation
- **[taste-skill](https://github.com/Leonxlnx/taste-skill)** — Leonxlnx's design taste skill system, inspired our skills architecture
- **[@_can1357](https://x.com/_can1357/status/2021828033640911196)** — hash-anchor editing protocol, the cornerstone of our `edit` tool

---

  If you like this project, give it a ⭐ Star — your support keeps dscode evolving.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [creativedswork](https://github.com/creativedswork)
- **Source:** [creativedswork/dscode](https://github.com/creativedswork/dscode)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-creativedswork-dscode
- Seller: https://agentstack.voostack.com/s/creativedswork
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
