mcpField
D
DSAengine: Rust-Powered Algorithm Intelligence for AI Agents

DSAengine: Rust-Powered Algorithm Intelligence for AI Agents

Remote
github.com/sVm19Developer Tools0Updated 27w ago
Repository

About 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

  1. 01Catalog of 142+ algorithms across categories
  2. 02Classify algorithm requests by keywords
  3. 03Return algorithm recommendations with complexity
  4. 04Run locally without external API calls
  5. 05Use as an MCP server, Rust library, or HTTP API

Use cases

  1. 01Find an algorithm for a coding task
  2. 02Review complexity when choosing an approach
  3. 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.

Endpointhttps://dsaengine-v2026-04-08-2.onrender.com/
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

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.

All endpoints
Streamable HTTPhttps://dsaengine-v2026-04-08-2.onrender.com/Auth required

Tools

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
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 FlagSkill CategoryExamples
arraysArrays & StringsTwo-Sum, KMP Search, Sliding Window, Kadane's Algorithm
linked_listsLinked ListsCycle Detection, Reverse, Merge Sorted, Intersection
stacks_queuesStacks & QueuesMin Stack, Valid Parentheses, Next Greater, Histogram
trees_binaryBinary TreesTraversals, LCA, Serialize, Invert, Max Path Sum
trees_advancedAdvanced TreesTrie, Segment Tree, Fenwick Tree, AVL Tree, Red-Black
graphsGraphsDijkstra, Bellman-Ford, BFS/DFS, MST (Kruskal/Prim)
dynamic_programmingDynamic ProgrammingCoin Change, LCS, Edit Distance, Knapsack
greedy_algorithmsGreedyActivity Selection, Huffman Coding, Jump Game
backtrackingBacktrackingN-Queens, Sudoku, Combinations, Permutations
sorting_searchingSorting & SearchingMerge Sort, Quick Sort, Binary Search
dsa_fundamentalsFundamentalsBig-O Analysis, Two Pointers, Sliding Window
advanced_topicsAdvancedLRU/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


📝 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

MetricValue
Binary Size~25 MB (release build)
Startup Time<100ms
Recommendation Latency<5ms
Memory Usage~50 MB at runtime
Algorithms Available142+

🤝 Contributing

DSAEngine welcomes contributions! See CONTRIBUTING.md for guidelines.

Comments

Markdown supported

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.