Jcode — Configuration Reference
Complete jcode configuration reference. Covers config.toml sections, provider profiles, MCP server setup, memory, swarms, remote gateway, and environment variables.
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:
| Section | Controls |
|---|---|
[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
| File | Purpose |
|---|---|
AGENTS.md | Per-repo agent instructions, loaded from the working directory |
~/AGENTS.md | Global agent instructions, loaded in every session |
~/.jcode/mcp.json | Global MCP servers |
.jcode/mcp.json | Project-local MCP servers |
~/.jcode/swarm-prompt.md | Model routing and structure policy for spawned swarm agents |
.jcode/swarm-prompt.md | Per-project swarm policy, overrides the global file |
~/.jcode/skills/ | Installed skills, one directory per skill with a SKILL.md |
~/.config/jcode/*.env | Per-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.
| Action | Key (Win/Linux) | macOS |
|---|---|---|
| Send immediately (interleaved) | Enter | Enter |
| Queue input until turn finishes | Shift+Enter | Shift+Enter |
| Jump to previous/next user prompt | Ctrl+K / Ctrl+J | Ctrl+K / Ctrl+J |
| Switch next/previous model | Ctrl+Tab / Ctrl+Shift+Tab | Ctrl+Tab / Ctrl+Shift+Tab |
| Increase/decrease reasoning effort | Alt+Right / Alt+Left | Cmd+Right / Cmd+Left |
| Toggle side panel | Alt+M | Alt+M |
| Show/dismiss todo card | Alt+X | Alt+X |
| Open /resume session picker | Alt+R | Cmd+B |
| New session in new terminal window | Alt+Shift+; | Cmd+Shift+; |
Environment Variables
| Variable | Purpose |
|---|---|
JCODE_HOME | Override config directory (default ~/.jcode) |
XDG_RUNTIME_DIR/jcode.sock | Daemon socket location |
~/.config/jcode/*.env | Per-provider keys and endpoint overrides |
Related Pages
- MCP Setup in Jcode — step-by-step MCP configuration
- Jcode Getting Started — Installation and provider setup
- Prompt Engineering in Jcode — hill-climbable goals and todo discipline
- Memory, Swarms & Self-Dev — advanced workflows
- MCP Section — Browse MCP servers
- Agent Skills (Agents Section) — cross-tool SKILL.md standard
Related Articles
Tabnine — AI Coding Tool Guide
Enterprise-focused AI code assistant with code privacy, on-premise deployment, and team learning. Configuration and prompt patterns for Tabnine Chat.
Codex CLI — AI Coding Tool Guide
OpenAI's open-source CLI coding agent. Reasoning strategies, task decomposition, sandboxed execution, and configuration for multi-model workflows.
OpenCode — AI Coding Agent
Complete guide to OpenCode, the terminal-based AI coding agent. Covers installation, prompt engineering, configuration, providers, skills, and best practices.