Skip to main content
Glama
README.md
# MCP TODO Server

[PortuguΓͺs](./README-pt.md) | **English**

A robust [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server built with [NestJS](https://nestjs.com/), designed to manage TODO tasks and integrate seamlessly with AI agents like Claude Desktop, ChatGPT, and automation tools like n8n.

## πŸš€ Features

- **βœ… TODO Management**: Full CRUD operations for tasks.
- **πŸ€– MCP Integration**: Exposes TODO operations as MCP tools using both SSE (Server-Sent Events) and Stdio (via CLI integration).
- **πŸ“š Swagger UI**: Interactive API documentation at `/api/docs`.
- **πŸ” MCP Inspector**: Built-in support for debugging tools with the `@modelcontextprotocol/inspector`.
- **πŸ› οΈ Modern Tooling**: Built with TypeScript, Biome for linting/formatting, and Jest for E2E testing.

## πŸ› οΈ Tech Stack

- **Framework**: [NestJS](https://nestjs.com/)
- **Protocol**: [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
- **Documentation**: [Swagger/OpenAPI](https://swagger.io/)
- **Linting/Formatting**: [Biome](https://biomejs.dev/)
- **Testing**: [Jest](https://jestjs.io/) & [Supertest](https://github.com/visionmedia/supertest)

## πŸ“‹ Prerequisites

- [Node.js](https://nodejs.org/) (v18 or higher)
- [npm](https://www.npmjs.com/)

## βš™οΈ Project Setup

```bash
# Install dependencies
$ npm install

# Create environment file
$ cp .env.example .env # Ensure SERVER_PORT=3000 is set
```

## πŸƒ Compilation and Running

```bash
# Development (watch mode)
$ npm run start:dev

# Production mode
$ npm run build
$ npm run start:prod
```

## πŸ“– API Documentation

Once the server is running, you can access the interactive Swagger documentation at:
`http://localhost:3000/api/docs`

## πŸ€– Using with MCP Clients

### 1. ChatGPT Desktop (macOS)
1. Go to **Settings > Advanced** and enable **Developer Mode**.
2. Go to **Settings > Connectors** and click **Create**.
3. Set URL to `http://localhost:3000/sse` and Authentication to **None**.

### 2. MCP Inspector (Debugging)
To debug the MCP tools locally:
```bash
$ npm run inspector
```
This will open the MCP Inspector at `http://localhost:3000/sse`.

### 3. Claude Desktop
Add the following to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "mcp-todo": {
      "command": "node",
      "args": ["/path/to/project/dist/main.js"]
    }
  }
}
```

## πŸ§ͺ Testing

```bash
# Unit tests
$ npm run test

# End-to-end tests
$ npm run test:e2e
```

## πŸ“„ License

This project is [UNLICENSED](LICENSE).