dsaEngine is a high-performance, deterministic MCP (Model Context Protocol) server providing 142+ production-grade DSA algorithms for AI coding agents (Cursor, Windsurf, Claude Code, GitHub Copilot, and more).
DSAEngine runs locally on your machine and integrates with your favorite coding agent via the Model Context Protocol:
- β No API calls β 100% local, zero cost per use
- β 142+ algorithms β Optimal implementations categorized & indexed
- β Deterministic β No randomness, repeatable recommendations
- β 7 agents β Cursor, Windsurf, Claude Code, GitHub Copilot, Kiro, Augment, Antigravity
- β MCP compatible β JSON-RPC over stdio, zero hosting required
You ask Cursor: "Find shortest path in weighted graph with negative edges"
β
Cursor sees .cursorrules β "consult DSAEngine first"
β
Cursor calls: dsa_classify("Find shortest path in weighted graph with negative edges")
β
DSAEngine responds: "Bellman-Ford Algorithm, O(VΒ·E), confidence: 0.95"
β
Cursor calls: graphs.bellman_ford(edges, source)
β
DSAEngine returns: Rust code + pseudocode + result
β
Cursor writes optimized code
Linux / macOS (Bash)
curl -sSL https://raw.githubusercontent.com/sVm19/DSAengine/main/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/sVm19/DSAengine/main/install.ps1 | iexNote: Requires git and cargo installed if no prebuilt binary is available for your platform.
- Cursor: Setup Guide
- Windsurf: Setup Guide
- Claude: Setup Guide
Ask your agent to write an algorithm β DSAEngine will ensure it's optimal.
Organized into 13 categories:
You load specifically what you need by activating Cargo features (--features "arrays graphs"), keeping binaries microscopically tight.
| Feature Flag | Skill Category | Examples |
|---|---|---|
arrays |
Arrays & Strings | Two-Sum, KMP Search, Sliding Window, Kadane's Algorithm |
linked_lists |
Linked Lists | Cycle Detection, Reverse, Merge Sorted, Intersection |
stacks_queues |
Stacks & Queues | Min Stack, Valid Parentheses, Next Greater, Histogram |
trees_binary |
Binary Trees | Traversals, LCA, Serialize, Invert, Max Path Sum |
trees_advanced |
Advanced Trees | Trie, Segment Tree, Fenwick Tree, AVL Tree, Red-Black |
graphs |
Graphs | Dijkstra, Bellman-Ford, BFS/DFS, MST (Kruskal/Prim) |
dynamic_programming |
Dynamic Programming | Coin Change, LCS, Edit Distance, Knapsack |
greedy_algorithms |
Greedy | Activity Selection, Huffman Coding, Jump Game |
backtracking |
Backtracking | N-Queens, Sudoku, Combinations, Permutations |
sorting_searching |
Sorting & Searching | Merge Sort, Quick Sort, Binary Search |
dsa_fundamentals |
Fundamentals | Big-O Analysis, Two Pointers, Sliding Window |
advanced_topics |
Advanced | LRU/LFU Cache, Union-Find, Bloom Filter, Trie Autocomplete |
After setup, your agent automatically calls DSAEngine:
Cursor:
"Write a function to find all connected components in an undirected graph"
β Cursor calls dsa_classify("connected components undirected graph")
DSAEngine responds:
{
"algorithm": "Union-Find",
"confidence": 0.98,
"time_complexity": "O(Ξ±(n))",
"space_complexity": "O(n)",
"tool_name": "advanced_topics.union_find",
"reason": "Optimal for connectivity queries with near-O(1) amortized complexity"
}
β Cursor calls advanced_topics.union_find(...)
β You get optimized code
use dsaengine::skills::graphs::dijkstra::Dijkstra;
fn main() {
let edges = vec![(0, 1, 4), (1, 2, 2), (0, 2, 5)];
let (distances, paths) = Dijkstra::shortest_path(&edges, 0);
println!("Shortest distances: {:?}", distances);
}# Run HTTP server (default: localhost:8000)
dsaengine
# Test:
curl -X POST http://localhost:8000/api/v1/graphs/dijkstra \
-H "Content-Type: application/json" \
-d '{...}'
# Swagger UI: http://localhost:8000/swagger-ui/cargo install dsaengineRequires: Rust 1.70+
Download from GitHub Releases:
dsaengine(macOS/Linux)dsaengine.exe(Windows)dsaengine-arm64(macOS Apple Silicon)
git clone https://github.com/yourusername/dsaengine
cd dsaengine
cargo build --release
# Binary: target/release/dsaengine- Cursor Setup β Step-by-step for Cursor users
- Windsurf Setup β Step-by-step for Windsurf users
- Claude Code Setup β Step-by-step for Claude users
# Run MCP stdio server (for agents)
dsaengine --mcp
# Run HTTP web server (for API/testing)
dsaengine
# Generate rules files for agents
dsaengine --install
# Show help
dsaengine --helpAsk Cursor/Windsurf to solve algorithmic problems β DSAEngine ensures optimal approach.
No randomness, no LLM hallucinations β pure keyword-based algorithm matching.
Catch brute-force approaches and suggest optimal alternatives automatically.
Runs completely local β no external API calls, no rate limits.
| Metric | Value |
|---|---|
| Binary Size | ~25 MB (release build) |
| Startup Time | <100ms |
| Recommendation Latency | <5ms |
| Memory Usage | ~50 MB at runtime |
| Algorithms Available | 142+ |
DSAEngine welcomes contributions! See CONTRIBUTING.md for guidelines.