Jcode — Configuration Reference

Complete jcode configuration reference. Covers config.toml sections, provider profiles, MCP server setup, memory, swarms, remote gateway, and environment variables.

August 9, 2026
jcodeconfigurationmcpmemoryswarmremote

Jcode — Configuration Reference

Jcode configuration lives at ~/.jcode/config.toml (or $JCODE_HOME/config.toml). Everything has a default, so the file can start empty and grow as you override things. MCP config is separate, in ~/.jcode/mcp.json (global) and .jcode/mcp.json (project).

config.toml

The main sections:

SectionControls
[provider]Default provider and model, reasoning effort, failover
[providers.<name>]Named provider profiles: base URL, key source, models, context windows
[display]Theme, centered layout, diff mode, diagram rendering
[features]Toggles for memory, swarm, mermaid rendering, update channel
[keybindings]Every keybinding
[agents]Swarm model routing, spawn mode, concurrency cap, memory sidecar
[hooks]Shell commands at turn, session, and tool boundaries
[notifications]Turn-complete notifications and sounds
[ambient]Background ambient mode: schedule, budget, work branches

A small example:

[provider]
default_provider = "openai"
default_model = "gpt-5"

[display]
centered = true

[keybindings]
side_panel_toggle = "alt+m"
new_terminal = "alt+enter"

[features]
memory = true
swarm = true

Provider Profiles

Named profiles fill in base URL and key variable for OpenAI-compatible services. Built-ins include openrouter, deepseek, moonshotai, huggingface, nebius. Add a custom one without putting the key in shell history:

printf '%s' "$MY_API_KEY" | jcode provider add my-api \
  --base-url https://llm.example.com/v1 \
  --model my-model-id \
  --api-key-stdin \
  --set-default

Local servers without auth: pass --no-api-key and a localhost base URL. Per-provider keys can also live in ~/.config/jcode/*.env.

MCP Server Configuration

MCP config lives in ~/.jcode/mcp.json (global) and .jcode/mcp.json (project-local). Jcode also reads Claude Code's configs (~/.claude.json and .mcp.json at the repo root) and imports servers from Claude Code and Codex configs on first run.

{
  "mcpServers": {
    "filesystem": {
      "command": "/path/to/mcp-server",
      "args": ["--root", "/workspace"],
      "env": {}
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Notes:

  • Only stdio (command-based) servers are supported today; HTTP and SSE entries are recognized and skipped.
  • Configured MCP tools are advertised the moment a session starts from an on-disk schema cache — a slow server handshake never blocks startup or invalidates the prompt cache.
  • Connections are connect-on-first-call in the background; a call that needs a not-yet-connected server transparently waits for the handshake.

Files Jcode Reads

FilePurpose
AGENTS.mdPer-repo agent instructions, loaded from the working directory
~/AGENTS.mdGlobal agent instructions, loaded in every session
~/.jcode/mcp.jsonGlobal MCP servers
.jcode/mcp.jsonProject-local MCP servers
~/.jcode/swarm-prompt.mdModel routing and structure policy for spawned swarm agents
.jcode/swarm-prompt.mdPer-project swarm policy, overrides the global file
~/.jcode/skills/Installed skills, one directory per skill with a SKILL.md
~/.config/jcode/*.envPer-provider API keys and endpoint overrides

Memory Configuration

Memory is a [features] toggle. When enabled, every turn and response is embedded as a semantic vector; each turn queries a graph of memories via cosine similarity and injects related entries into the conversation. An optional memory sideagent ([agents]) verifies relevance and does more retrieval work before injection.

[features]
memory = true

[agents]
memory_sidecar = true   # spawn a sideagent to verify memory relevance

Swarm Configuration

Swarms let you spawn coordinated multi-agent teams. Policy lives in swarm-prompt.md files — [agents] in config.toml controls routing and limits:

[agents]
spawn_mode = "manual"    # or "auto"
concurrency_cap = 8      # max parallel swarm agents

Jcode detects file conflicts between swarm members and notifies agents when another member changed a file they'd read. Use Alt+N in the TUI to focus the inline swarm panel.

Remote Gateway

The daemon can expose a WebSocket gateway for paired thin clients (built for Tailscale/LAN reachability). Off by default:

[gateway]
enabled = true   # listens on port 7643

Pair devices with:

jcode pair            # prints a 6-digit code and QR (5 minute TTL)
jcode pair --list     # show paired devices
jcode pair --revoke <device>

Tokens are stored hashed on the server. Remote machines can run the server and forward its Unix socket over SSH:

# on the remote
jcode serve --server-name mybox

# on your laptop
ssh -N -L /tmp/jcode-mybox.sock:/run/user/1000/jcode.sock mybox &
jcode --socket /tmp/jcode-mybox.sock -C /local/checkout --remote-working-dir /remote/checkout

Keybindings

Every binding is configurable under [keybindings] using values like "alt+m". Set a binding to "" to disable it.

ActionKey (Win/Linux)macOS
Send immediately (interleaved)EnterEnter
Queue input until turn finishesShift+EnterShift+Enter
Jump to previous/next user promptCtrl+K / Ctrl+JCtrl+K / Ctrl+J
Switch next/previous modelCtrl+Tab / Ctrl+Shift+TabCtrl+Tab / Ctrl+Shift+Tab
Increase/decrease reasoning effortAlt+Right / Alt+LeftCmd+Right / Cmd+Left
Toggle side panelAlt+MAlt+M
Show/dismiss todo cardAlt+XAlt+X
Open /resume session pickerAlt+RCmd+B
New session in new terminal windowAlt+Shift+;Cmd+Shift+;

Environment Variables

VariablePurpose
JCODE_HOMEOverride config directory (default ~/.jcode)
XDG_RUNTIME_DIR/jcode.sockDaemon socket location
~/.config/jcode/*.envPer-provider keys and endpoint overrides