Skip to main content
Glama
Yasir-Khan-7

Learning Assistant MCP Server

by Yasir-Khan-7
README.md
# Learning Assistant MCP Server šŸŽ“

An educational MCP (Model Context Protocol) server that helps developers learn, understand code, and improve their programming skills through AI-powered tools.

## Features šŸš€

This MCP server provides 8 powerful learning tools:

1. **explainConcept** - Get simple explanations of programming concepts with examples
2. **reviewCode** - Get constructive feedback on your code with improvement suggestions
3. **suggestBestPractice** - Learn industry best practices for any programming task
4. **compareApproaches** - Compare different solutions and understand tradeoffs
5. **generateLearningPath** - Get a structured roadmap to learn any technology
6. **debugHelper** - Understand and fix errors with guided debugging help
7. **explainThisCode** - Get detailed explanations of how code works
8. **quizMe** - Test your knowledge with auto-generated practice questions

## Installation šŸ“¦

### Prerequisites

- Node.js 18.0.0 or higher
- Cursor IDE or any MCP-compatible client

### Setup

1. Clone this repository:
```bash
git clone https://github.com/YOUR_USERNAME/learning-assistant-mcp.git
cd learning-assistant-mcp
```

2. Install dependencies:
```bash
npm install
```

3. Build the project:
```bash
npm run build
```

4. Configure your MCP client (e.g., Cursor IDE):

Add to your `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "learning-assistant": {
      "command": "node",
      "args": [
        "/absolute/path/to/learning-assistant-mcp/dist/index.js"
      ]
    }
  }
}
```

Replace `/absolute/path/to/learning-assistant-mcp` with the actual path where you cloned the repository.

5. Restart Cursor IDE

## Usage šŸ’”

Once installed, you can use the tools in Cursor Chat:

### Example Prompts

- "Explain what closures are in JavaScript for a beginner"
- "Review this code and suggest improvements"
- "What are the best practices for error handling in React?"
- "Compare REST API vs GraphQL"
- "Create a learning path to master TypeScript"
- "Help me debug this error: Cannot read property 'map' of undefined"
- "Explain what this regex pattern does: /^[a-z]+$/i"
- "Quiz me on JavaScript async/await with 5 questions"

## Development šŸ› ļø

```bash
# Run in development mode
npm run dev

# Build TypeScript
npm run build

# Run the built server
npm start
```

## Project Structure šŸ“

```
learning-assistant-mcp/
ā”œā”€ā”€ src/
│   └── index.ts          # Main server implementation
ā”œā”€ā”€ dist/                 # Compiled JavaScript (generated)
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md
```

## Tools Reference šŸ“š

### explainConcept
Explains programming concepts in beginner-friendly terms.

**Parameters:**
- `concept` (string): The concept to explain
- `level` (optional): "beginner" | "intermediate" | "advanced"
- `language` (optional): Programming language context

### reviewCode
Reviews code and provides constructive feedback.

**Parameters:**
- `code` (string): Code to review
- `language` (string): Programming language
- `context` (optional): What the code should do
- `focusAreas` (optional): Array of focus areas

### suggestBestPractice
Suggests best practices for programming tasks.

**Parameters:**
- `task` (string): The task or area
- `technology` (optional): Specific framework/library
- `currentApproach` (optional): Your current approach

### compareApproaches
Compares different programming approaches.

**Parameters:**
- `problem` (string): The problem to solve
- `approaches` (array): List of approaches to compare
- `criteria` (optional): Comparison criteria

### generateLearningPath
Creates structured learning roadmaps.

**Parameters:**
- `topic` (string): What to learn
- `currentLevel`: Your current level
- `goalLevel`: Target proficiency
- `timeCommitment` (optional): Available time

### debugHelper
Helps debug errors and bugs.

**Parameters:**
- `error` (string): Error message or bug description
- `code` (optional): Relevant code
- `language` (optional): Programming language
- `context` (optional): What you were doing

### explainThisCode
Provides detailed code explanations.

**Parameters:**
- `code` (string): Code to explain
- `language` (string): Programming language
- `detailLevel` (optional): "overview" | "detailed" | "line-by-line"

### quizMe
Generates practice questions.

**Parameters:**
- `topic` (string): Topic to quiz on
- `difficulty` (optional): "easy" | "medium" | "hard"
- `questionCount` (optional): Number of questions (1-10)
- `questionType` (optional): Type of questions

## Contributing šŸ¤

Contributions are welcome! Please feel free to submit a Pull Request.

## License šŸ“„

MIT License - see LICENSE file for details

## Author ✨

Muhammad Yasir Khan

## Support šŸ’¬

If you have questions or need help, please open an issue on GitHub.

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Most tools have clearly distinct purposes, but explainConcept and explainThisCode could be confused by an agent selecting between a general concept explanation and a specific code explanation. Similarly, reviewCode and debugHelper overlap when reviewing buggy code, though their primary focuses differ.

Naming Consistency4/5

Tool names mostly follow a camelCase verb_noun pattern (explainConcept, reviewCode, suggestBestPractice, compareApproaches, generateLearningPath, explainThisCode). However, debugHelper deviates as a noun phrase rather than a clear verb_noun, and quizMe uses an object pronoun instead of a direct noun.

Tool Count5/5

With 8 tools, the server is well-scoped for a learning assistant. Each tool addresses a distinct pedagogical or coding assistance need, and the count is neither too sparse nor overwhelming.

Completeness5/5

The tool set covers the core learning workflow: explaining concepts, understanding code, reviewing code, debugging, suggesting best practices, comparing approaches, generating learning paths, and practice quizzes. There are no obvious gaps for the stated purpose of a learning assistant.

Maintenance

ActivityInactive
ResponsivenessNo issues