DSAengine: Rust-Powered Algorithm Intelligence for AI Agents
RemoteAbout DSAengine: Rust-Powered Algorithm Intelligence for AI Agents
DSAengine is a local, Rust-based MCP server and library that helps coding agents select from a catalog of 142+ data structures and algorithms. Its recommendations use deterministic keyword matching and include complexity information.
Key features
- 01Catalog of 142+ algorithms across categories
- 02Classify algorithm requests by keywords
- 03Return algorithm recommendations with complexity
- 04Run locally without external API calls
- 05Use as an MCP server, Rust library, or HTTP API
Use cases
- 01Find an algorithm for a coding task
- 02Review complexity when choosing an approach
- 03Identify alternatives to brute-force solutions
MCP support
DSAengine runs as an MCP server over JSON-RPC on stdio, allowing coding agents to request algorithm classifications and recommendations.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://dsaengine-v2026-04-08-2.onrender.com/claude mcp add --transport http DSAengine https://dsaengine-v2026-04-08-2.onrender.com/{"mcpServers":{"DSAengine":{"type":"http","url":"https://dsaengine-v2026-04-08-2.onrender.com/"}}}Open in Cursor{"servers":{"DSAengine":{"type":"http","url":"https://dsaengine-v2026-04-08-2.onrender.com/"}}}Open in VS Code{"mcpServers":{"DSAengine":{"type":"http","url":"https://dsaengine-v2026-04-08-2.onrender.com/"}}}{"mcpServers":{"DSAengine":{"serverUrl":"https://dsaengine-v2026-04-08-2.onrender.com/"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://dsaengine-v2026-04-08-2.onrender.com/Auth requiredTools
Details
From the project README🚀 dsaEngine
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).
⚡ Zero-Cost Algorithm Advisor
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
How It Works
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
1. Install DSAEngine
Linux / macOS (Bash)
curl -sSL https://raw.githubusercontent.com/sVm19/DSAengine/main/install.sh | bash
Windows (PowerShell)
irm https://raw.githubusercontent.com/sVm19/DSAengine/main/install.ps1 | iex
Note: Requires git and cargo installed if no prebuilt binary is available for your platform.
2. Setup Your Agent
- Cursor: Setup Guide
- Windsurf: Setup Guide
- Claude: Setup Guide
3. Start Coding
Ask your agent to write an algorithm — DSAEngine will ensure it's optimal.
📖 The 142+ Algorithm Library
Organized into 13 categories:
📖 The 12 Pages (Skill 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 |
🎯 Usage
As MCP Server (Recommended for Agents)
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
As Rust Library
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);
}
As HTTP API
# 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/
🛠 Installation Methods
Method 1: Cargo (Easiest)
cargo install dsaengine
Requires: Rust 1.70+
Method 2: Pre-built Binaries
Download from GitHub Releases:
dsaengine(macOS/Linux)dsaengine.exe(Windows)dsaengine-arm64(macOS Apple Silicon)
Method 3: From Source
git clone https://github.com/yourusername/dsaengine
cd dsaengine
cargo build --release
# Binary: target/release/dsaengine
🔧 Setup Guides
- 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
📝 Commands
# 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 --help
🧠 Use Cases
✅ Optimal Algorithm Selection
Ask Cursor/Windsurf to solve algorithmic problems — DSAEngine ensures optimal approach.
✅ Deterministic Recommendations
No randomness, no LLM hallucinations — pure keyword-based algorithm matching.
✅ O(n) → O(log n) Optimization
Catch brute-force approaches and suggest optimal alternatives automatically.
✅ Zero API Cost
Runs completely local — no external API calls, no rate limits.
📊 Performance
| Metric | Value |
|---|---|
| Binary Size | ~25 MB (release build) |
| Startup Time | <100ms |
| Recommendation Latency | <5ms |
| Memory Usage | ~50 MB at runtime |
| Algorithms Available | 142+ |
🤝 Contributing
DSAEngine welcomes contributions! See CONTRIBUTING.md for guidelines.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.