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
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). Tool calls time out after 120 s
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)
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
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"] }
]
}