{
  "markdown": "# thealgorithms-mcp\n\nmcp-name: io.github.mcande21/thealgorithms-mcp\n\nAn [MCP](https://modelcontextprotocol.io) server for querying the\n[TheAlgorithms](https://github.com/TheAlgorithms) org across **every language repo** — search\nalgorithm implementations and fetch any one with its in-file examples.\n\nLanguages are **auto-discovered** from the org (not a hardcoded list): a repo is indexed when it\npublishes a parseable `DIRECTORY.md` — currently **24 languages** (Python, Java, C++, JavaScript,\nRust, C, TypeScript, PHP, Dart, Kotlin, Ruby, R, Scala, Swift, Julia, Haskell, MATLAB, Zig,\nFortran, Nim, Clojure, F#, Jule, aarch64-assembly). Repos without a `DIRECTORY.md` (Go, C#, Lua,\nSolidity, …) are reported by `list_languages` with their exclusion reason — no silent gaps.\n\nHybrid design: each repo's `DIRECTORY.md` index is cached locally (ETag + TTL); file contents are\nfetched on demand from `raw.githubusercontent.com`. The org/language manifest is auto-discovered via\nthe GitHub API and cached 7 days. No token required (set `GITHUB_TOKEN` to raise the rate limit).\nSee [`DESIGN.md`](DESIGN.md).\n\n## Tools\n\n| Tool | Purpose |\n|------|---------|\n| `list_languages()` | Indexed languages (+ counts, aliases) and excluded repos with reasons |\n| `list_categories(language='python')` | Categories with entry counts for a language |\n| `search_algorithms(query, language='python', category?, limit=10)` | Ranked `{name, category, path, score}` |\n| `get_category(category, language='python')` | Every algorithm in a category |\n| `get_algorithm(path, language='python', include_source=True)` | Source + extracted examples |\n| `compare(name, languages?, min_score=90, limit_per_language=1)` | Real matches across languages + `missing_in` |\n| `suggest(prefix, language='python', limit=10)` | Trie-backed name autocomplete (`dij` → Dijkstra) |\n\n`language` accepts names or aliases (`cpp`/`c++`, `js`, `ts`, …). Typical flow:\n`search_algorithms(\"dijkstra\", language=\"rust\")` → `get_algorithm(\"src/graph/dijkstra.rs\", language=\"rust\")`.\nExamples are extracted where the language has an in-file convention (Python doctests, Rust\ndoc-tests); other languages return source plus a note.\n\n## Install\n\n**From PyPI (recommended):**\n\n```json\n{ \"thealgorithms\": { \"command\": \"uvx\", \"args\": [\"thealgorithms-mcp\"] } }\n```\n\n**From GitHub:**\n\n```json\n{ \"thealgorithms\": {\n    \"command\": \"uvx\",\n    \"args\": [\"--from\", \"git+https://github.com/mcande21/thealgorithms-mcp\", \"thealgorithms-mcp\"] } }\n```\n\n**From a local checkout (development):**\n\n```bash\nuv sync\nuv run thealgorithms-mcp          # serves over stdio\n```\n\nAdd any of the above to `~/.normandy-generic/mcp.json` (or your MCP client config).\n\n## Verify\n\n```bash\nuv run python scripts/verify_stdio.py                 # multi-language contract over stdio\nuv run python scripts/verify_language.py rust         # one language, end-to-end\n```\n\nThe harness spawns the server over stdio and asserts every tool against the live org, including\nbinary-search fetch across ≥8 languages and cross-language `compare()`.\n",
  "bytes": 3048,
  "sha": "0aa7f0ede6791c1630ddea753be7018abb2f786d71c80d065d678b5f0d3ca5cf",
  "repo_slug": "mcande21/thealgorithms-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mcande21_thealgorithms_mcp_fba9c0a8/readme"
}