chaodonghu/Slack-GitLab-Model-Context-Protocol-MCP-Server
If you are the rightful owner of Slack-GitLab-Model-Context-Protocol-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model-Context-Protocol (MCP) server designed to streamline the process of generating summaries from Slack and GitLab activities using OpenAI.
Slack Gitlab Digest Model Context Protocol MCP Server
A Model-Context-Protocol (MCP) server that retrieves Slack activity (messages, threads, replies), GitLab merge requests, and related comments, with summaries generated via OpenAI. Designed to help developers generate daily standups, weekly reports, or quarterly check-ins effortlessly.
Features
- Summarizes Slack activity for a user in different timeframes (today, yesterday, day before yesterday, last week)
- Captures all types of Slack activity including direct messages, thread replies, and emoji reactions
- GitLab Integration: Includes detailed summaries of user's GitLab merge requests and comments.
Setup
Prerequisites
- Node.js (v18+)
- pnpm
- Slack API token with appropriate scopes
- OpenAI API key
- Gitlab Token
š Getting Started
1. Environment Setup
First, you'll need to set up your environment variables. Create a file at src/env/keys.ts
:
export const OPENAI_API_KEY = "your_key_here";
export const SLACK_API_TOKEN = "your_key_here";
export const GITLAB_TOKEN = "your_key_here";
// Add any other keys you need
ā ļø Security Note: Storing API keys directly in source code is not recommended for production environments. This is only for local development and learning purposes. You can set the env var inline in the Cursor MCP interface as well.
2. Installation
npm install
# or
yarn install
3. Test with MCP inspector when developing -> currently you'll have to switch to the dev
branch, i'm unable to get a build branch working locally
Create a .env
file with
# Slack API Configuration
SLACK_API_TOKEN=key_here
# OpenAI API Configuration
OPENAI_API_KEY=key_here
# Gitlab API Configuration
GITLAB_TOKEN=key_here
git checkout dev
pnpm install
npx @modelcontextprotocol/inspector start
4. When finished developing build the Server
npm run build
4. Adding to Cursor
This project is designed to be used as an MCP server in Cursor. Here's how to set it up:
- Open Cursor
- Go to
Cursor Settings > Features > MCP
- Click
+ Add New MCP Server
- Fill out the form:
- Name: Daily Summarizer
- Type: stdio
- Command:
node /path/to/your/project/dist/index.js
š Tip: You might need to use the full path to your project's built index.js file.
After adding the server, you should see your tools listed under "Available Tools". If not, try clicking the refresh button in the top right corner of the MCP server section.
For more details about MCP setup, check out the Cursor MCP Documentation.
š Project Structure
src/
āāā tools/
ā āāā gitlab.ts # GitLab integration tool
ā āāā slack.ts # Slack integration tool
āāā types/
ā āāā slack.ts # Type definitions for Slack
ā āāā gitlab.ts # Type definitions for GitLab
āāā resources/
ā āāā slack.ts # Slack resource management
ā āāā slackClient.ts # Slack client setup
ā āāā openai.ts # OpenAI resource management
ā āāā gitlab.ts # GitLab resource management
āāā env/
ā āāā keys.ts # Environment configuration (add your API keys here!)
āāā index.ts # Main entry point