Skip to main content
Glama
mcande21

io.github.mcande21/thealgorithms-mcp

by mcande21

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GITHUB_TOKENNoGitHub personal access token to raise the rate limit. Not required.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_languagesA

List indexed languages (auto-discovered from the TheAlgorithms org) and excluded repos.

Returns {languages: [{language, repo, count, aliases}], excluded: [{repo, reason}]}. Use a returned language (or any alias) with the other tools.

list_categoriesA

List the algorithm categories with entry counts for a language (default: python).

search_algorithmsA

Search one language's algorithms by name/topic. Returns ranked {name, category, path, score}.

Feed a returned path (with the same language) to get_algorithm. language defaults to python and accepts aliases (cpp, js, ts, c++, ...). See list_languages.

get_categoryA

List every algorithm in one category (for a language) as {name, path}.

get_algorithmA

Fetch one algorithm by language + repo-relative path (e.g. path='sorts/merge_sort.py').

Returns {language, path, github_url, description, examples, line_count, source?}. Examples are extracted where the language has an in-file convention (Python doctests, Rust doc-tests), otherwise empty with a note. Set include_source=False for a cheap peek.

compareA

Find the same algorithm across languages — returns only REAL matches.

A per-language search scores 100-200 for a genuine match and well below for "nearest unrelated thing", so results are filtered to score >= min_score (default 90). Languages with no real match are listed in missing_in, so you can see at a glance which languages implement an algorithm and which don't. languages defaults to all indexed; pass a subset to narrow.

suggestA

Autocomplete algorithm names by prefix (Trie-backed typeahead).

Matches the start of the name or any word: 'dij' -> Dijkstra, 'search' -> Binary Search. Returns up to limit {name, category, path}. Fast O(prefix-length) lookup.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcande21/thealgorithms-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server