
Thealgorithms Mcp
io.github.mcande21Published by GitHub account mcande21v0.3.1Updated Oct 27, 2026
Search TheAlgorithms across 24 languages; fetch implementations with examples.
Overview
Searches TheAlgorithms repositories across 24 programming languages and fetches algorithm implementations with their in-file examples.
- What you can do
- List indexed languages with counts and aliases, plus excluded repos and reasons
- List categories and their entry counts for a chosen language
- Search algorithms by name and get ranked results with category and path
- Retrieve every algorithm in a category, or fetch one file's source with extracted examples
- Compare an algorithm across languages and see where it is missing
- Autocomplete algorithm names from a prefix
- When to use it
- Useful when you want reference implementations of classic algorithms in a specific language, want to compare how the same algorithm is written across languages, or want example usage pulled from the source files.
- Requirements
- Runs locally over stdio, installed from PyPI with uvx (or from GitHub or a local checkout). Needs network access to GitHub and raw.githubusercontent.com. No token required; an optional GITHUB_TOKEN raises the GitHub API rate limit.
Installation
In SourceWeft
- Open Thealgorithms Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
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.
Install
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).
Verify
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().
Source: README.md at commit 3f22961
Tools
0Version history
1- v0.3.1LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.