Package Exports
- @todo-for-ai/mcp
- @todo-for-ai/mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@todo-for-ai/mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Todo for AI MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with access to the Todo for AI task management system. This allows AI assistants to retrieve tasks, get project information, and submit task feedback through a standardized interface.
Features
- 🔍 Get Project Tasks: Retrieve pending tasks for a specific project
- 📋 Get Task Details: Fetch detailed information about individual tasks
- ✅ Submit Feedback: Update task status and provide completion feedback
- 🔄 Automatic Retry: Built-in retry mechanism for network failures
- 📝 Comprehensive Logging: Detailed logging with configurable levels
- ⚙️ Flexible Configuration: Environment variables and config file support
Installation
From npm (Recommended)
npm install -g @todo-for-ai/mcpFrom Source
git clone <repository-url>
cd todo-mcp
npm install
npm run build
npm linkConfiguration
Environment Variables
Create a .env file or set environment variables:
# Required: Todo API base URL
TODO_API_BASE_URL=http://localhost:50110/todo-for-ai/api/v1
# Optional: API timeout in milliseconds (default: 10000)
TODO_API_TIMEOUT=10000
# Optional: API authentication token
TODO_API_TOKEN=your-api-token
# Optional: Log level (default: info)
LOG_LEVEL=info
# Optional: Environment (default: development)
NODE_ENV=developmentConfiguration File
Alternatively, create a config.json file:
{
"apiBaseUrl": "http://localhost:50110",
"apiTimeout": 10000,
"apiToken": "",
"logLevel": "info"
}Usage
Command Line
# Start the MCP server
todo-for-ai-mcp
# With custom configuration
TODO_API_BASE_URL=http://your-server:8080 todo-for-ai-mcpIDE Integration
Claude Desktop
Add to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"todo-for-ai": {
"command": "todo-for-ai-mcp",
"env": {
"TODO_API_BASE_URL": "http://localhost:50110"
}
}
}
}Cursor IDE
Add to your Cursor configuration:
{
"mcpServers": {
"todo-for-ai": {
"command": "npx",
"args": ["todo-for-ai-mcp"],
"env": {
"TODO_API_BASE_URL": "http://localhost:50110"
}
}
}
}Local Development
For development with local Todo for AI server:
{
"mcpServers": {
"todo-for-ai-local": {
"command": "node",
"args": ["/path/to/todo-mcp/dist/index.js"],
"env": {
"TODO_API_BASE_URL": "http://localhost:50110",
"LOG_LEVEL": "debug"
}
}
}
}Available Tools
1. get_project_tasks_by_name
Get all pending tasks for a project by name.
Parameters:
project_name(string, required): Name of the projectstatus_filter(array, optional): Filter by task status (default: ["todo", "in_progress", "review"])
Example:
{
"project_name": "My Project",
"status_filter": ["todo", "in_progress"]
}2. get_task_by_id
Get detailed information about a specific task.
Parameters:
task_id(integer, required): ID of the task to retrieve
Example:
{
"task_id": 123
}3. submit_task_feedback
Submit feedback and update status for a task.
Parameters:
task_id(integer, required): ID of the taskproject_name(string, required): Name of the projectfeedback_content(string, required): Feedback descriptionstatus(string, required): New status ("in_progress", "review", "done", "cancelled")ai_identifier(string, optional): AI identifier (default: "MCP Client")
Example:
{
"task_id": 123,
"project_name": "My Project",
"feedback_content": "Completed the implementation as requested",
"status": "done",
"ai_identifier": "Claude"
}Development
Prerequisites
- Node.js 18+
- npm or yarn
- Todo for AI backend server running
Setup
# Clone and install
git clone <repository-url>
cd todo-mcp
npm install
# Copy environment file
cp .env.example .env
# Edit .env with your configuration
# Development mode
npm run dev
# Build
npm run build
# Test
npm test
# Lint
npm run lintProject Structure
todo-mcp/
├── src/
│ ├── index.ts # Main entry point
│ ├── server.ts # MCP server implementation
│ ├── api-client.ts # Todo API client
│ ├── config.ts # Configuration management
│ ├── logger.ts # Logging utilities
│ ├── error-handler.ts # Error handling
│ └── types.ts # TypeScript types
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdTroubleshooting
Common Issues
Connection Failed
- Ensure Todo for AI backend is running
- Check
TODO_API_BASE_URLis correct - Verify network connectivity
Authentication Errors
- Check if API token is required
- Verify
TODO_API_TOKENis set correctly
Tool Not Found
- Ensure MCP server is properly registered in IDE
- Check IDE configuration syntax
- Restart IDE after configuration changes
Debug Mode
Enable debug logging:
LOG_LEVEL=debug todo-for-ai-mcpHealth Check
Test connection to Todo API:
curl http://localhost:50110/api/healthLicense
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
Support
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the logs with debug mode enabled