Search TheAlgorithms/Python and fetch implementations with their doctest examples.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mcp-name: io.github.mcande21/thealgorithms-mcp
An MCP server for querying the TheAlgorithms org across every language repo β search algorithm implementations and fetch any one with its in-file examples.
Languages are auto-discovered from the org (not a hardcoded list): a repo is indexed when it
publishes a parseable DIRECTORY.md β currently 24 languages (Python, Java, C++, JavaScript,
Rust, C, TypeScript, PHP, Dart, Kotlin, Ruby, R, Scala, Swift, Julia, Haskell, MATLAB, Zig,
Fortran, Nim, Clojure, F#, Jule, aarch64-assembly). Repos without a DIRECTORY.md (Go, C#, Lua,
Solidity, β¦) are reported by list_languages with their exclusion reason β no silent gaps.
Hybrid design: each repo's DIRECTORY.md index is cached locally (ETag + TTL); file contents are
fetched on demand from raw.githubusercontent.com. The org/language manifest is auto-discovered via
the GitHub API and cached 7 days. No token required (set GITHUB_TOKEN to raise the rate limit).
See DESIGN.md.
| Tool | Purpose |
|---|---|
list_languages() | Indexed languages (+ counts, aliases) and excluded repos with reasons |
list_categories(language='python') | Categories with entry counts for a language |
search_algorithms(query, language='python', category?, limit=10) | Ranked {name, category, path, score} |
get_category(category, language='python') | Every algorithm in a category |
get_algorithm(path, language='python', include_source=True) | Source + extracted examples |
compare(name, languages?, min_score=90, limit_per_language=1) | Real matches across languages + missing_in |
suggest(prefix, language='python', limit=10) | Trie-backed name autocomplete (dij β Dijkstra) |
language accepts names or aliases (cpp/c++, js, ts, β¦). Typical flow:
search_algorithms("dijkstra", language="rust") β get_algorithm("src/graph/dijkstra.rs", language="rust").
Examples are extracted where the language has an in-file convention (Python doctests, Rust
doc-tests); other languages return source plus a note.
From PyPI (recommended):
From GitHub:
From a local checkout (development):
Add any of the above to ~/.normandy-generic/mcp.json (or your MCP client config).
The harness spawns the server over stdio and asserts every tool against the live org, including
binary-search fetch across β₯8 languages and cross-language compare().
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/thealgorithms-mcp)<a href="https://allmcps.com/mcp/thealgorithms-mcp"><img src="https://allmcps.com/api/badge/thealgorithms-mcp?style=directory" alt="Thealgorithms MCP on AllMCPs" /></a>