Skip to content

moka.json

Moka reads a single JSON file (see lookup order). Everything in the Settings UI maps to this file.

{
"$schema": "https://unpkg.com/@mokalabs/sandbox/dist/moka.schema.json",
"version": 1,
"activeWorkspaceId": "demo",
"llms": [],
"mcpServers": [],
"skills": [],
"agents": [],
"catalogs": [],
"workspaces": []
}

Any secret-ish string (API keys, URLs, headers, env values, commands, args) supports:

SyntaxMeaning
env:NAMEThe whole value is $NAME
${NAME}Interpolated inside a string, e.g. Bearer ${TOKEN}

Missing variables resolve to an empty string.

FieldTypeDescription
idstringUnique id, referenced by workspaces
namestringDisplay name
provideropenai · anthropic · google · azure · ollama · openai-compatibleProvider type
modelstringModel id (Azure: deployment name)
apiKeystring?Literal, env:NAME or ${NAME}
baseURLstring?Required for openai-compatible; optional override otherwise
headersobject?Extra HTTP headers
resourceNamestring?Azure resource name
apiVersionstring?Azure API version
useChatApiboolean?OpenAI: use Chat Completions instead of Responses
streamboolean?false: ask for each reply in one response instead of a stream (for gateways that don’t stream reliably). Default: stream
temperaturenumber?0–2
maxOutputTokensinteger?
providerOptionsobject?Passed to the AI SDK as providerOptions
FieldTypeDescription
idstringUnique id (also the tool-name prefix)
namestringDisplay name
transportstdio · http · ssehttp is Streamable HTTP
commandstring?stdio: executable. moka:demo = built-in demo server
argsstring[]?stdio: arguments
envobject?stdio: extra environment variables
cwdstring?stdio: working directory
urlstring?http/sse: endpoint
headersobject?http/sse: request headers
disabledToolsstring[]?Tools hidden from the model
timeoutMsinteger?Connect timeout (default 30000), and the tool-call timeout when toolTimeoutMs isn’t set
toolTimeoutMsinteger?How long to wait for a tool call (default 120000)
resetTimeoutOnProgressboolean?Progress notifications restart the tool timeout (default true; the MCP SDK’s own default is false)
maxTotalTimeoutMsinteger?Hard limit for a tool call, even while progress keeps arriving
oauthboolean | object?http/sse: false disables OAuth sign-in; { clientId?, clientSecret?, scopes? } for pre-registered clients. See sign-in
samplingask · auto · deny?How to handle MCP sampling requests (default: ask)
protocolauto · 2025 · 2026?MCP revision. auto uses 2026-07-28 when the server offers it (default for http and the demo server); 2025 for stdio and sse by default. See MCP 2026-07-28
approvalobject?{ default?: "auto" | "ask", tools?: { [tool]: "auto" | "ask" } }. See tool approvals
FieldTypeDescription
idstringUnique id
pathstring?Skill folder or SKILL.md path (relative to the config file, ~ expanded)
contentstring?Inline SKILL.md (instead of path)
namestring?Override frontmatter name
descriptionstring?Override frontmatter description

Remote agents. See Remote agents.

FieldTypeDescription
idstringUnique id, referenced by workspaces[].agentId
namestringDisplay name
protocola2a · ag-ui
urlstringA2A: agent card or endpoint. AG-UI: run endpoint
headersobject?Request headers (env:NAME / ${NAME} supported)
shareToolsboolean?AG-UI: offer the workspace’s MCP tools as frontend tools

A2UI component catalogs. See custom catalogs.

FieldTypeDescription
idstringUnique id, referenced by workspaces[].generativeUi.catalogIds
namestring?Display name override
pathstring?Catalog JSON file (relative to the config file)
urlstring?Catalog JSON over HTTP(S)
catalogobject?Inline catalog
FieldTypeDescription
idstringUnique id
namestringDisplay name
llmIdstring?Default model (falls back to the first)
agentIdstring?Chat with this remote agent instead of the model
mcpServerIdsstring[]Enabled servers
skillIdsstring[]Enabled skills
systemPromptstring?
starterPromptsstring[]?Chips on an empty chat
maxStepsinteger?1–100, default 12
generativeUiboolean | object?false to turn off the render tool, or settings: toolName, catalogIds, standard, allow, deny, instructions, description, examples, repair, theme. Default on
requireApprovalboolean?Ask before every MCP tool call in this workspace
testsobject[]?Tool tests: id, name?, prompt, expectTools?, forbidTools?, expectArgs? (by tool name), answerIncludes?

App preferences, also under Settings → Config file → Preferences.

FieldTypeDescription
brandingboolean?Show Moka’s branding: the puppy and name in the header, the puppy and “What are we brewing?” on the empty chat, “Message Moka…” in the composer, the tab title and the star line. Default true. Set it to false for a neutral chat when you demo your own product
animationsboolean?Animate the puppy on the empty chat: its eyes follow your cursor, and it plays peekaboo when clicked. Default true. The OS “reduce motion” setting also stops it
starLinkboolean?Show the small “Star it on GitHub” line on the empty chat screen and in the terminal banner. Default true; the line’s Hide link sets it to false
moka.json
{
"$schema": "https://unpkg.com/@mokalabs/sandbox/dist/moka.schema.json",
"version": 1,
"activeWorkspaceId": "support",
"llms": [
{ "id": "gpt", "name": "OpenAI", "provider": "openai", "model": "gpt-5-mini", "apiKey": "env:OPENAI_API_KEY" },
{ "id": "gw", "name": "Gateway", "provider": "openai-compatible", "model": "llama-3.3-70b",
"baseURL": "https://llm.internal.example.com/v1", "apiKey": "env:GATEWAY_KEY", "headers": { "X-Team": "support" } }
],
"mcpServers": [
{ "id": "demo", "name": "Demo tools", "transport": "stdio", "command": "moka:demo" },
{ "id": "gh", "name": "GitHub", "transport": "http", "url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" }, "disabledTools": ["delete_repository"] }
],
"skills": [{ "id": "voice", "path": "skills/brand-voice" }],
"workspaces": [
{ "id": "support", "name": "Support", "llmId": "gpt", "mcpServerIds": ["demo", "gh"], "skillIds": ["voice"],
"systemPrompt": "You are a friendly support agent.", "starterPrompts": ["Draft a reply to a late-delivery complaint"] }
]
}