AI-powered task management designed for seamless integration with Claude Code. Built with React, Node.js, and MongoDB.
- Projects & Tasks - Organize work with hierarchical project structure
- Kanban Board - Visual task management with drag-and-drop
- Task Analytics - Track progress, velocity, and team performance
- Rich Task Details - Descriptions, priorities, due dates, and custom fields
- WebUI Chat Interface - Gorgeous Claude-style chat with file upload support
- Native MCP Support - Built-in Model Context Protocol server
- Real-time Streaming - Claude Code SDK integration with Socket.IO bridge
- Enterprise Permission System - Multi-channel prompt delivery with progressive timeouts
- WebSocket Reliability - 37ms average delivery with automatic fallback to SSE and polling
- Interactive UI Components - Professional permission prompts with risk-based color coding
- Plan Mode Sync - Claude Code todos automatically sync with Baton
- Bidirectional Sync - Convert between Claude todos and Baton tasks
- Context-Aware - Automatic project detection based on workspace
- 16 MCP Tools - Create tasks, manage projects, analytics, and more
- 8 MCP Prompts - Project planning, task breakdown, retrospectives
- File Attachments - Upload code, images, documents (25MB, multiple formats)
- Docker Compose - One-command setup with MongoDB
- Real-time Updates - Socket.IO for collaborative features
- TypeScript 2025 - Enterprise-grade type safety and modern patterns
- Prisma ORM - Type-safe database operations
- RESTful API - Comprehensive backend API
-
Clone and Start
git clone <repository-url> cd baton # Start with enhanced Docker management and automatic Prisma sync make docker-up
-
Access Baton
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- Health Check: http://localhost:3001/health
- Chat Interface: http://localhost:5173/chat
-
Check Status
make status # Check all services make logs # View real-time logs
That's it! Baton is running with a seeded demo project and tasks.
# Complete development setup
make dev-full # Install dependencies and start all services
# Docker management with automatic Prisma sync
make docker-up # Start containers with Prisma sync
make docker-restart # Restart with automatic sync
make docker-rebuild # Complete rebuild when needed
# Database operations with sync
make db-check # Check database connection and schema
make db-migrate # Run migrations with automatic Prisma sync
make db-reset # Reset and reseed database
# Prisma client management (fixes sync issues)
make prisma-sync # Fix Prisma client sync issues instantly
make prisma-generate # Generate Prisma client only
# Service monitoring
make status # Check status of all services
make logs # View real-time logs from all services
make clean # Stop services and clean up
# Integration testing
make test-integration # Test Claude Code connectivity
make test-claude-permissions # Test permission system
Baton offers two powerful ways to integrate with Claude Code:
Prerequisites: Claude Code installed, Docker services running
Setup Steps:
-
Start All Services
docker compose up -d
-
Start Bridge Service
# Start the local Claude Code bridge service (runs outside Docker) bun run scripts/bridge.ts
-
Open Chat Interface
open http://localhost:5173/chat
Features:
- π¨ Gorgeous Claude-style dark theme with time-based greetings
- π File upload support (code, images, documents - up to 25MB)
- π¬ Real-time streaming responses with session persistence
- π§ Interactive permission system with progressive timeout strategy
- π WebSocket delivery (37ms average) with automatic fallback to SSE and polling
- π‘οΈ Risk-based tool approval with professional UI components
- π Real-time permission analytics and usage statistics
- π± Collapsible sidebar with conversation history
- β¨ Professional chat bubbles with avatars and streaming indicators
Prerequisites: Claude Code installed, Baton running with Docker
Setup Steps:
-
Start Baton (Magic One-Command Setup)
docker compose up -d
The MCP server is automatically running with Claude Code-compatible transports:
- SSE: http://localhost:3001/mcp/sse (HTTP-based)
- STDIO: Available via docker exec (Most reliable)
-
Get Your Project Connection URL
# Visit the Baton frontend to see your projects open http://localhost:5173 # Or get connection info via API (replace "My Project" with your project name) curl "http://localhost:3001/api/mcp/connection?projectName=My Project"
-
Add MCP Server to Claude Code
Choose your preferred transport method:
Option A: STDIO Transport (Recommended - Most Reliable)
# Single MCP server instance that handles all projects claude mcp add baton -- docker exec -i baton-backend npm run mcp:stdio
Option B: SSE Transport (HTTP-based)
# Single MCP server instance that handles all projects claude mcp add baton --transport sse http://localhost:3001/mcp/sse
Note: The MCP server automatically detects which project you're working on based on your current workspace. No need for separate connections per project!
-
Verify Integration
claude mcp list claude mcp get baton
- View Tasks: "Show me my current tasks"
- Create Tasks: "Add a task to implement user authentication"
- Project Analytics: "What's the status of my current project?"
- Planning: "Create a project plan for a new feature"
- Todo Lists: Claude Code plan mode automatically syncs with Baton
- Bidirectional Sync: "Sync my current todos to Baton tasks"
Baton includes a powerful AI chat assistant that uses your local Claude Code installation to provide intelligent responses about your projects, tasks, and general development questions. Now with enterprise-grade permission system and lightning-fast WebSocket delivery!
- Project Context Awareness - Automatically includes current project context in conversations
- Streaming Responses - Real-time streaming of Claude's responses as they're generated
- Claude.ai-style Interface - Familiar dark theme chat UI similar to Claude.ai
- Persistent Conversations - All chat history is saved and searchable
- Enterprise Permission System - Multi-channel prompt delivery with progressive timeout strategy
- WebSocket Reliability - 37ms average delivery with automatic fallback to SSE and polling
- Interactive UI Components - Professional permission prompts with risk-based color coding
- Progressive Timeouts - 30s β 60s β 120s escalation with smart auto-decisions
- Permission Analytics - Real-time tracking of tool usage and approval patterns
- Session Continuation - Maintain context across multiple interactions
- Tool Integration - Full access to Write, Edit, Read, Web Search, and MCP tools
- Claude Code installed:
npm install -g @anthropic-ai/claude-code
- Baton running (see Quick Start above)
# Complete setup with automatic Prisma sync
make dev-full
# Or if you already have Baton running:
make dev
# Check everything is working
make status
make db-check
-
Start the Chat Handler
# Automated permission handling - no prompts for trusted tools make handler # Or manually: bun run scripts/bridge.ts > /tmp/bridge-service.log 2>&1 &
-
Start the Chat Bridge (Optional - for WebSocket connections)
make bridge # Or manually: node scripts/chat-bridge.js > /tmp/chat-bridge.log 2>&1 &
-
Access the Chat Interface
open http://localhost:5173/chat
# View status of all services
make status
# Check database connection and schema
make db-check
# View real-time logs
make logs
# Test integration
make test-integration
# Test permission system
make test-claude-permissions
-
Start a Conversation
- Navigate to the Chat section in Baton
- Type your message in the input field
- Press Enter or click Send
-
File Operations (Automated!)
π¬ You: "Create a README.md file for this project with setup instructions" π€ Claude: I'll create a comprehensive README file for you. β File created automatically at: /home/user/project/README.md
No permission prompts needed! The system automatically allows:
- File creation and editing (Write, Edit, MultiEdit)
- File reading and searching (Read, Glob, Grep, LS)
- Safe commands (npm, git, node, python basics)
- Web searches and MCP tool access
-
Interactive Prompts (When Needed) For potentially dangerous operations, you'll see inline prompts:
π€ Claude wants to run: rm -rf old-folder/ [Yes] [No] [Yes, don't ask again]
-
Example Queries
- File Operations: "Create a config.json file with database settings"
- Code Generation: "Write a Python script to analyze CSV data"
- Project Tasks: "What tasks are currently in progress?"
- Planning: "Create a project plan for user authentication feature"
- Analysis: "Review the current codebase and suggest improvements"
- Research: "Explain how to implement JWT authentication in Node.js"
-
Project Context
- The chat agent automatically includes your current project context
- Responses are tailored to your specific project and tasks
- File operations are scoped to your project directory
The chat agent uses an enterprise-grade bridge architecture with comprehensive permission management:
[Baton UI] β WebSocket β [Backend API] β Bridge Service β [Claude Code SDK]
β β β β β
[Interactive UI] [Socket.IO] [PromptDelivery] [Progressive] [Tool Execution]
β β β β β
[User Response] [37ms avg] [Multi-Channel] [Timeout Strategy] [Permission Check]
System Components:
- Professional Frontend - React-based chat UI with InteractivePromptComponent and risk-based styling
- Multi-Channel Delivery - WebSocket (37ms) β SSE β HTTP Polling with automatic fallback
- Bridge Service - Bun-powered bridge with progressive timeout strategy (30s β 60s β 120s)
- Permission Engine - Enterprise-grade security with analytics and persistent permissions
- Claude Code SDK - Full SDK integration with canUseTool callbacks and session management
Key Features:
- π 37ms Average Delivery via optimized WebSocket connections
- π Automatic Fallback to SSE and polling for reliability
- π― Progressive Timeouts with smart escalation notifications
- π Real-time Analytics tracking permission patterns and response times
- π‘οΈ Risk-Based Decisions with conservative auto-approval for safe tools
# Check status of all services
make status
# Check database connection and schema
make db-check
# View real-time logs from all services
make logs
# Test integration
make test-integration
# Test permission handling specifically
make test-claude-permissions
# Fix Prisma client sync issues
make prisma-sync
# Restart chat services with automatic Prisma sync
make restart
# Or restart Docker containers
make docker-restart
# Check all service statuses
make status
# View backend logs specifically
make logs-backend
# View bridge logs specifically
make logs-bridge
# Check if bridge service is running
ps aux | grep bridge.ts
# Test file creation (should work without prompts)
make test-claude-permissions
# Check for errors in bridge logs
tail -f /tmp/bridge-service.log | grep -i error
# Verify Claude Code installation
which claude
# Install if missing
npm install -g @anthropic-ai/claude-code
# Test Claude Code directly
claude --help | grep permission-mode
# Check all services are running
make status
# Check database connection and schema
make db-check
# Check backend health
curl http://localhost:3001/health
# View Docker container logs
make logs-backend
# Fix Prisma sync issues
make prisma-sync
# Complete restart with cleanup
make clean && make dev-full
Baton now supports automatic capture of your Claude Code plans and todos through PostToolUse hooks!
- π Auto-capture Plans: When you exit plan mode in Claude Code, plans are automatically saved to Baton
- β Todo Sync: Claude Code todos are automatically synced to Baton in real-time
- π― Project Detection: Uses
.baton-project
files to associate todos with correct projects - π Real-time Updates: WebSocket notifications keep your Baton UI in sync
-
Create Project Context File
# In your project root directory echo '{"projectId": "your-project-id-from-baton"}' > .baton-project
-
Configure Claude Code Hooks
Add this to your
~/.claude/settings.json
or.claude/settings.local.json
:{ "hooks": { "PostToolUse": [ { "matcher": "TodoWrite", "hooks": [ { "type": "command", "command": "cd /path/to/your/baton && node scripts/capture-todos.js" } ] }, { "matcher": "ExitPlanMode", "hooks": [ { "type": "command", "command": "cd /path/to/your/baton && node scripts/capture-plan.js" } ] } ] } }
Replace
/path/to/your/baton
with your actual Baton installation path. -
Ensure Baton is Running
docker compose up -d
- Work in Claude Code plan mode as usual
- Accept plans - they're automatically captured in Baton
- Create todos in Claude Code - they sync automatically to Baton
- View everything in the Baton UI at http://localhost:5173
- Quick Start Guide - Get running in 5 minutes
- Full Setup Guide - Detailed configuration and troubleshooting
Baton uses a single MCP server instance that automatically detects which project you're working on:
-
Automatic Detection (No Setup Required)
- Reads
.baton-project
configuration files in your workspace - Matches current folder names to project names in Baton
- Stores workspace mappings in database for faster lookup
- Reads
-
Context-Aware Operations
- All MCP requests detect project context per-request
- Task creation automatically uses detected project
- Resource URIs like
baton://workspace/tasks
show current project only - Claude Code todos are automatically scoped to current project
-
Manual Project Association
# In Claude Code, ask: "Associate this workspace with project X" # This uses the associate_workspace_project MCP tool
Option 1: Create .baton-project
file
# In your project root directory
echo '{"projectId": "your-project-id-from-baton"}' > .baton-project
Option 2: Match folder names
- Name your project folder to match a project name in Baton
- The MCP server will automatically detect the connection
Option 3: Use MCP tool
- Ask Claude Code: "Associate this workspace with [Project Name]"
- The tool will create the necessary mappings
Baton provides 16 powerful MCP tools for comprehensive task and project management from Claude Code:
create_project
- Create new projects with name, description, and colorupdate_project
- Update existing project details and settings
create_task
- Create tasks with titles, descriptions, priorities, due dates, and labelsupdate_task
- Update any task properties including status and assignmentsmove_task
- Move tasks between columns (todo, in_progress, done) with ordering
TodoRead
- Read all Claude Code todos for current projectTodoWrite
- Write/update Claude Code todos with full CRUD operationssync_todos_to_tasks
- Convert Claude Code todos into Baton taskssync_tasks_to_todos
- Sync Baton task updates back to Claude Code todos
create_mcp_plan
- Create structured plans with tasks from AI agentsconvert_mcp_plan
- Convert MCP plans into actionable project tasks
get_project_analytics
- Get detailed project insights, completion rates, and metricsget_team_productivity
- Analyze team performance and productivity trends
detect_workspace_project
- Find and read .baton-project files for project contextassociate_workspace_project
- Link current workspace to a Baton projectget_workspace_info
- Get current workspace and project information
# In Claude Code, you can use natural language:
"Create a new project called 'Mobile App'"
"Add a high-priority task to implement user authentication"
"Show me analytics for my current project"
"Sync my current todos to Baton tasks"
"What's my team's productivity this month?"
- Node.js 18+ and npm
- MongoDB 7+
- Git
-
Clone Repository
git clone <repository-url> cd baton
-
Backend Setup
cd backend npm install # Set up environment cp .env.example .env # Edit .env with your database credentials # Database setup npm run db:migrate npm run db:seed # Start backend npm run dev
-
Frontend Setup
cd frontend npm install npm run dev
-
MCP Server Development
cd backend # STDIO mode npm run mcp:dev # WebSocket mode npm run mcp:dev:websocket
cd backend
# Run all tests
npm test
# MCP server tests
npm run test:mcp
# Database tests
npm run test:mcp:db
# Workspace context tests
npm run test:workspace
# Backend
cd backend
npm run build
npm run lint
# Frontend
cd frontend
npm run build
npm run lint
baton://projects
- All projectsbaton://projects/{id}/tasks/kanban
- Project kanban boardbaton://workspace/current
- Current workspace projectbaton://workspace/tasks
- Current workspace tasksbaton://projects/{id}/analytics
- Project analytics
create_task
- Create new taskupdate_task
- Update existing taskget_project_analytics
- Get project metricsmove_task
- Change task status/positionassociate_workspace_project
- Link workspace to projectTodoRead
- Read Claude Code todos for current projectTodoWrite
- Write/update Claude Code todossync_todos_to_tasks
- Convert Claude todos to Baton taskssync_tasks_to_todos
- Convert Baton tasks to Claude todos
project_planning
- Create comprehensive project planstask_breakdown
- Break down large tasks into subtasksretrospective
- Generate project retrospectivesrisk_assessment
- Analyze project risks
DATABASE_URL="mongodb://localhost:27017/baton_dev"
PORT=3001
MCP_SERVER_PORT=3002
CLIENT_URL="http://localhost:5173"
VITE_API_URL=http://localhost:3001
# Enhanced database management with automatic Prisma sync
make db-reset # Reset database with sync
make db-migrate # Run migrations with sync
make db-seed # Seed sample data
make db-check # Check database connection and schema
make prisma-sync # Fix Prisma client sync issues
# Manual operations (if needed)
cd backend
npx prisma studio # Open Prisma Studio
npx prisma generate # Generate Prisma client manually
# Enhanced Docker management with automatic Prisma sync
make status # Check all container statuses
make docker-restart # Restart with Prisma sync
make docker-rebuild # Complete rebuild when needed
# Manual Docker operations (if needed)
docker ps # Check container status
make logs-backend # Check backend logs
docker logs baton-postgres # Check database logs
# Enhanced database troubleshooting
make db-check # Check database connection and schema
make db-reset # Reset database with automatic sync
make prisma-sync # Fix Prisma client sync issues
# Manual operations (if needed)
docker logs baton-mongodb # Check MongoDB logs
# Verify MCP server is registered
claude mcp list
# Check server status
claude mcp get baton
# Test STDIO connection directly
docker exec -i baton-backend npm run mcp:stdio
# Test SSE connection directly
curl http://localhost:3001/mcp/sse
# Check backend logs for MCP errors
docker logs baton-backend
# Test project detection
# In your project folder, ask Claude Code: "What project am I in?"
If you encounter port conflicts, update these ports in docker-compose.yml
:
- Frontend: 5173 β your preferred port
- Backend: 3001 β your preferred port
- MCP Server: 3002 β your preferred port
- MongoDB: 27017 β your preferred port
- Quick Status Check:
make status && make db-check
- View Logs:
make logs
- Test Health:
curl http://localhost:3001/health
- Fix Common Issues:
make prisma-sync
- Check Claude Code:
claude mcp get baton
- Complete Reset:
make clean && make dev-full
Most Common Solutions:
- Prisma sync issues:
make prisma-sync
- Service restart:
make docker-restart
- Database problems:
make db-check && make db-reset
- Complete reset:
make clean && make dev-full
Baton includes comprehensive documentation for all integration approaches:
- Getting Started Guide - Quick 5-minute setup with
bridge.ts
- Perfect for: New users, quick demos, development setup
- Claude Code Integration Guide - Complete integration documentation
- Covers: WebUI chat, MCP server, hook system, permission management
- Perfect for: Full Claude Code integration, production deployments
- MCP Server Guide - Model Context Protocol documentation
- Features: 20 tools, 12 prompts, Claude Desktop integration
- Perfect for: AI agents, programmatic access, automation
- Technical Reference - Developer documentation
- Covers: API endpoints, database schema, architecture, performance
- Perfect for: Developers, API integration, troubleshooting
Integration Method | Best For | Setup Time | Documentation |
---|---|---|---|
WebUI Chat | Interactive development | 5 minutes | Integration Guide |
MCP Server | AI agents, automation | 2 minutes | MCP Server Guide |
Hook System | Background automation | 10 minutes | Integration Guide |
- All examples in the documentation are tested and verified against the current implementation
- Use
bun run scripts/bridge.ts
as the primary chat handler (not obsolete webui handlers) - The MCP server provides 20 tools and 12 AI-powered prompts
- Documentation was completely rewritten in August 2025 to match current reality
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Run tests:
npm test
- Commit changes:
git commit -m "Add amazing feature"
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the Baton Non-Commercial Open Source License.
- Personal Projects - Individual use for learning and development
- Educational Use - Academic institutions, courses, and research
- Open Source Projects - Projects that are made freely available
- Non-Profit Organizations - Registered non-profits for their mission
- Government & Public Sector - Use by government entities
- Commercial Use - Cannot be used for commercial purposes or revenue generation
- Enterprise Use - Cannot be used by for-profit companies for business operations
- Paid Services - Cannot be offered as a paid service or subscription
For commercial use, enterprise licensing, or any business application, please contact the project maintainers for licensing terms.
See the LICENSE file for complete details.
- Built with Model Context Protocol (MCP)
- Powered by Claude Code
- UI components from shadcn/ui
- Icons from Lucide React