io.github.asklokesh/loki-mode
io.github.asklokesh/loki-mode · 1.1k stars · Shell
MCP server Autonomous spec-to-product coding-agent CLI with an MCP server exposing 39 tools over stdio.
Install
The repo has no one-line install. Follow its README.
Published as
- npm
loki-modestdio
From the server's entry in the official MCP Registry.
Files
Loki Mode
Your agent says done. Loki proves it: an autonomous coding agent that turns a task or issue into a verified pull request with a signed receipt you can check yourself.
Website | Install guide | User guide | CLI reference | Changelog
The npm badge above tracks the current release; see CHANGELOG.md for release notes.
CLI reference: docs/CLI-REFERENCE.md (generated from the command registry).
Install
npm install -g loki-mode
The npm package installs the Bun runtime the engine needs as an optional dependency. Other ways in: bun install -g loki-mode, brew tap asklokesh/tap && brew install loki-mode, or docker pull asklokesh/loki-mode:latest (Docker guide). Upgrade with loki self-update.
Want to see a result before you install or spend anything?
npx loki-mode tour # prints a real receipt from a past build: no key, no spend, no network
First run
Loki needs a model. An ANTHROPIC_API_KEY is enough, or an installed and logged-in Claude Code CLI.
export ANTHROPIC_API_KEY=sk-... cd your-repo loki doctor # names anything missing, exit 0 when ready loki quick "fix the login redirect loop" # one small task, no PR loki "add rate limiting to /api/login" # build, verify, seal a receipt, open a PR loki owner/repo#123 # same, from a GitHub, GitLab or Jira issue
loki "<task>", loki owner/repo#N and loki quick "<task>" run on the Loki 10 engine by default. Add --no-pr to build and verify without opening a pull request, --max-cost <usd> to cap spend (default $100 with an API key, no dollar cap on a subscription), and --provider <name> to pick another coding CLI.
What you get
Every run starts from a delivery contract derived from your task, writes checks from the task alone before touching code, implements, verifies, and ends in exactly one outcome: VERIFIED, ALREADY_SATISFIED, FAILED, BUDGET_STOP, BLOCKED or STALLED (exit codes). If the contract cannot be satisfied as written, the run stops and asks one question instead of guessing.
- A pull request written for a quick review: what the issue asked, what changed, how it was tested, and what was NOT PROVEN. A run that did not verify opens a draft.
- A signed receipt at
.loki/runs/<run-id>/receipt.json, signed with a local Ed25519 key created on first run. - A specialist review when the review council runs: it selects reviewers from a specialist pool (
agents/types.json, scored byrun.sh:FOCUS_KEYWORDS) by matching the changed files and diff against each reviewer's keywords.
loki verify # newest run; or: loki verify <run-id>
loki verify re-hashes the receipt, checks its signature and checks it against the run's event log. It prints VERIFIED (exit 0), TAMPERED (1), UNCHECKED (2) or UNSIGNED (3). On another machine, export the public key with loki keys export and pass it with loki verify --pubkey <file>. A receipt claims only what its checks ran, and lists what they did not; signing proves who produced it, not that the code is bug-free. Details: docs/SIGNED-RECEIPTS.md.
A finished run prints a short summary:
Outcome: VERIFIED
PR: https://github.com/owner/repo/pull/1
Receipt: sha256:2f9a41c7e0b3...
NOT PROVEN: full suite, app boot, council, security scan
Cost: $0.42 (claude, 212k tokens)
Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)
Core commands
| Command | What it does |
|---|---|
loki "<task>" |
Build a task, verify it, seal a receipt, open a PR (--no-pr, --deep, --provider, --max-cost) |
loki owner/repo#N |
The same, from a GitHub, GitLab or Jira issue (issue URLs work too) |
loki quick "<task>" |
One small task, no PR |
loki status [run-id] |
Status of the latest run, or of a given run |
loki verify [run-id] |
Check a receipt's hash, signature and event log |
loki answer [run-id] |
Resume a BLOCKED run with your answer (--text "...") |
loki doctor [--json] |
Check prerequisites, providers and login |
loki control serve |
Start the Control Plane (see below) |
loki dashboard |
Open the Control Plane UI, starting it if needed |
loki tour |
Show a sample receipt offline |
loki --help |
Everything else; loki help <command> for one command |
Full reference: docs/CLI-REFERENCE.md. Engine guide, provider table and model routing: docs/v10/GUIDE.md.
Control Plane
A local UI and API for all your runs: outcomes, receipts, costs, and an answer box for BLOCKED runs. It is on by default (LOKI_CONTROL=0 turns it off) and listens on 127.0.0.1 only.
loki control serve # http://127.0.0.1:47821 (--port N, --db PATH) loki control backfill . # load existing ./.loki/runs loki control status # reachable? how many runs?
While it is running, runs on this machine ship to it automatically. Guides: docs/v10/CONTROL-PLANE.md, container, Helm and ECS, migrating from the old dashboard.
Requirements
loki doctor enforces this list.
Required:
- A model:
ANTHROPIC_API_KEY, or a provider CLI such as Claude Code (claude). Cline, Codex, Aider and opencode are supported as experimental providers. - Python 3.8+ (
python3) - Node.js 20+ (
node) jq- Git 2.x (
git) curl
Recommended:
- Bun 1.3+ (
bun) on your PATH (the npm package also bundles it). - Docker, to run Loki from the published image.
macOS and Linux are supported.
More
- Installation, environment variables, exit codes, known issues, privacy and telemetry
- Agent Change Receipt format: docs/AGENT-CHANGE-RECEIPT.md
- Issue to PR from GitHub Actions, no hosted service: docs/examples/loki-issue-to-pr.yml.example
- Jira and Linear intake: docs/trackers.md. Two-way Slack: docs/slack.md. Multi-repo runs: docs/WORKSPACES.md
- MCP: the bundled server exposes 47 tools over stdio (
loki mcp), including starting a run, reading its status and verifying its receipt. - Claude Code plugin:
claude plugin marketplace add asklokesh/loki-mode, thenclaude plugin install loki-mode@loki-mode. The same marketplace ships loki-seal, a Stop hook that refuses "done" when tests newly fail or were weakened. - Architecture: docs/ARCHITECTURE.md. Upgrading: UPGRADING.md
Contributing
git clone https://github.com/asklokesh/loki-mode.git && cd loki-mode npm install && npm test
See CONTRIBUTING.md, TESTING.md and the Code of Conduct.
License
Business Source License 1.1. Free for personal, internal, academic and non-commercial use; it converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for other arrangements.
Loki Mode is built by Autonomi.
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 1.1k
- Language
- Shell
- Last push
- 2026-10-09
- Forks
- 206
- MCP Registry
- io.github.asklokesh/loki-mode
- Homepage
- www.autonomi.dev
- Topics
- ai-agents, claude, multi-agent, anthropic, spec-driven-development, ai-coding-agents, ai-coding-tools, autonomous-agents, code-verification, codex, devtools, legacy-modernization, software-factory
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k