
Thealgorithms Mcp
Connects Claude to TheAlgorithms' 24-language repository collection through their published DIRECTORY.md indexes. You get seven tools: search algorithms by name across languages, list categories and entries per repo, fetch source code with extracted examples (doctests for Python, doc-tests for Rust), compare implementations across languages to spot gaps, and autocomplete algorithm names with a trie-backed suggest. The server auto-discovers languages from the GitHub org and caches indexes locally with ETag validation, fetching file contents on demand. Reach for this when you need working reference implementations during architecture discussions, want to compare algorithmic approaches across ecosystems, or need to pull concrete code examples into context without leaving your editor.
- tools
- 7
- transport
- STDIO
- last updated
- May 31, 2026
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
list_languagesIndexed languages (+ counts, aliases) and excluded repos with reasons
Indexed languages (+ counts, aliases) and excluded repos with reasons
No parameter schema in public metadata yet.
list_categoriesCategories with entry counts for a language
Categories with entry counts for a language
No parameter schema in public metadata yet.
search_algorithmsRanked {name, category, path, score} results for an algorithm query
Ranked {name, category, path, score} results for an algorithm query
No parameter schema in public metadata yet.
get_categoryEvery algorithm in a category
Every algorithm in a category
No parameter schema in public metadata yet.
get_algorithmSource + extracted examples for an algorithm file
Source + extracted examples for an algorithm file
No parameter schema in public metadata yet.
compareReal matches across languages + missing_in
Real matches across languages + missing_in
No parameter schema in public metadata yet.
suggestTrie-backed name autocomplete
Trie-backed name autocomplete
No parameter schema in public metadata yet.
Sponsors
Readme
thealgorithms-mcp
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.
Tools
Details
- Repository
- github.com/mcande21/thealgorithms-mcp
- Category
- Search & Web Crawling
- Package
thealgorithms-mcp- Transport
- STDIO
- Registry
- MCP registry, active