← Back to home

How Polydev Works

Technical architecture behind multi-model consultation, CLI-as-API tunneling, and crowdsourced model rankings. Built on MCP, runs in your IDE.

Multi-Model Architecture

Polydev registers as an MCP (Model Context Protocol) server in your IDE. When you ask for perspectives, your code context is sent to multiple frontier models simultaneously. Each model responds independently, giving you diverse approaches to the same problem.

Request Flow
Your IDE
MCP Client
Claude Code, Cursor, Cline, Windsurf
get_perspectives("Fix this N+1 query")
Polydev
MCP Server
CLI detection, routing, merging
1. Detect available CLIs
2. Route to models
3. Merge + rank responses
Frontier Models
Claude Opus 4.6
GPT-5.2
Gemini 3 Pro
Grok 4.1

CLI Detection

Polydev detects which CLI tools are available on your machine using a three-tier strategy:

Self-identificationMCP clientInfo header from the IDE
User-agent fallbackParsed from the connection user-agent string
Version probingShells out to claude --version, codex --version, etc.

Response Merging

Responses from all models are collected, formatted, and returned as a single MCP tool result. The merge strategy:

Parallel executionAll models queried simultaneously, no serial bottleneck
Streaming aggregationResults collected as they arrive, fastest model first
Structured outputEach response labeled with model name, provider, and latency

MCP Configuration

mcp_config.json
{
  "mcpServers": {
    "polydev": {
      "command": "npx",
      "args": ["--yes", "--package=polydev-ai@latest", "--", "polydev-stdio"],
      "env": {
        "POLYDEV_USER_TOKEN": "pd_your_token_here"
      }
    }
  }
}

CLI-as-API Tunnel

Turn your $20/month CLI subscription into a REST API. Polydev maintains an authenticated session with your CLI tool and exposes it as a standard HTTP endpoint. Same subscription, programmatic access.

Authentication Flow
Your Subscription
Claude Pro ($20/mo)
ChatGPT Plus ($20/mo)
Gemini Advanced ($20/mo)
CLI Authentication
claude auth login
codex auth login
Polydev Tunnel
Session management
Request routing
REST API exposed

API Usage

terminal
# Query your Claude Pro subscription via REST API
curl https://api.polydev.ai/v1/chat \
  -H "Authorization: Bearer pd_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-6",
    "messages": [
      {"role": "user", "content": "Review this PR for security issues"}
    ]
  }'

# Response routes through your authenticated CLI session
# No API key needed — uses your $20/mo subscription

Security Model

Token-based authentication (pd_xxx tokens)
Session isolation per user
No credential storage — sessions are ephemeral
Rate limiting per tier (Free: 500/mo, Premium: unlimited)

Supported Providers

Claude ProClaude Code · $20/mo
ChatGPT PlusCodex CLI · $20/mo
Gemini AdvancedGemini CLI · $20/mo
Grok PremiumxAI CLI · $30/mo

Crowdsourced Rankings

Every Polydev query generates pairwise comparisons between model responses. These comparisons feed into an Elo rating system that ranks models across 6 dimensions — using real developer code, not synthetic benchmarks.

Ranking Pipeline
1
Query
Developer asks for perspectives on real code
2
Responses
Models respond independently to the same prompt
3
Judging
Cross-model judges score every pair (C(N,2) comparisons)
4
Elo Update
Bradley-Terry model updates ratings with adaptive K-factor

6-Dimension Prompt Classification

Every prompt is automatically classified across 6 dimensions, enabling filtered leaderboard views. Find the best model for your specific stack and task type.

Task Type
Debugging, Architecture, Security, Testing
Language
Python, TypeScript, Rust, Go, Java
Framework
React, Django, FastAPI, Express
Complexity
Simple, Moderate, Complex, Expert
Domain
Web, Backend, Data, DevOps, ML
Intent
Fix, Build, Optimize, Explain, Review

Elo Rating System

Ratings use the Bradley-Terry model with an adaptive K-factor that decreases as more comparisons accumulate. New models start at 1500 Elo and converge quickly with high K, then stabilize.

Each dimension maintains independent Elo ratings, so a model can rank #1 for Python debugging but #3 for Rust architecture.

Privacy Model

Prompts are classified but never stored. The classification (e.g., "Python + Debugging + Complex") is retained for dimension filtering, but the actual code and prompt text are discarded after ranking.

Only pairwise comparison results (model A beat model B) are persisted.

Open Source

Polydev's MCP server is published as an open-source npm package. The cloud service adds authentication, leaderboard data aggregation, and CLI-as-API tunneling.

Open Source (npm)

MCP server implementation
CLI detection and management
Multi-model query routing
Response merging and formatting
Local-first operation
npm install polydev-ai

Cloud Service

User authentication and tokens
CLI-as-API tunnel management
Leaderboard data aggregation
Credit system and billing
Usage analytics dashboard

Ready to Try It?

Add Polydev to your IDE in 30 seconds. Free tier includes 500 messages/month.