Installation

Get Corn Hub running in your IDE in under 2 minutes

๐Ÿ“‹ Prerequisites

โฌข
Node.js 22+
Required for the MCP server runtime
๐Ÿ“ฆ
pnpm 10+
Monorepo package manager
๐Ÿณ
Docker (optional)
Only needed for the Analytics Dashboard

1Clone & Build

# Clone the repository
git clone https://github.com/Min9802/CornMCP.git
cd CornMCP

# Install dependencies & build
pnpm install
pnpm build

2Connect to Your IDE

Add Corn Hub as an MCP server in your IDE. Replace the path with your actual clone location.

โšก Antigravity / Codex (VS Code)
// STDIO (local):
{
  "mcpServers": {
    "corn": {
      "command": "node",
      "args": ["/path/to/corn-hub/apps/corn-mcp/dist/cli.js"]
    }
  }
}

// HTTP (remote):
{
  "mcpServers": {
    "corn-hub": {
      "url": "https://cornhub.min-services.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}
โ–ถ Cursor
1. Settings โ†’ Features โ†’ MCP
2. Click + Add new MCP server
3. Name: corn ยท Type: command
4. Command: node /path/to/corn-hub/apps/corn-mcp/dist/cli.js
๐ŸŸข Claude Code
claude mcp add corn -- node /path/to/corn-hub/apps/corn-mcp/dist/cli.js

3Launch Dashboard (optional)

docker compose -f infra/docker-compose.yml up -d --build
Dashboard
https://cornhub.min-services.com
API
https://cornhub.min-services.com
MCP Gateway
https://cornhub.min-services.com
Qdrant
http://localhost:6333

โš™๏ธ Environment Variables

VariableDefaultDescription
OPENAI_API_KEYโ€”Voyage AI / OpenAI API key for embeddings
OPENAI_API_BASEhttps://api.voyageai.com/v1Embedding API base URL
MEM9_EMBEDDING_MODELvoyage-code-3Primary embedding model
MEM9_EMBEDDING_DIMS1024Embedding vector dimensions
MEM9_FALLBACK_MODELSvoyage-4-large,...Fallback model rotation chain
DASHBOARD_API_URLhttps://cornhub.min-services.comDashboard API URL
DASHBOARD_API_KEYโ€”API key for MCP โ†’ API communication
AUTH_JWT_SECRETchangemeJWT secret for user authentication
CORS_ORIGINhttp://localhost:3000Allowed CORS origin for dashboard
GEMINI_API_KEYโ€”Google Gemini API key (optional)
QDRANT_URLhttp://<host>:6333Vector database URL

๐Ÿ“ Notes

  • โšกModel Rotation: When the primary Voyage model hits rate limits, Corn Hub auto-rotates: voyage-code-3 โ†’ voyage-4-large โ†’ voyage-4 โ†’ voyage-code-2 โ†’ voyage-4-lite
  • โœ…Quality Gates: All plans must score โ‰ฅ80% on corn_plan_quality before execution. All tasks must submit a corn_quality_report โ‰ฅ60/100.
  • ๐Ÿ’พLocal Fallback: If no API key is set, embeddings use a local hash-based provider (lower quality but zero external dependencies).
  • ๐ŸชŸWindows: Use forward slashes or escaped backslashes in JSON config paths. The MCP server works on Windows, macOS, and Linux.
  • โš ๏ธBuild Required: You must run pnpm build after cloning. The dist/ folder is not committed to Git.