# 🎓 MCP Content Curation Server

[![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
[![OpenAI](https://img.shields.io/badge/OpenAI-GPT--4-orange.svg)](https://openai.com/)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A **Model Context Protocol (MCP)** server for intelligent course content curation powered by **GPT-4**. This server provides AI-driven tools to categorize, tag, and improve educational content.

## ✨ Features

- **🗂️ Smart Categorization**: AI-powered category suggestions for course content
- **🏷️ Intelligent Tagging**: Context-aware tag recommendations using GPT-4
- **✨ Content Optimization**: Improve titles and descriptions following best practices
- **🔌 MCP Integration**: Seamless integration with Claude Desktop and other MCP clients

## 🚀 Quick Start

### Prerequisites

- Node.js 18+
- OpenAI API key

### Installation

1. **Clone the repository**
   ```bash
   git clone https://github.com/yourusername/mcp-content-curation-server.git
   cd mcp-content-curation-server
   ```

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

3. **Configure environment**
   ```bash
   cp .env.example .env
   # Edit .env and add your OpenAI API key
   ```

4. **Run the server**
   ```bash
   # Development mode
   npm run dev
   
   # Production mode
   npm run build
   npm start
   ```

## 🔧 OpenAI Setup

1. Get your API key from [OpenAI Platform](https://platform.openai.com/api-keys)
2. Add it to your `.env` file:
   ```bash
   OPENAI_API_KEY=sk-your-actual-api-key-here
   ```

## 🖥️ Claude Desktop Integration

Update your `claude_desktop_config.json`:

**Development Mode:**
```json
{
  "mcpServers": {
    "content-curation": {
      "command": "npx",
      "args": ["tsx", "/path/to/your/project/src/server.ts"],
      "cwd": "/path/to/your/project",
      "env": {
        "NODE_ENV": "development"
      }
    }
  }
}
```

**Production Mode:**
```json
{
  "mcpServers": {
    "content-curation": {
      "command": "node",
      "args": ["/path/to/your/project/dist/server.js"],
      "cwd": "/path/to/your/project",
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}
```

## 🛠️ Available Tools

### 1. `suggest_category`
Suggests the most appropriate category for course content.

**Input:**
```json
{
  "title": "Python for Data Science",
  "description": "Learn data analysis with pandas and matplotlib"
}
```

### 2. `suggest_tags`
Recommends relevant tags based on course content.

**Input:**
```json
{
  "title": "Digital Marketing Fundamentals",
  "description": "Master SEO, Google Ads, and social media marketing"
}
```

### 3. `improve_content`
Optimizes titles and descriptions following educational best practices.

**Input:**
```json
{
  "title": "JavaScript Basics",
  "description": "Learn programming fundamentals"
}
```

## 📊 Data Structure

The server includes:

- **5 main categories**: Technology, Business, Design, Marketing, Analytics
- **18 contextual tags**: Organized by subject area
- **10 sample courses**: For similarity analysis and training

## 💡 Usage Examples

### Categorization
```
Suggest a category for: "Advanced React Hooks" - "Custom hooks and performance optimization in React"
```

### Tagging
```
What tags would you recommend for: "Machine Learning with Python"?
```

### Content Improvement
```
Improve this content:
Title: "Excel Basics"
Description: "Learn spreadsheets"
```

## 🛠️ Development

### Available Scripts

- `npm run dev` - Start development server
- `npm run build` - Compile TypeScript
- `npm start` - Run production server
- `npm run debug` - Run diagnostics

### Project Structure

```
src/
├── server.ts              # Main MCP server
├── services/
│   ├── ai.service.ts       # OpenAI GPT-4 integration
│   └── curation.service.ts # Curation logic
├── data/
│   └── mock-data.ts        # Categories, tags, and sample data
└── types.ts               # TypeScript definitions
```