CodePilot MCP

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.

Category
访问服务器

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 /codepilot in 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 assignees
  • github_list_issues - Query issues with filters
  • github_create_pr - Create pull requests with automation

Notion Integration

  • notion_create_page - Create structured documentation
  • notion_update_page - Update existing pages
  • notion_query_database - Search and filter databases

Google Calendar Integration

  • calendar_create_event - Schedule meetings with attendees
  • calendar_list_events - Query calendar events
  • calendar_update_event - Modify existing events

Workflow Automation

  • workflow_project_setup - End-to-end project initialization
  • workflow_bug_triage - Automated bug analysis and assignment
  • workflow_meeting_scheduler - Smart meeting coordination

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB instance
  • API tokens for GitHub, Notion, and Google Calendar

Installation

  1. Clone and Install Dependencies
git clone <repository-url>
cd CodePilot-MCP
npm install
  1. Environment Setup
cp .env.example .env
# Edit .env with your API tokens and database URLs
  1. Build the Project
npm run build
  1. Start the MCP Server
npm start

Testing with Claude Desktop

  1. Configure Claude Desktop
{
  "mcpServers": {
    "codepilot-mcp": {
      "command": "node",
      "args": ["C:\\path\\to\\CodePilot-MCP\\dist\\index.js"]
    }
  }
}
  1. 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

  1. Create a Slack app at https://api.slack.com/apps
  2. Configure the following scopes:
    • app_mentions:read
    • chat:write
    • commands
    • users:read
  3. 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

  1. Create Service Module:

    // src/services/newservice/index.ts
    export class NewService {
      async performAction(params: any) {
        // Implementation
      }
    }
    
  2. Add Validation Schema:

    // src/utils/validation.ts
    export const NewServiceSchema = z.object({
      // Define schema
    });
    
  3. Register Tool in MCP Server:

    // src/index.ts
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (request.params.name === 'new_service_action') {
        // Handle the tool
      }
    });
    
  4. 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

  1. Clone the repository
  2. Install dependencies: npm install
  3. Copy .env.example to .env and configure
  4. Start development server: npm run dev
  5. 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

  1. Create feature branch from main
  2. Make changes with tests
  3. Update documentation
  4. Submit PR with description
  5. 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! 🚀

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选