← Back to archive

Repo of the Day

mokahq/mokalabs

Published: Oct 4, 2026

Open repository ↗

Any LLM, any MCP server, any agent (A2A / AG-UI). Chat, generative UI and a live inspector. npx @mokalabs/sandbox

Summary

Moka is a TypeScript workspace for running LLM chats against MCP servers, skills and external agents without writing glue code. It ships a chat UI, an MCP client, a generative-UI playground and an inspector that streams raw JSON-RPC, token counts and timings. Engineers can launch it with one npx command or embed the headless @mokalabs/core engine in their own code.

What it is useful for

  • Trying an MCP server with a real model before integrating it. The README lists OpenAI, Anthropic, Gemini, Azure OpenAI, Ollama, LM Studio, OpenRouter, Groq, DeepSeek, Mistral, xAI and Together as presets, plus any OpenAI-compatible gateway with a custom base URL and headers.
  • Comparing two models on the same prompt and tool set side by side, including OpenRouter gateways or a corporate proxy.
  • Debugging tool calls. The inspector shows arguments as the model streamed them, as parsed, and as the server received them, with a per-run waterfall, notifications/progress bars and per-server timeouts. Retries of the same call appear as lineage with an error class per attempt and an "outcome unknown" flag for timed-out writes.
  • Working with external agents through A2A or AG-UI (LangGraph, CopilotKit, ADK, etc.); framework RAW events are collapsed into one entry per run, and AG-UI agents can call local MCP tools.
  • Demos and exports: workspaces, presenter mode, replay-of-saved chats with no model calls, and exports to Vercel AI SDK (TypeScript) or LangGraph (Python) code, or to an mcp.json.

How engineers can use it

The simplest path (Node 20+):

export OPENAI_API_KEY=sk-...
npx @mokalabs/sandbox

Moka prints a URL with a one-time access token and opens the browser. From the UI you can add MCP servers from a gallery (Filesystem, Memory, Playwright, Fetch, Git, DeepWiki, Context7, GitHub), paste the mcpServers block from Claude Desktop, Cursor, VS Code or Windsurf, or attach a SKILL.md folder (including ~/.claude/skills). Tools can be toggled per server and called manually without a model.

Other documented entry points:

  • Scaffold a demo: npm create moka@latest my-demo && cd my-demo && npm install && npm start
  • Docker: docker run --rm -p 4000:4000 -e OPENAI_API_KEY ghcr.io/mokahq/moka
  • Headless TypeScript: import { MokaEngine, parseConfig } from "@mokalabs/core" with engine.chat({ messages: [...] }) as an async generator and engine.bus.subscribe(...) for events.

Configuration lives in a moka.json (schema version 1) holding models, MCP servers, skills and workspaces, so setups can be committed. API keys can be written as env:NAME references resolved at request time; literal secrets are stripped from trace exports.

Caveats worth flagging: the server binds to 127.0.0.1 by default and requires the random token, so exposing it on a LAN needs explicit --host 0.0.0.0, which the README marks as opt-in for trusted networks only. Full field-by-field configuration lives in docs/configuration.md, which the README links rather than restates.