The AI Agent Intelligence Platform β MCP Server + Analytics Dashboard
Surgical code intelligence. Semantic memory. Quality enforcement. Stop burning tokens on full-file reads. Start extracting exactly what your agent needs.
Corn Hub is a Model Context Protocol (MCP) server and real-time analytics dashboard that gives AI coding agents (Antigravity, Cursor, Claude Code, Codex) surgical access to your codebase through 18 specialized tools.
Instead of dumping entire files into the context window, Corn Hub provides:
- π§ Semantic Memory β Agents remember across sessions via vector search
- π Native AST Engine β Real call graphs, type hierarchies, and symbol-level analysis via TypeScript Compiler API
- π Quality Gates β Plans must score β₯80% before execution
- π Live Analytics β Track every tool call, latency, and token savings
- π Multi-Agent Awareness β Agents see each other's changes in real-time
- πΎ Zero External Dependencies β No Docker, no external services. Everything runs locally with SQLite.
How the three services connect and communicate.
graph TB
subgraph IDE["π₯οΈ Your IDE"]
Agent["π€ AI Agent<br/>(Antigravity / Cursor / Claude)"]
end
subgraph MCP["π½ corn-mcp :8317"]
direction TB
Transport["Streamable HTTP Transport<br/>/mcp endpoint"]
Auth["API Key Auth<br/>middleware/auth.ts"]
Tools["18 MCP Tools"]
Telemetry["Telemetry Interceptor<br/>Logs every tool call"]
subgraph ToolGroups["Tool Modules"]
Memory["π§ memory.ts<br/>store / search"]
Knowledge["π knowledge.ts<br/>store / search"]
Code["π code.ts<br/>search / read / context<br/>impact / cypher"]
Quality["π quality.ts<br/>plan_quality / report"]
Session["π session.ts<br/>start / end"]
Analytics["π analytics.ts<br/>tool_stats"]
Changes["π changes.ts<br/>changes / detect"]
Health["π health.ts<br/>health / list_repos"]
end
end
subgraph API["β‘ corn-api :4000"]
direction TB
Hono["Hono REST API"]
Routes["15 Route Modules"]
AST["Native AST Engine<br/>TypeScript Compiler API"]
SQLite[("πΎ SQLite<br/>corn.db")]
VectorDB[("π§² SQLite Vector Store<br/>mem9-vectors.db")]
end
subgraph Dashboard["π corn-web :3000"]
NextJS["Next.js 16 Dashboard<br/>Turbopack"]
end
subgraph Embeddings["βοΈ External (Optional)"]
Voyage["Voyage AI API<br/>voyage-code-3"]
end
Agent -->|"JSON-RPC over HTTP<br/>Bearer Token"| Transport
Transport --> Auth
Auth --> Tools
Tools --> Telemetry
Telemetry -->|"POST /api/metrics/query-log"| Hono
Memory -->|"Embeds + stores vectors"| VectorDB
Memory -.->|"Optional: Voyage AI"| Voyage
Knowledge -->|"Embeds + stores vectors"| VectorDB
Code -->|"POST /api/intel/*"| Hono
Quality -->|"POST /api/quality/*"| Hono
Session -->|"POST /api/sessions/*"| Hono
Analytics -->|"GET /api/analytics/*"| Hono
Changes -->|"POST /api/intel/detect-changes"| Hono
Health -->|"GET /health"| Hono
Hono --> Routes
Routes --> AST
Routes --> SQLite
AST --> SQLite
NextJS -->|"fetch() to :4000"| Hono
style IDE fill:#1a1a2e,stroke:#e94560,color:#fff
style MCP fill:#16213e,stroke:#0f3460,color:#fff
style API fill:#0f3460,stroke:#533483,color:#fff
style Dashboard fill:#533483,stroke:#e94560,color:#fff
style Embeddings fill:#2d2d2d,stroke:#666,color:#aaa
| Connection | Protocol | Description |
|---|---|---|
| IDE β corn-mcp | JSON-RPC over HTTP | AI agent sends tool calls via MCP SDK. Bearer token auth required. |
| corn-mcp β corn-api | REST HTTP (fetch) | Tool handlers call Dashboard API endpoints for data persistence. |
| corn-mcp β SQLite vectors | Direct file I/O | Memory and knowledge tools embed content and store vectors locally. |
| corn-mcp β Voyage AI | HTTPS API | Optional: semantic embeddings for memory/knowledge search. Falls back to local hash if unavailable. |
| corn-api β SQLite | sql.js (in-process) | All data stored in ./data/corn.db β sessions, quality, code graph, analytics. |
| corn-web β corn-api | REST HTTP (fetch) | Dashboard fetches data from :4000 API for real-time visualization. |
| Telemetry | Fire-and-forget POST | Every tool call logs to /api/metrics/query-log for analytics dashboard. |
What happens step-by-step when your AI agent calls a Corn Hub tool.
sequenceDiagram
participant Agent as π€ AI Agent
participant IDE as π₯οΈ IDE (MCP Client)
participant MCP as π½ corn-mcp
participant Auth as π Auth Middleware
participant Tool as π§ Tool Handler
participant API as β‘ corn-api
participant DB as πΎ SQLite
participant Vec as π§² Vector Store
participant Embed as βοΈ Embeddings
Note over Agent,IDE: Agent decides to call corn_memory_store
Agent->>IDE: tools/call {name: "corn_memory_store", params: {...}}
IDE->>MCP: POST /mcp (JSON-RPC, Bearer token)
MCP->>Auth: validateApiKey(request)
Auth-->>MCP: β
valid (agentId: "local-ide")
MCP->>MCP: createMcpServer(env)
MCP->>MCP: new WebStandardStreamableHTTPServerTransport()
MCP->>MCP: mcpServer.connect(transport)
MCP->>Tool: corn_memory_store({content, projectId, tags})
Tool->>Embed: embed(["memory content"])
alt Voyage AI available
Embed-->>Tool: [0.12, -0.34, 0.56, ...] (1024 dims)
else Fallback
Embed-->>Tool: [hash-based vector] (256 dims)
end
Tool->>Vec: INSERT INTO vectors (id, embedding, payload)
Vec-->>Tool: β
stored
Tool-->>MCP: {content: [{type: "text", text: "β
Memory stored (id: mem-abc123)"}]}
MCP->>API: POST /api/metrics/query-log (fire-and-forget telemetry)
Note over API: Logs: tool=corn_memory_store, status=ok, latency=401ms
MCP-->>IDE: JSON-RPC response
IDE-->>Agent: Tool result displayed
Note over Agent: Agent continues with stored memory context
- Stateless: Each request creates a fresh
McpServerinstance β no session state on the server - Auth: Bearer token validated against API keys stored in
corn-apidatabase - Telemetry: Every tool call is logged (tool name, status, latency, input size) as fire-and-forget
- Embedding Fallback: If Voyage AI is rate-limited or unavailable, auto-rotates models then falls back to local hash embeddings
- Model Rotation:
voyage-code-3βvoyage-4-largeβvoyage-4βvoyage-code-2βvoyage-4-lite
Every tool grouped by category, showing what backend each one hits.
graph LR
subgraph Agent["π€ AI Agent"]
Call["Tool Call"]
end
subgraph Memory["π§ Memory (2 tools)"]
MS["corn_memory_store"]
MR["corn_memory_search"]
end
subgraph Knowledge["π Knowledge (2 tools)"]
KS["corn_knowledge_store"]
KR["corn_knowledge_search"]
end
subgraph CodeIntel["π Code Intelligence (7 tools)"]
CS["corn_code_search"]
CR["corn_code_read"]
CC["corn_code_context"]
CI["corn_code_impact"]
CY["corn_cypher"]
LR2["corn_list_repos"]
DC["corn_detect_changes"]
end
subgraph QualityGates["π Quality (2 tools)"]
PQ["corn_plan_quality"]
QR2["corn_quality_report"]
end
subgraph Sessions["π Sessions (2 tools)"]
SS["corn_session_start"]
SE["corn_session_end"]
end
subgraph Analytics2["π Analytics (2 tools)"]
TS["corn_tool_stats"]
CH["corn_changes"]
end
subgraph Health2["π Health (1 tool)"]
HE["corn_health"]
end
subgraph Backends["Backends"]
VecDB[("π§² Vector Store<br/>SQLite")]
APIDB[("πΎ corn-api<br/>SQLite")]
AST2["ποΈ AST Engine"]
Git["π Git CLI"]
end
Call --> Memory & Knowledge & CodeIntel & QualityGates & Sessions & Analytics2 & Health2
MS & MR --> VecDB
KS & KR --> VecDB
CS & CC & CI & CY & LR2 --> APIDB
CS & CC & CI --> AST2
CR --> Git
DC --> Git
DC --> AST2
PQ & QR2 --> APIDB
SS & SE --> APIDB
TS --> APIDB
CH --> APIDB
HE --> APIDB
style Agent fill:#e94560,stroke:#e94560,color:#fff
style Memory fill:#1a1a2e,stroke:#0f3460,color:#fff
style Knowledge fill:#1a1a2e,stroke:#0f3460,color:#fff
style CodeIntel fill:#16213e,stroke:#533483,color:#fff
style QualityGates fill:#0f3460,stroke:#e94560,color:#fff
style Sessions fill:#533483,stroke:#e94560,color:#fff
style Analytics2 fill:#2d2d2d,stroke:#666,color:#fff
style Health2 fill:#1b4332,stroke:#2d6a4f,color:#fff
| # | Tool | Category | Backend | Description |
|---|---|---|---|---|
| 1 | corn_health |
Health | API | System health β services, uptime, version |
| 2 | corn_list_repos |
Code | API + AST | List indexed repositories with symbol counts |
| 3 | corn_code_search |
Code | AST β SQLite | Hybrid vector/AST symbol search |
| 4 | corn_code_read |
Code | Filesystem | Read raw source code from indexed repos |
| 5 | corn_code_context |
Code | AST β SQLite | 360Β° symbol view: callers, callees, hierarchy |
| 6 | corn_code_impact |
Code | AST β SQLite | Blast radius analysis with recursive CTE |
| 7 | corn_cypher |
Code | AST β SQLite | Cypher-to-SQL graph queries |
| 8 | corn_detect_changes |
Code | Git + AST | Uncommitted changes cross-referenced with graph |
| 9 | corn_memory_store |
Memory | Vector DB | Store agent memory with embedding |
| 10 | corn_memory_search |
Memory | Vector DB | Semantic similarity search over memories |
| 11 | corn_knowledge_store |
Knowledge | Vector DB | Store shared knowledge item |
| 12 | corn_knowledge_search |
Knowledge | Vector DB | Semantic search over knowledge base |
| 13 | corn_plan_quality |
Quality | API SQLite | Score a plan against 8 criteria (must β₯80%) |
| 14 | corn_quality_report |
Quality | API SQLite | Submit 4-dimension quality report (must β₯80%) |
| 15 | corn_session_start |
Session | API SQLite | Begin tracked work session |
| 16 | corn_session_end |
Session | API SQLite | End session with summary and decisions |
| 17 | corn_tool_stats |
Analytics | API SQLite | View tool usage analytics and trends |
| 18 | corn_changes |
Analytics | API SQLite | Check for recent commits by other agents |
How your codebase becomes a queryable knowledge graph.
flowchart TD
subgraph Input["π Your Codebase"]
Files["*.ts, *.tsx, *.js, *.jsx files"]
end
subgraph Indexing["ποΈ AST Engine (ast-engine.ts)"]
Collect["collectFiles()<br/>Recursively scan project<br/>Skip: node_modules, dist, .git"]
Parse["ts.createProgram()<br/>TypeScript Compiler API<br/>Full type-aware parsing"]
Extract["AST Walk<br/>Extract symbols + edges"]
Store["SQLite Persist<br/>INSERT into code_symbols<br/>INSERT into code_edges"]
end
subgraph Symbols["π Extracted Data"]
SymTable["code_symbols table<br/>965 rows"]
EdgeTable["code_edges table<br/>407 rows"]
end
subgraph Queries["π Query Layer (intel.ts)"]
Search["searchSymbols()<br/>LIKE + ranking"]
Context["getSymbolContext()<br/>JOIN callers/callees/imports"]
Impact["getSymbolImpact()<br/>Recursive CTE traversal"]
Cypher["executeCypher()<br/>Cypher β SQL translation"]
end
subgraph MCPTools["π½ MCP Tool Surface"]
T1["corn_code_search"]
T2["corn_code_context"]
T3["corn_code_impact"]
T4["corn_cypher"]
end
subgraph AgentUse["π€ Agent Uses"]
Understand["Understand codebase<br/>architecture"]
PlanChanges["Plan changes with<br/>blast radius awareness"]
Navigate["Navigate call graphs<br/>and dependencies"]
Refactor["Safe refactoring with<br/>impact analysis"]
end
Files --> Collect --> Parse --> Extract --> Store
Store --> SymTable & EdgeTable
SymTable & EdgeTable --> Search & Context & Impact & Cypher
Search --> T1
Context --> T2
Impact --> T3
Cypher --> T4
T1 --> Understand
T2 --> Navigate
T3 --> PlanChanges
T4 --> Refactor
style Input fill:#1a1a2e,stroke:#e94560,color:#fff
style Indexing fill:#16213e,stroke:#0f3460,color:#fff
style Symbols fill:#0f3460,stroke:#533483,color:#fff
style Queries fill:#533483,stroke:#e94560,color:#fff
style MCPTools fill:#e94560,stroke:#fff,color:#fff
style AgentUse fill:#2d6a4f,stroke:#40916c,color:#fff
| Symbol Kind | Example | What's Captured |
|---|---|---|
| Function | createLogger() |
Name, params, return type, file, lines, exported?, signature |
| Class | CornError |
Name, extends, implements, methods, properties |
| Interface | Logger |
Name, members, extends |
| Type | LogLevel |
Name, definition |
| Enum | HttpStatus |
Name, members |
| Variable | app |
Name, type annotation, initializer |
| Edge | Meaning | Example |
|---|---|---|
calls |
Function A calls Function B | start() β getDb() |
imports |
File A imports from File B | index.ts β @corn/shared-utils |
extends |
Class A extends Class B | NotFoundError β CornError |
implements |
Class implements Interface | LocalHashEmbeddingProvider β EmbeddingProvider |
Performance: Corn Hub indexes itself (49 files) in ~2 seconds, extracting 965 symbols and 407 edges.
corn-hub/
βββ apps/
β βββ corn-api/ # Dashboard REST API (Hono + SQLite)
β β βββ src/
β β βββ index.ts # Server entry, health checks
β β βββ db/
β β β βββ client.ts # SQLite client (sql.js)
β β β βββ schema.sql # Database schema (code_symbols, code_edges, etc.)
β β βββ services/
β β β βββ ast-engine.ts # π Native TypeScript Compiler API AST engine
β β βββ routes/
β β βββ intel.ts # Code intelligence (search, context, impact, cypher)
β β βββ indexing.ts # Trigger AST analysis for projects
β β βββ analytics.ts # Tool usage analytics
β β βββ knowledge.ts # Knowledge base CRUD
β β βββ projects.ts # Project management
β β βββ providers.ts # LLM provider accounts
β β βββ quality.ts # 4D quality reports
β β βββ sessions.ts # Agent session tracking
β β βββ setup.ts # System info
β β βββ stats.ts # Dashboard metrics
β β βββ system.ts # System metrics (CPU, memory)
β β βββ usage.ts # Token usage tracking
β β βββ webhooks.ts # Webhook endpoints
β β
β βββ corn-mcp/ # MCP Server (18 tools)
β β βββ src/
β β βββ cli.ts # STDIO transport + telemetry interceptor
β β βββ index.ts # Server factory + tool registration
β β βββ node.ts # HTTP transport entry point
β β βββ tools/
β β βββ analytics.ts # corn_tool_stats
β β βββ changes.ts # corn_changes, corn_detect_changes
β β βββ code.ts # corn_code_search/read/context/impact, corn_cypher
β β βββ health.ts # corn_health
β β βββ knowledge.ts # corn_knowledge_search/store
β β βββ memory.ts # corn_memory_search/store
β β βββ quality.ts # corn_plan_quality, corn_quality_report
β β βββ sessions.ts # corn_session_start/end
β β
β βββ corn-web/ # Analytics Dashboard (Next.js 16)
β βββ src/
β βββ app/
β β βββ page.tsx # Main dashboard
β β βββ quality/ # Quality reports & grade trends
β β βββ sessions/ # Agent session history
β β βββ usage/ # Token usage analytics
β β βββ knowledge/ # Knowledge base viewer
β β βββ projects/ # Project management
β β βββ installation/ # IDE setup guide
β β βββ settings/ # Configuration
β βββ components/
β β βββ layout/ # Glassmorphic dashboard shell
β βββ lib/
β βββ api.ts # API client
β
βββ packages/
β βββ shared-mem9/ # Vector DB + Embedding Provider
β β βββ src/index.ts # SQLite vector store, model rotation,
β β # OpenAI/Voyage embeddings, hash fallback
β βββ shared-types/ # Shared TypeScript interfaces
β βββ shared-utils/ # Logger, ID gen, error classes
β
βββ infra/
β βββ docker-compose.yml # Optional Docker stack
β βββ Dockerfile.corn-api
β βββ Dockerfile.corn-mcp
β βββ Dockerfile.corn-web
β βββ nginx-dashboard.conf
β
βββ .agent/
βββ workflows/
βββ corn-quality-gates.md # Mandatory AI quality workflow
Corn Hub includes a built-in TypeScript Compiler API engine that provides real code intelligence β no external services needed.
| Category | Details |
|---|---|
| Symbols | Functions, classes, interfaces, types, enums, variables, methods, properties |
| Edges | Function calls, imports, extends, implements |
| Metadata | File paths, line ranges, export status, signatures, JSDoc comments |
Local Project Directory
β
βΌ
collectFiles() Recursively find all .ts/.tsx/.js/.jsx files
β (skips node_modules, dist, .git, etc.)
βΌ
ts.createProgram() TypeScript Compiler API parses all files
β
βΌ
AST Walk Extract symbols + build dependency edges
β
βΌ
SQLite Storage INSERT into code_symbols + code_edges tables
β
βΌ
Query Functions searchSymbols, getSymbolContext, getSymbolImpact,
executeCypher, getProjectStats
- Call Graph: Who calls
dbRun? β 8 callers across 5 files with exact line numbers - Impact Analysis: What breaks if I change
createLogger? β Recursive CTE traces 6 downstream symbols - Cypher Queries:
MATCH (n:class) RETURN nβ Finds all 10 classes in the codebase - Import Mapping: Which files import from
shared-utils? β Full dependency graph - Type Hierarchies:
CornErrorβNotFoundError,UnauthorizedError,ValidationError
| Metric | Value |
|---|---|
| Files Analyzed | 49 |
| Symbols Extracted | 965 |
| Edges Built | 407 |
| By Kind | 764 variables, 111 functions, 32 interfaces, 28 methods, 16 properties, 10 classes, 1 type |
| Analysis Time | ~2 seconds |
Corn Hub exposes 18 tools via the Model Context Protocol:
| Tool | Description |
|---|---|
corn_memory_store |
Store a memory for cross-session recall |
corn_memory_search |
Semantic search across all agent memories |
corn_knowledge_store |
Save reusable patterns, decisions, bug fixes |
corn_knowledge_search |
Search the shared knowledge base |
| Tool | Description |
|---|---|
corn_code_search |
Hybrid vector + AST search across the codebase |
corn_code_read |
Read raw source from indexed repos with line ranges |
corn_code_context |
360Β° view of a symbol: callers, callees, imports, hierarchy |
corn_code_impact |
Blast radius analysis β recursive CTE on dependency edges |
corn_cypher |
Cypher-like queries translated to SQL against the code graph |
corn_detect_changes |
Analyze uncommitted changes + cross-reference with indexed symbols |
corn_list_repos |
List all indexed repositories with symbol/edge counts |
| Tool | Description |
|---|---|
corn_plan_quality |
Score a plan against 8 criteria (must pass β₯80%) |
corn_quality_report |
Submit 4D quality scores (Build, Regression, Standards, Traceability) |
corn_session_start |
Begin a tracked work session |
corn_session_end |
End session with summary, files changed, decisions |
corn_changes |
Check for recent changes from other agents |
| Tool | Description |
|---|---|
corn_tool_stats |
View tool usage analytics, success rates, latency |
corn_health |
System health check β all services, embedding status |
Every task follows this enforced pipeline:
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β PHASE 0 ββββββΆβ PHASE 1 ββββββΆβ PHASE 2 β
β Session β β Planning β β Execution β
β Start β β β β β
β β β Plan must β β Build & β
β β’ tool_stats β β score β₯80% β β implement β
β β’ changes β β or REJECTED β β β
β β’ memory β β β β β
ββββββββββββββββ ββββββββββββββββ ββββββββ¬ββββββββ
β
ββββββββββββββββ ββββββββββββββββ β
β PHASE 4 βββββββ PHASE 3 βββββββββββββββ
β Session β β Quality β
β End β β Report β
β β β β
β β’ knowledge β β Score must β
β β’ memory β β be β₯80/100 β
β β’ end β β or FAIL β
β β’ stats β β β
ββββββββββββββββ ββββββββββββββββ
Configure in .agent/workflows/corn-quality-gates.md.
- Node.js 22+
- pnpm 10+
- Docker (required for running the full stack)
# Clone
git clone https://github.com/yuki-20/corn-hub.git
cd corn-hub
# Install dependencies
pnpm install
# Start the API backend
cd apps/corn-api && npx tsx src/index.ts
# In another terminal β start the MCP server (HTTP mode)
cd apps/corn-mcp && npx tsx src/node.ts
# In another terminal β start the dashboard
cd apps/corn-web && npx next dev| Service | Port | Description |
|---|---|---|
| corn-api | :4000 |
Hono REST API + SQLite + AST Engine |
| corn-mcp | :8317 |
MCP Gateway (HTTP transport) |
| corn-web | :3000 |
Next.js Dashboard |
β οΈ Replace the path below with where YOU cloned corn-hub.
{
"mcpServers": {
"corn": {
"command": "node",
"args": ["/path/to/corn-hub/apps/corn-mcp/dist/cli.js"]
}
}
}- Settings β Features β MCP
- Click + Add new MCP server
- Name:
cornΒ· Type:command - Command:
node /path/to/corn-hub/apps/corn-mcp/dist/cli.js
claude mcp add corn -- node /path/to/corn-hub/apps/corn-mcp/dist/cli.js| OS | Example Path |
|---|---|
| Windows | C:\Users\You\corn-hub\apps\corn-mcp\dist\cli.js |
| macOS | /Users/You/corn-hub/apps/corn-mcp/dist/cli.js |
| Linux | /home/You/corn-hub/apps/corn-mcp/dist/cli.js |
Once the API is running, create a project and index it:
# Create a project pointing to your local repo
curl -X POST http://localhost:4000/api/projects \
-H "Content-Type: application/json" \
-d '{"name":"My Project","gitRepoUrl":"/path/to/your/repo"}'
# Trigger AST analysis (returns projectId from above)
curl -X POST http://localhost:4000/api/intel/analyze \
-H "Content-Type: application/json" \
-d '{"projectId":"proj-XXXXX"}'docker compose -f infra/docker-compose.yml up -d --buildOpen http://localhost:3000 β the Corn Hub Analytics Dashboard.
Note: Docker is optional. All services run natively with Node.js for development.
| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY |
β | Voyage AI / OpenAI API key for embeddings |
OPENAI_API_BASE |
https://api.voyageai.com/v1 |
Embedding API base URL |
MEM9_EMBEDDING_MODEL |
voyage-code-3 |
Primary embedding model |
MEM9_EMBEDDING_DIMS |
1024 |
Embedding dimensions |
MEM9_FALLBACK_MODELS |
voyage-4-large,voyage-4,voyage-code-2,voyage-4-lite |
Fallback model rotation chain |
DASHBOARD_API_URL |
http://localhost:4000 |
Dashboard API URL |
When the primary model hits rate limits (429), Corn Hub automatically rotates through fallback models:
voyage-code-3 β voyage-4-large β voyage-4 β voyage-code-2 β voyage-4-lite
(best code) (largest gen) (gen-4) (older code) (lightweight)
Each model gets 3 retries with exponential backoff before rotating. Set MEM9_FALLBACK_MODELS to customize.
These numbers are from actual usage, not theoretical projections.
During a live 29-call session on the Corn Hub codebase (55 files, 217 KB):
| Metric | Value |
|---|---|
| Avg tokens per tool call | 137 tokens |
| Avg tokens per file read (standard) | ~1,500 tokens |
| Tool call overhead (29 calls) | 3,966 tokens |
| File re-reads prevented | ~34,600 tokens saved |
| Repo Size | Standard Agent | With Corn Hub | Savings |
|---|---|---|---|
| Small (55 files) | ~195K tokens | ~135K tokens | 30% |
| Medium (200 files) | ~450K tokens | ~180K tokens | 60% |
| Large (1000 files) | ~1.2M tokens | ~250K tokens | 79% |
| Enterprise (5000+) | ~3M+ tokens | ~400K tokens | 87% |
Corn Hub's semantic search is O(1) β it returns ~137 tokens regardless of codebase size.
Error: Cannot find module '.../dist/cli.js'
- Run
pnpm buildfirst β thedist/folder is generated by the build step - Check the path points to YOUR local clone
- On Windows, use forward slashes or escaped backslashes in JSON config
429 Too Many Requests from Voyage AI
- Free tier: 3 RPM, 10K TPM. Corn Hub automatically retries with backoff and rotates models
- Add a payment method at dashboard.voyageai.com for higher limits
Dashboard shows 0 agents / 0 queries
- Restart your IDE to reload the MCP server with the latest telemetry interceptor
- Ensure
corn-apiis running on port 4000
STDIO invalid character '\x1b' errors
- Corn Hub patches
console.logto redirect to stderr. If a dependency bypasses this, check for ANSI color output leaking to stdout.
Code intelligence returns empty results
- Ensure your project is indexed:
POST /api/intel/analyze {"projectId":"..."} - Check the project has
gitRepoUrlset to a valid local directory path
| Layer | Technology | Why |
|---|---|---|
| MCP Server | TypeScript + @modelcontextprotocol/sdk |
Type-safe tool definitions |
| API | Hono 4 | Ultra-fast, 0-dependency HTTP |
| Database | sql.js (WASM SQLite) | In-memory + file persistence, no C++ deps |
| AST Engine | TypeScript Compiler API | Real call graphs, not text grep |
| Vectors | SQLite vector store | Cosine similarity search, no external DB |
| Embeddings | Voyage AI (voyage-code-3) | Best-in-class code retrieval |
| Dashboard | Next.js 16 (Turbopack) | Fast dev, modern React |
| Monorepo | pnpm + Turborepo | Incremental builds |
See the GitHub Releases page for version history and changelogs.
![]() yuki-20 |
![]() AntiTamper |
|---|---|
| π Creator & Lead | π€ Co-Contributor |
MIT Β© yuki-20

