Custom MCP (Model Context Protocol) with ChatGPT AI Template
LocalAbout Custom MCP (Model Context Protocol) with ChatGPT AI Template
Custom MCP (Model Context Protocol) with ChatGPT AI Template combines an MCP server with a ChatGPT-style interface for tasks involving Gmail and GitHub. It uses OpenAI models to select tools and can move between the services to handle requests.
Key features
- 01Reads and analyzes Gmail messages
- 02Checks GitHub repositories and alerts
- 03OpenAI model-driven tool selection
- 04Autonomous navigation across services
- 05Next.js and Chakra UI interface
Use cases
- 01Finding GitHub warnings in Gmail
- 02Checking repository dependency alerts
- 03Summarizing recent GitHub notifications
MCP support
The project includes an MCP server that connects the chat interface to Gmail and GitHub capabilities. It processes user queries and returns responses through the MCP Chat interface.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMECustom MCP (Model Context Protocol) with ChatGPT AI Template
This project integrates a Custom MCP (Model Control Protocol) with a ChatGPT AI Template to provide an intelligent agentic system that integrates with Gmail and GitHub.
Features
- Gmail Integration: Reads and analyzes emails from your Gmail account
- GitHub Integration: Interacts with GitHub repositories to check for issues, alerts, and other information
- Intelligent Decision Making: Uses OpenAI models to decide which tools to use and how to process information
- Autonomous Operation: Can autonomously navigate between different services to fulfill complex requests
- Modern UI: Beautiful and responsive UI built with Next.js and Chakra UI
Example Use Cases
- "Check if there are any GitHub warnings in my Gmail"
- "Find dependency alerts for my repositories"
- "Summarize recent GitHub notifications"
Technical Stack
- Backend: FastAPI (Python)
- AI: OpenAI API
- External APIs: Gmail API, GitHub API
- Frontend: Next.js, React, Chakra UI
Project Structure
Custom-MCP/
├── src/ # MCP Server
│ ├── api/ # API endpoints
│ ├── services/ # Service integrations (Gmail, GitHub, OpenAI)
│ ├── models/ # Data models
│ ├── utils/ # Utility functions
│ ├── config/ # Configuration management
│ └── main.py # Application entry point
├── chatgpt-ai-template/ # ChatGPT AI Template
│ ├── app/ # Next.js app directory
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ └── package.json # Dependencies
├── .env # Environment variables (not in repo)
├── .env.example # Example environment variables
├── requirements.txt # Python dependencies
├── start.sh # Script to start both servers
└── README.md # This file
Setup Instructions
1. MCP Server Setup
-
Install Python dependencies:
pip install -r requirements.txt -
Set up environment variables in a
.envfile (see.env.example) -
Run the MCP server:
python run.py -
The MCP server will be available at
http://localhost:8000
2. ChatGPT AI Template Setup
-
Navigate to the ChatGPT AI Template directory:
cd chatgpt-ai-template -
Install Node.js dependencies:
npm install -
Run the development server:
npm run dev -
The ChatGPT AI Template will be available at
http://localhost:3000
3. Quick Start (Both Servers)
For convenience, you can use the provided script to start both servers at once:
./start.sh
This script will:
- Start the MCP server in the background
- Wait for it to initialize
- Start the ChatGPT AI Template frontend
- Automatically stop the MCP server when you exit the frontend
Configuration
You'll need to set up API credentials for:
- Gmail API (OAuth2)
- GitHub API (Personal Access Token)
- OpenAI API
See the .env.example file for required environment variables.
Usage
- Start both the MCP server and the ChatGPT AI Template as described above.
- Open your browser and navigate to
http://localhost:3000. - Click on the "MCP Chat" option in the sidebar to access the MCP Chat interface.
- Enter your query in the input field and press Enter or click the Send button.
- The MCP server will process your query and return a response.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.