Competitive Programming Mentor MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Log level | INFO |
| LLM_PROVIDER | No | LLM provider: 'openai' or 'ollama' | openai |
| OLLAMA_MODEL | No | Ollama model | llama3.1:8b |
| OPENAI_MODEL | No | OpenAI model name | gpt-4o-mini |
| CACHE_ENABLED | No | Enable cache | true |
| CACHE_DISK_DIR | No | Cache disk directory | .cache |
| OPENAI_API_KEY | No | OpenAI API key | |
| OLLAMA_BASE_URL | No | Ollama base URL | http://localhost:11434 |
| CACHE_TTL_SECONDS | No | Cache TTL in seconds | 3600 |
| OPENAI_MAX_TOKENS | No | Max tokens for OpenAI | 4096 |
| OPENAI_TEMPERATURE | No | Temperature for OpenAI | 0.2 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| detect_patternsC | Analyze problem text to detect patterns, difficulty, and complexity hints. |
| extract_constraintsB | Extract variable constraints and time/memory limits. |
| estimate_difficultyB | Estimate target audience and difficulty rating for the problem. |
| identify_topicsA | Identify topics, tags, and prerequisites for the problem. |
| suggest_algorithmsB | Suggest multiple viable candidate algorithms or structures for the problem. |
| compare_algorithmsB | Compare multiple candidate algorithms in a detailed pros/cons comparison. |
| choose_best_algorithmB | Select the single absolute best algorithm to implement for a problem. |
| estimate_runtimeC | Estimate runtime safety by validating loops/nodes against constraints. |
| generate_solutionB | Generate an optimal solution for the problem in the requested language. |
| generate_pseudocodeB | Generate language-agnostic pseudocode for the problem. |
| generate_multi_languageA | Generate code solutions in C++, Java, and Rust. |
| dry_runC | Perform a step-by-step trace execution of the code against test cases. |
| prove_correctnessB | Verify correctness of an approach using loop invariants or mathematical proofs. |
| analyze_complexityB | Rigorously calculate time and space complexity of code. |
| generate_testcasesC | Generate sample test cases (input/output/explanation) for the problem. |
| generate_edge_casesC | Identify critical edge case configurations and remedies. |
| stress_testingB | Generate stress testing script, random generator, and brute-force checker. |
| review_solutionB | Review user code for correctness, time complexity, bugs, TLE risk, etc. |
| find_bugB | Search for logical errors, boundary flaws, or runtime bugs in the code. |
| optimize_solutionC | Refactor solutions to reduce runtime complexity and improve performance. |
| get_hintC | Provide progressive hints for the problem. |
| explain_algorithmC | Explain the mechanics of a specific algorithm / data structure. |
| recommend_next_problemB | Recommend next problems that build upon this problem. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| hints_only | Competitive programming coach persona that only gives progressive hints. No code. |
| contest_mode | Contest mode persona: fast, clean, terse, and hyper-optimized code output. |
| interview_mode | Mock interviewer persona: explains trade-offs, edge cases, and design choices. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| dijkstra_resource | Dijkstra's shortest path algorithm reference. |
| segment_tree_resource | Segment Tree data structure reference. |
| sliding_window_resource | Sliding Window pattern reference. |
TDQS
Scored across 23 tools
Each tool has a clear, distinct purpose, covering various aspects of competitive programming from analysis to code generation and debugging. No two tools appear to do the same thing.
All tool names follow a consistent snake_case verb_noun pattern (e.g., analyze_complexity, generate_solution, recommend_next_problem), making it easy for an agent to predict functionality.
23 tools is slightly above the typical ideal range, but given the broad scope of competitive programming mentoring (analysis, generation, testing, debugging, learning), it is justified and not excessive.
The tool set covers the full lifecycle of problem solving: understanding constraints, detecting patterns, selecting algorithms, generating solutions, testing, debugging, optimizing, and even recommending further practice. No obvious gaps.