Mikk
Reference

MCP Server Reference

41 tools, 3 resources, millisecond responses — all grounded in your real codebase graph. Connect Mikk to Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client.

Every tool reads from mikk.lock.json

No re-parsing on every call. The dependency graph is loaded once and cached in memory. The cache is busted immediately when mikk.lock.json is written (e.g. after mikk analyze) — the server compares the lock file's mtime against cachedAt on every cache-miss load. After that first load, responses are ~5ms.

Quick Start

mikk mcp                          # start the MCP server
mikk mcp install                  # auto-detect and install into Claude/Cursor/VS Code
mikk mcp install --tool claude    # install into Claude Desktop specifically

Connecting AI Assistants

Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

claude_desktop_config.json
{
  "mcpServers": {
    "mikk": {
      "command": "npx",
      "args": ["-y", "@getmikk/mcp-server", "/absolute/path/to/your/project"]
    }
  }
}
.cursor/mcp.json
{
  "mcpServers": {
    "mikk": {
      "command": "npx",
      "args": ["-y", "@getmikk/mcp-server", "/absolute/path/to/your/project"]
    }
  }
}
mikk mcp install --tool vscode

Staleness Detection

Every tool response includes a warning field when the lock file is stale.

The server uses two mechanisms:

  1. mtime comparison — on every cache-miss, the lock file's mtime is compared against cachedAt. If mikk analyze ran since the last load, the cache is invalidated immediately.
  2. file hash sampling — 5 files are spot-checked against their stored hashes on every load. If any mismatch is found, a staleness warning is included in all responses.

Refresh with mikk analyze, or keep it continuously current with mikk watch.


Tools Reference

Session & Orientation

Prop

Type

Planning & Safety

Prop

Type

Prop

Type

Code Reading

Prop

Type

Analysis

Prop

Type

Security

Prop

Type

Refactoring

Prop

Type


mikk_query_context Parameters

mikk_query_context({
  question: string,           // The architecture question or task
  maxHops?: number,           // Graph traversal depth, 1–12 (default: 4)
  tokenBudget?: number,       // Token cap, 256–20000 (default: 6000)
  focusFile?: string,         // Anchor traversal from a specific file path
  focusModule?: string,       // Anchor traversal from a specific module ID
  strict?: boolean,           // High-precision: only exact keyword matches
  requiredTerms?: string[],   // Terms that must appear in returned functions
  requireAllKeywords?: boolean,   // Require ALL requiredTerms to match (default: false)
  minKeywordMatches?: number,     // Min keyword hits per function in strict mode (default: 1)
  exactOnly?: boolean,            // Hard gate: drop anything not matching (default: false)
  failFast?: boolean,             // Return nothing if strict finds no matches (default: false)
  autoFallback?: boolean,         // If strict returns empty, retry balanced (default: true)
  provider?: 'claude' | 'generic' | 'compact'  // Output format
})

mikk_before_edit Response Shape

{
  "recommendation": "safe | review | block",
  "impactedFunctions": [...],
  "exportedAtRisk": [...],
  "violations": [...],
  "circularDeps": [...],
  "warning": "string | null"
}

recommendation is the primary signal:

  • safe — zero violations, impact < 5 nodes
  • review — violations present OR impact 5–20 nodes
  • block — violations present AND impact > 20, or any critical-classified node

Resources

ResourceURIDescription
Contractmikk://contractFull mikk.json as JSON
Lock filemikk://lockFull mikk.lock.json as JSON
Contextmikk://contextCurrent claude.md content

Session start:     mikk_get_session_context()
Understanding:     mikk_query_context({ question: "How does auth work?", tokenBudget: 6000 })
Find functions:    mikk_search_functions({ query: "auth login" })
Get details:       mikk_get_function_detail({ name: "login" })
Before any edit:   mikk_before_edit({ files: ["src/auth/login.ts"] })
Impact check:      mikk_impact_analysis({ file: "src/auth/login.ts" })
Read code:         mikk_read_file({ file: "src/auth/login.ts", functions: ["login"] })
Security check:    mikk_secrets_scan({ severity: "high" })

Never paste the lock file directly

mikk.lock.json can be 500KB+. Instead, keep it fresh with mikk analyze or mikk watch, then let your AI call focused tools. A full session typically uses fewer than 5,000 tokens total.

Was this page helpful?

On this page