EdgeRoute
Enables Windsurf/Codeium to use EdgeRoute's MCP tools for local action routing, confidence-based abstention, outcome logging, and on-device model fine-tuning.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@EdgeRouteroute this decision: refactor the login flow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Here is the complete text.
Open Notepad with:
cmd
notepad README.md Press Ctrl + A, press Delete, then copy and paste this entire block into Notepad, save (Ctrl + S), and close Notepad:
markdown
EdgeRoute ā”
A sub-millisecond, self-improving "System 1" edge decision engine for AI IDEs and agents (Kiro, Cursor, Claude Code, Windsurf, Cline). EdgeRoute is a local Model Context Protocol (MCP) server that evaluates developer intent in under 2 milliseconds using an on-device linear projection head. Instead of sending every repetitive routing decision to expensive cloud LLMs, EdgeRoute classifies actions locally, abstains when uncertain, and continuously fine-tunes itself on your machine via online stochastic gradient descent (SGD).
š Key Advantages
ā” Sub-Millisecond Decisions: Evaluates state in
< 2 mson local CPU (L1/L2 cache), with zero network latency.š”ļø Calibrated Abstention Gate: Rejects false positives by abstaining whenever confidence is below
60%, delegating complex reasoning to standard LLMs.š Local Experience Replay & On-Device SGD: Automatically adapts to your unique workflow by logging outcomes to an encrypted local SQLite buffer and running background mini-batch SGD.
š Measurable ROI Telemetry: Tracks lifetime tokens saved, developer latency eliminated, and estimated cloud cost reductions in real time.
š 100% Private & Offline: Never transmits your code, prompts, or weights to external cloud servers.
Related MCP server: local-forge
šļø Architecture
User Prompt / Code Context ā ā¼ [ Deterministic Feature Hasher ] (zlib CRC32 / 128-d Vector) ā ā¼ [ Linear Softmax Head (CPU) ] (< 0.5 ms execution) ā āāāāāāā“āāāāāāāāāāāāāāāāāāāāāā ā¼ ā¼ Confidence >= 60% Confidence < 60% Instant Tool Execution Abstain (Fallback to Cloud LLM) ā ā¼ [ User Feedback Signal ] ā ā¼ [ Local SQLite Replay Buffer ] ā ā¼ (Continuous Background Daemon) [ Mini-Batch SGD Weight Update ]
š¦ Quickstart
1. Clone & Setup
git clone https://github.com/Kedar7412/edgeroute-mcp.git
cd edgeroute-mcp
python -m venv venv
Activate virtual environment:
Windows: venv\Scripts\activate
macOS / Linux: source venv/bin/activate
2. Install Dependencies
bash
pip install -r requirements.txt
3. Seed Baseline Intelligence
bash
python seed_anchors.py
4. Interactive Live Test
bash
python interactive.py
š Client Setup Guides
1. Kiro
Add to your Kiro user config (Ctrl + Shift + P ā Kiro: Open user MCP config (JSON)):
json
{
"mcpServers": {
"edgeroute": {
"command": "python",
"args": ["/absolute/path/to/decision_engine_mcp.py"],
"disabled": false,
"autoApprove": ["*"]
}
}
}
To make Kiro automatically query EdgeRoute on every prompt without manual commands, create .kiro/steering/edgeroute.md:
markdown
---
inclusion: always
---
Before taking actions, query `route_decision` from `edgeroute`. If `abstained` is false, follow the recommended action. Log outcomes using `log_outcome`.
2. Cursor
Create or edit .cursor/mcp.json in your workspace root:
json
{
"mcpServers": {
"edgeroute": {
"command": "python",
"args": ["/absolute/path/to/decision_engine_mcp.py"]
}
}
}
3. Claude Desktop
Add to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
json
{
"mcpServers": {
"edgeroute": {
"command": "python",
"args": ["/absolute/path/to/decision_engine_mcp.py"]
}
}
}
4. Claude Code (CLI)
Add to your global Claude CLI configuration (~/.claude.json):
json
{
"mcpServers": {
"edgeroute": {
"command": "python",
"args": ["/absolute/path/to/decision_engine_mcp.py"]
}
}
}
5. Windsurf / Codeium
Open Settings ā MCP Servers and add:
json
{
"mcpServers": {
"edgeroute": {
"command": "python",
"args": ["/absolute/path/to/decision_engine_mcp.py"]
}
}
}
6. VS Code (Cline / Roo Code)
In the Cline MCP settings tab, click Add New MCP Server and paste the JSON configuration.
š ļø MCP Tools Reference
Tool Parameters Description
route_decision context: string Evaluates prompt context in < 2 ms and returns top action, probabilities, and abstention status.
log_outcome context: string, selected_action: string, accepted: bool Logs user acceptance or override into the local SQLite replay buffer for future fine-tuning.
train_head epochs: int, batch_size: int Executes local mini-batch SGD on accumulated experience and commits updated weights.
get_savings_report (none) Returns a lifetime ROI summary showing tokens saved, time saved, and monetary value generated.
š License
Distributed under the MIT License. See LICENSE for more information.
---
### Push it to GitHub
After saving and closing Notepad, run these 3 commands in your terminal:
```cmd
git add README.md
git commit -m "docs: update full README documentation"
git pushThis server cannot be deployed
Maintenance
Related MCP Connectors
Memory, reflection and safety for AI agents. Hosted or local, no vector database.
The cloud for agents. Tools for AI agents to register, build, and deploy other agents. Zero human required.
The AI orchestration agent for modern software teams.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI coding assistants to execute shell commands locally, intercepting deterministic commands like git status and npm test before they reach the LLM, saving tokens and reducing latency.3 npm38MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to route tasks to local GPU models via a dynamic heuristic classifier, tracking real-time token dollar savings.MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous context window management, prompt caching, token optimization, and real-time observability for AI coding agents across multiple IDEs, reducing token costs and improving performance.Apache 2.0
- AlicenseCqualityBmaintenanceEnables local-first model routing and persistent tool library management, allowing automated workflow detection and conversion of stable patterns into reusable tools.40Mozilla Public 2.0