CodePilot MCP
Enables automation of workflows across GitHub, Notion, and Google Calendar with AI-powered task execution, personalized agent memory, and Slack integration for seamless team coordination and project management.
README
š CodePilot MCP - Intelligent Automation Platform
šÆ Overview
CodePilot MCP is an intelligent automation platform built on the Model Context Protocol (MCP) framework. It acts as a bridge between Large Language Models (LLMs) and real-world tools like GitHub, Notion, and Google Calendar. Designed for software engineers, team coordinators, and AI researchers, CodePilot enables smart task execution, personalized agent memory, and Slack integration through a modular, secure, and scalable microservices architecture.
š Key Features
1. š Multi-Tool MCP Agent Server
- Automates workflows across GitHub, Notion, and Google Calendar
- Complies with the open MCP Protocol for tool interoperability
- Containerized with real-time event streaming (SSE)
2. š¤ Slack Bot Integration
- Use the command
/codepilotin Slack to automate:- Bug triage in GitHub
- Meeting rescheduling in Calendar
- Task syncing in Notion
- Internally triggers: Planner ā Reasoner ā Validator ā Executor ā Memory Store
3. š§ LLM Memory Store
- Tracks previous commands, feedback, and tool interactions
- Personalizes responses based on user history
- Powered by MongoDB with RBAC for secure storage
4. š MCP Eval Dashboard
- Built using Next.js, TailwindCSS, and ShadCN
- Features:
- ā Success/failure rate of agent tasks
- š§ LLM memory usage and impact
- š API call history
- š Error logs and response times
š§ Architecture
User (Slack/Frontend)
ā
ā¼
/codepilot Command or Dashboard UI
ā
ā¼
Planner Agent āāā¶ Reasoner (LLM) āāā¶ Validator (Zod)
ā ā
ā¼ ā¼
Executor āāā¶ GitHub / Notion / Calendar API
ā
ā¼
Memory Store (Mongo) + Eval Logger (Postgres)
ā
ā¼
Eval Dashboard (Next.js)
š§± Tech Stack Breakdown
| Layer | Tech |
|---|---|
| Frontend | Next.js, Tailwind, ShadCN (for MCP Eval Dashboard) |
| Backend | Node.js + TypeScript (Express or Next.js API Routes) |
| Databases | PostgreSQL (main data), Redis (caching), MongoDB (LLM Memory Store) |
| LLMs | GPT-4o (OpenAI), Relevance AI, Hugging Face |
| Infra | Docker, Google Cloud Run, GitHub Actions, Secret Manager |
| Slack Bot | Bolt SDK (Slack API) + Webhook Trigger to MCP Server |
| Auth & ACL | OAuth 2.1, RBAC, JWT |
| Observability | Sentry, Google Cloud Logging, UptimeRobot |
| Validation | Zod, CSP headers, Prompt Injection Filters |
š¦ Available Tools
GitHub Integration
github_create_issue- Create issues with labels and assigneesgithub_list_issues- Query issues with filtersgithub_create_pr- Create pull requests with automation
Notion Integration
notion_create_page- Create structured documentationnotion_update_page- Update existing pagesnotion_query_database- Search and filter databases
Google Calendar Integration
calendar_create_event- Schedule meetings with attendeescalendar_list_events- Query calendar eventscalendar_update_event- Modify existing events
Workflow Automation
workflow_project_setup- End-to-end project initializationworkflow_bug_triage- Automated bug analysis and assignmentworkflow_meeting_scheduler- Smart meeting coordination
š Quick Start
Prerequisites
- Node.js 18+
- MongoDB instance
- API tokens for GitHub, Notion, and Google Calendar
Installation
- Clone and Install Dependencies
git clone <repository-url>
cd CodePilot-MCP
npm install
- Environment Setup
cp .env.example .env
# Edit .env with your API tokens and database URLs
- Build the Project
npm run build
- Start the MCP Server
npm start
Testing with Claude Desktop
- Configure Claude Desktop
{
"mcpServers": {
"codepilot-mcp": {
"command": "node",
"args": ["C:\\path\\to\\CodePilot-MCP\\dist\\index.js"]
}
}
}
- Test Commands in Claude
- "Create a GitHub issue for bug tracking"
- "Set up a new project with GitHub repo and Notion workspace"
- "Schedule a team standup meeting"
š§ Development
Scripts
npm run dev # Development server with hot reload
npm run build # Build TypeScript to JavaScript
npm run test # Run test suite
npm run lint # ESLint code checking
npm run format # Prettier code formatting
Project Structure
src/
āāā index.ts # Main MCP server entry point
āāā agents/ # AI agent system
ā āāā planner.ts # Workflow planning agent
ā āāā reasoner.ts # LLM-powered reasoning agent
ā āāā executor.ts # Task execution agent
ā āāā eval.ts # Evaluation and metrics agent
āāā services/ # External service integrations
ā āāā github/ # GitHub API service
ā āāā notion/ # Notion API service
ā āāā calendar/ # Google Calendar service
ā āāā auth/ # Authentication service
ā āāā memory/ # MongoDB memory store
āāā utils/ # Shared utilities
āāā logger.ts # Winston logging
āāā validation.ts # Zod schemas
š¤ Slack Bot Integration
The MCP server includes a comprehensive Slack bot for workflow management and notifications.
Features
- Interactive Commands: Slash commands and mention handlers
- Workflow Control: Start, stop, and monitor workflows directly from Slack
- Real-time Notifications: Get updates on workflow status changes
- Webhook Integration: Receive notifications from GitHub, Notion, and Calendar events
Setup
- Create a Slack app at https://api.slack.com/apps
- Configure the following scopes:
app_mentions:readchat:writecommandsusers:read
- Add environment variables:
SLACK_BOT_TOKEN=xoxb-your-bot-token SLACK_SIGNING_SECRET=your-signing-secret SLACK_APP_TOKEN=xapp-your-app-token # For Socket Mode
Commands
/codepilot workflows- List your workflows/codepilot create [name]- Create a new workflow/codepilot help- Show help message@CodePilot start workflow [name]- Start a workflow@CodePilot status workflow [id]- Check workflow status@CodePilot stop workflow [id]- Stop a workflow
š MCP Eval Dashboard
A modern Next.js dashboard for monitoring and managing your CodePilot MCP workflows.
Features
- Real-time Monitoring: Live workflow status and system health
- Performance Metrics: Charts and analytics for workflow performance
- Activity Feed: Recent activity and notifications
- System Health: Monitor API services and resource usage
- Quick Actions: Start workflows and manage tasks
Setup
cd dashboard
npm install
npm run dev
The dashboard will be available at http://localhost:3000
Environment Variables
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_WS_URL=ws://localhost:3001
Components
- Dashboard Layout: Responsive sidebar navigation
- Workflow Overview: Active workflows and progress tracking
- System Health: Service status and resource monitoring
- Metrics Charts: Performance visualization with Recharts
- Recent Activity: Timeline of recent events
- Quick Actions: One-click workflow management
š Webhook Service
The webhook service handles incoming events from external services and routes them appropriately.
Supported Webhooks
- GitHub: PR creation, issue updates, repository events
- Slack: Event API notifications
- Notion: Page updates, database changes
- Google Calendar: Event creation, updates
- Custom: Generic webhook endpoint for other integrations
Endpoints
POST /webhooks/github - GitHub webhook events
POST /webhooks/slack - Slack event subscriptions
POST /webhooks/notion - Notion API webhooks
POST /webhooks/calendar - Google Calendar notifications
POST /webhooks/custom/:source - Custom webhook endpoint
GET /webhooks/events - Webhook event history
GET /health - Health check
Security
- Signature verification for GitHub, Slack, and Notion
- CORS support
- Request logging and error handling
- Rate limiting (configurable)
š Development Workflow
Adding New Integrations
-
Create Service Module:
// src/services/newservice/index.ts export class NewService { async performAction(params: any) { // Implementation } } -
Add Validation Schema:
// src/utils/validation.ts export const NewServiceSchema = z.object({ // Define schema }); -
Register Tool in MCP Server:
// src/index.ts server.setRequestHandler(CallToolRequestSchema, async (request) => { if (request.params.name === 'new_service_action') { // Handle the tool } }); -
Add to Webhook Handler (if needed):
// src/services/webhook/index.ts private async handleNewServiceWebhook(payload: any): Promise<void> { // Handle webhook }
Testing
# Run main server tests
npm test
# Run dashboard tests
cd dashboard
npm test
# Type checking
npm run type-check
# Linting
npm run lint
Deployment Options
Local Development
npm run dev
Docker
docker build -t codepilot-mcp .
docker run -p 3000:3000 -p 3001:3001 codepilot-mcp
Google Cloud Run
gcloud run deploy codepilot-mcp \
--source . \
--platform managed \
--region us-central1 \
--allow-unauthenticated
Performance Optimization
- Caching: Redis for session and workflow state
- Database: MongoDB with indexes for fast queries
- Rate Limiting: Configurable per-service rate limits
- Connection Pooling: Reuse API connections
- Background Jobs: Queue system for long-running tasks
š Architecture Decisions
Why This Stack?
- TypeScript: Type safety and better developer experience
- Zod: Runtime validation and type inference
- Express: Webhook handling and API endpoints
- Next.js: Modern React framework for dashboard
- MongoDB: Flexible document storage for workflows
- Tailwind CSS: Utility-first styling
Design Patterns
- Service Layer: Separation of concerns for each integration
- Agent Pattern: Specialized agents for planning, reasoning, execution
- Event-Driven: Webhook-based real-time updates
- Validation Layer: Centralized input validation with Zod
- Error Handling: Comprehensive error boundaries and logging
Security Best Practices
- Input validation on all endpoints
- Webhook signature verification
- Rate limiting and CORS
- Environment variable configuration
- JWT-based authentication (extendable)
- SQL injection prevention (NoSQL with validation)
š Monitoring and Analytics
Metrics Collected
- Workflow execution times
- API response times
- Error rates by service
- Resource usage (CPU, memory)
- User activity patterns
Logging
import { logger } from './utils/logger';
logger.info('Operation completed', {
workflowId,
duration,
status
});
Health Checks
- Service availability monitoring
- Database connection status
- External API health
- Resource usage alerts
š¤ Contributing
Development Setup
- Clone the repository
- Install dependencies:
npm install - Copy
.env.exampleto.envand configure - Start development server:
npm run dev - Start dashboard:
cd dashboard && npm run dev
Code Style
- Use TypeScript for all new code
- Follow ESLint configuration
- Write tests for new features
- Document public APIs
- Use conventional commits
Pull Request Process
- Create feature branch from
main - Make changes with tests
- Update documentation
- Submit PR with description
- Address review feedback
š Roadmap
Version 1.1
- [ ] Discord integration
- [ ] Advanced workflow templates
- [ ] Workflow marketplace
- [ ] Mobile dashboard app
Version 1.2
- [ ] AI-powered workflow suggestions
- [ ] Multi-tenant support
- [ ] Advanced analytics
- [ ] Plugin system
Version 2.0
- [ ] Visual workflow builder
- [ ] Enterprise features
- [ ] Advanced security
- [ ] Workflow marketplace
š Support
- Documentation: Check this README and inline code comments
- Issues: Use GitHub Issues for bug reports
- Discussions: Use GitHub Discussions for questions
- Email: Contact [bathinibathinanna1432@gmail.com] for enterprise support
š Acknowledgments
- Model Context Protocol: For the foundational framework
- Anthropic: For MCP development and Claude integration
- Open Source Community: For the excellent libraries and tools
- Contributors: Thank you to all who help improve this project
Happy Automating! š
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.