NEET
MikoshiMikoshi

Give your AI agent
eyes on your codebase.

Mikoshi is a local-first CLI + MCP server. It indexes your repo, builds a dependency graph, and serves structured code context to AI agents — GitHub Copilot, Claude, Cursor, Codex — through the Model Context Protocol. No cloud. No telemetry. Your code never leaves your machine.

Quickstart
Install
$ npm install -g mikoshi
Index
$ mikoshi index ~/project
Search
$ mikoshi search ~/project "DM attachment upload"
MCP
$ mikoshi-mcp
What it does

An MCP server that understands your code — not just your files.

Most AI agents get raw file dumps when they ask about code. Mikoshi gives them structured, ranked, enriched context: function signatures, call graphs, usage examples, related tests — all compressed to fit a token budget. The agent asks a natural language question; Mikoshi returns the exact code context it needs to answer correctly.

The ONNX embeddings model runs locally at ~/.mikoshi/models/. No API keys required for semantic search.

Properties
Zero cloud
Offline ONNX embeddings
MCP stdio transport
Read-only by default
BM25 + semantic hybrid
How it works

7-stage retrieval pipeline

Every query runs through a full pipeline before results reach your agent.

01
Query understanding
Extracts intent, keywords, and rewrites the query for better embedding matching.
02
Multi-query expansion
Generates 3 alternative phrasings. Results are merged by best score per chunk.
03
Hybrid search
BM25 lexical + cosine semantic over local ONNX embeddings. Scores merged at α=0.5.
04
Smart ranking
6-factor weighted score: semantic, structural (graph hops), recency, frequency, type match, task type.
05
Reranking
Keyword overlap + name match bonus. Diversity penalty prevents all results from the same file.
06
Context enrichment
Pulls in imports, function signatures, real usage examples, related tests.
07
Token-budget compression
High-score chunks get full content. Low-score get signature-only. Stops at 4000 tokens.
MCP tools

10 tools exposed to your agent

Once connected, your AI agent can call these tools directly — no prompt engineering needed.

Mikoshi Context-Engine
Full 7-stage search — the main retrieval tool.
get_code_web
Dependency graph neighborhood for a symbol.
explain_symbol
Callers, callees, imports, and where it's used.
impact_analysis
What breaks if you change X — transitive callers.
diff_review
Affected symbols from a git diff.
supabase_introspect_schema
Tables, columns, indexes, FKs, views, functions.
supabase_list_rls_policies
All Row Level Security policies for a project.
supabase_validate_security
Finds NO_RLS tables, USING(true) policies, anon write grants.
supabase_list_roles
Roles and privilege grants.
supabase_sql
Execute SQL — read-only by default, write requires explicit flag.
Install

Get running in 60 seconds

Install globally
$ npm install -g mikoshi
Check everything works
$ mikoshi doctor
Index your repo
$ mikoshi index ~/your-project
Test search
$ mikoshi search ~/your-project "how auth works"
MCP config

Connect to GitHub Copilot

Add this to .vscode/mcp.json in your workspace. Works with Copilot, Claude, Cursor, and any MCP-compatible client.

{
  "servers": {
    "Mikoshi-mcp": {
      "type": "stdio",
      "command": "mikoshi-mcp",
      "cwd": "${workspaceFolder}"
    }
  }
}

The MCP server warms up the embeddings model in the background on start — the first query is fast.

Supabase

Database intelligence for AI agents

Connect Mikoshi to your Supabase project and your AI agent can introspect your schema, audit RLS policies, list roles, and run SQL — all with safety gates built in.

Read-only SQL by default
Write mode requires explicit flag
All mutations audited to ~/.mikoshi/supabase-audit.jsonl
Secrets redacted from all error output
CLI commands
$ mikoshi supabase connect
OAuth PKCE — opens browser
$ mikoshi supabase schema <ref>
Full introspection
$ mikoshi supabase security <ref>
Security audit
$ mikoshi supabase roles <ref>
Roles + grants
$ mikoshi supabase sql <ref> "SELECT ..."
Read-only SQL

Your codebase. Your machine. Your agent.

Install once. Index any repo. Connect any MCP client.