larik v0.25.0

Guide

MCP servers

Larik connects to Model Context Protocol servers over stdio, streamable HTTP, or SSE. It reads servers from mcp_servers in any Larik settings file, and from a project .mcp.json in the common format, so configs shared with other tools work unchanged:

json
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" }
    },
    "fs": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${HOME}/notes"]
    }
  }
}
  • /mcp-config (also MCP servers in /config) edits only named servers in ~/.config/larik/config.json: add/delete, enable/disable, choose stdio, HTTP or SSE, enter a command or URL, comma-separated arguments and OAuth scopes, environment and header key/value pairs, and optional OAuth client ID, secret and callback port. Credential values are masked and never prefilled. enter replaces one, and d on the selected row clears it — an environment or header entry goes with its key. Leaving a replacement empty changes nothing, so a credential you cannot see is never erased by a stray enter. Saving preserves unrelated fields, secures the personal config to mode 0600, and asks before reloading services with a fresh context (or says to use /reload when unavailable). Project servers and approvals are not edited here. /mcp remains the status, login and approval command.
  • Server tools appear as mcp__<server>__<tool>. In rules, mcp__github covers every tool on that server.
  • ${VAR} and ${VAR:-default} are expanded in the command, args, env, URL, and headers.
  • Trust: servers from shared project files (.mcp.json, .larik/settings.json) don't start until you run /mcp approve <name>. The approval is stored in private project settings and pinned to a hash of the server's config, so editing the command or URL requires re-approval. Servers in personal settings start automatically.
  • Permissions: MCP tools ask before running. The exception is tools that declare both readOnlyHint: true and openWorldHint: false.
  • Stable tool set: servers start in the background at launch, and their tools are loaded before the first request. The tool set then stays fixed for that context so prompt caches stay valid. Newly approved or restarted servers join after /clear or in a new session.
  • Stdio server stderr is written to ~/.local/share/larik/logs/mcp-<name>.log.
  • Text and images in a tool's result are passed to the model. Audio and binary resources are summarized, not sent.
  • Many tools: when the connected servers offer more than 30 tools, or their definitions add up to more than about 6,000 tokens, Larik stops sending every definition with every request. The model gets two tools instead: tool_search, which lists the available tools and returns the definition of the ones it asks for, and call_tool, which runs one by name. Permission rules, prompts and hooks apply to the tool being run, exactly as if it had been called directly, and the conversation shows that tool's name. Set "tool_search": "on" to always do this, or "off" to never (the default is "auto").
  • Resources: when a server offers resources, the model gets list_mcp_resources and read_mcp_resource. You can attach one yourself as @<server>:<uri>; the @ picker lists them under "MCP resources". Text is attached as text and images as images. Images a server's tool returns, such as a screenshot, go to the model too.
  • Prompts: a server's prompts are slash commands named /mcp__<server>__<prompt>, listed in the / palette with their arguments. Arguments go in order, split on spaces, and the last one takes the rest of the line. They work with -p too.
  • OAuth: an http or sse server that asks for sign-in shows as "needs sign-in" instead of opening a browser at startup. Run /mcp login <name>: Larik opens the server's sign-in page, catches the redirect on 127.0.0.1, and keeps the tokens in ~/.config/larik/mcp-auth/ (owner-only), refreshing them as needed, so -p and larik serve use the sign-in too. /mcp logout <name> forgets it. By default Larik registers itself with the server's authorization server; for a server that needs a pre-registered client, set "oauth": {"client_id": "…", "client_secret": "${SECRET}", "callback_port": 8765}, and "scopes" to choose scopes. For token-based servers, use headers instead.

Generated from README.md · section “MCP servers”. Edit that file to change this page.