MCP server by auxon
blink-mcp
MCP server for Blink — mobile-first LLM code reader. Exposes tools so any frontier LLM can list repo files, fetch highlighted code, and explain lines.
Requires Rust 1.83+. If you see an icu_* or rustc 1.83 error, run:
rustup update stable
Quick start
# Build
cargo build
# Run with a GitHub repo (public repos only, no auth)
cargo run -- --repo github.com/auxon/blink-mcp
# Or
./target/debug/blink-mcp --repo https://github.com/owner/repo
Server listens on http://127.0.0.1:3000.
Cursor IDE (MCP stdio)
To let the Cursor agent control blink-mcp via MCP tools:
- Build the binary:
cargo build - Add the server in Cursor:
- Project-only:
.cursor/mcp.jsonin this repo is already set up. It runsblink-mcp --stdiowithBLINK_REPO=github.com/auxon/blink-mcp. EditBLINK_REPOin that file to point at any public GitHub repo. - Global: In Cursor Settings → MCP, add a server with:
- Command: full path to
blink-mcp(e.g./path/to/blink-mcp/target/debug/blink-mcp) - Args:
["--stdio"] - Env:
BLINK_REPO=github.com/owner/repo(optional; or pass--repoin args)
- Command: full path to
- Project-only:
- Restart Cursor or reload MCP so it picks up the config. The agent will see get_repo_tree, get_highlighted_code, and explain_line under Available Tools.
Endpoints
| Endpoint | Description |
|----------|-------------|
| GET /mcp/v1/tools | List MCP tools (schema for LLM discovery) |
| GET /run?tool=NAME¶ms=JSON | Run a tool (params optional) |
| POST /run | Run a tool; body: {"tool":"NAME","params":{...}} |
| GET /health | Health check |
Tools
- get_repo_tree — List all blob paths in the loaded repo. Optional param:
branch(defaultmain). - get_highlighted_code — Get file content for a path. Param:
path(e.g.src/main.rs). Highlights are stubbed. - explain_line — Stub: explain a line (path + line). LLM integration later.
- build_blink — Build blink-mcp (
cargo build). Optional param:release(default false). FactoryForge-style build automation. - check_blink_setup — Verify rustc, cargo, blink-mcp binary. FactoryForge-style setup check.
Test
# List tools
curl http://localhost:3000/mcp/v1/tools
# Get repo tree (requires --repo)
curl "http://localhost:3000/run?tool=get_repo_tree"
# Get file content
curl "http://localhost:3000/run?tool=get_highlighted_code" \
-G --data-urlencode 'params={"path":"Cargo.toml"}'
# Explain line (stub)
curl "http://localhost:3000/run?tool=explain_line" \
-G --data-urlencode 'params={"path":"src/main.rs","line":42}'
Build & deploy (FactoryForge-style)
Scripts and MCP tools to automate building and deploying Blink:
- Scripts:
./scripts/check-setup.sh,./scripts/build.sh,./scripts/run-mcp.sh - MCP:
check_blink_setup,build_blink(so an LLM can build from Cursor)
Branch
blitz — ship daemon first, iOS app next.
iOS app (initial)
The initial SwiftUI front end lives in ios/:
- Layout: Top bar (breadcrumb + repo URL paste), middle reader area (placeholder), collapsible bottom context rail.
- Open:
open ios/Blink.xcodeprojthen run in Xcode (iOS Simulator or device, iOS 17+). - Details: ios/README.md.
Next: share sheet for GitHub URL, blink-mcp integration, WebView with React + CodeMirror 6 for code rendering.
Next steps (roadmap)
- Reload MCP — After pulling the User-Agent fix, reload MCP (or restart Cursor) so
get_repo_treeandget_highlighted_codework against GitHub. - Wire LLM into
explain_line— Call Groq/DeepSeek or local (Ollama) with file context + line; return real explanation. Env:BLINK_LLM_API_URLorOPENAI_API_KEY/ provider-specific. - Heatmap / highlights in
get_highlighted_code— Stub or LLM pass: green/yellow/red ranges (idiomatic, suspicious, bug-prone). Returnhighlights: [{ line, kind, message? }]. - Chunk folding — LLM or heuristics: group code into named blocks; return
chunks: [{ name, startLine, endLine }]for reader UI. - SwiftUI app — Native shell + WebView for code; talk to blink-mcp (HTTP or embed stdio). Share sheet → paste GitHub URL → load repo.