A comprehensive Flask-based Model Context Protocol (MCP) server that provides seamless integration between Notion, Slack, and Jira. This server enables AI assistants and other applications to interact with these platforms through a unified API interface.
- Database Management: List, create, and manage Notion databases
- Page Operations: Create, read, update, and delete Notion pages
- Content Management: Add content blocks, comments, and manage page properties
- Search & Discovery: Search across pages, databases, and content
- Advanced Features: Archive pages, manage users, and handle complex property types
- Channel Management: Access channels, members, and channel information
- Messaging: Send messages, replies, and manage message threads
- User Management: Search users, get user information, and manage workspace members
- Message Operations: Find, update, delete messages, and manage reactions
- Advanced Search: Find messages by content, user, or keywords
- Project Management: List projects, get project details, and manage project users
- Issue Management: Create, read, update, delete, and transition issues
- Comprehensive Updates: Support for all issue fields including custom fields
- User Management: Search users, assign issues, and manage project access
- Comments & Collaboration: Add comments, manage issue relationships
- Python 3.8+
- pip package manager
- Access to Notion, Slack, and/or Jira APIs
-
Clone or download the project files
-
Install required packages:
pip install flask flask-cors python-dotenv requests slack-sdk fastmcp- Create a
.envfile in your project root:
# Notion Configuration
NOTION_API_KEY=your_notion_integration_token
NOTION_DATABASE_ID=your_default_database_id
# Slack Configuration
SLACK_BOT_TOKEN=xoxb-your-slack-bot-token
# Jira Configuration
JIRA_URL=https://yourcompany.atlassian.net
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your_jira_api_token- Go to Notion Developers
- Create a new integration
- Copy the "Internal Integration Token" to your
.envfile asNOTION_API_KEY - Share your Notion pages/databases with the integration
- (Optional) Copy a database ID for
NOTION_DATABASE_ID
- Go to Slack API
- Create a new Slack app
- Go to "OAuth & Permissions" and add these Bot Token Scopes:
channels:historychannels:readchat:writeusers:readreactions:readreactions:write
- Install the app to your workspace
- Copy the "Bot User OAuth Token" to your
.envfile asSLACK_BOT_TOKEN
- Go to your Jira instance β Account Settings β Security
- Create an API token
- Add your Jira URL, email, and API token to the
.envfile
python your_script_name.pyThe server will start on:
- Flask API:
http://localhost:3000 - MCP Server:
http://localhost:3030
GET /mcp/tools- List available toolsPOST /mcp/configure- Configure API credentials dynamicallyPOST /mcp/tool/<tool_name>- Execute specific tool functions
POST /mcp/configure
{
"configuration": {
"notion": {
"apiKey": "secret_xyz...",
"databaseId": "abc123..."
},
"slack": {
"botToken": "xoxb-..."
},
"jira": {
"url": "https://company.atlassian.net",
"email": "user@company.com",
"apiToken": "api_token_here"
}
}
}| Tool | Description |
|---|---|
get_notion_databases |
List all accessible databases |
get_notion_data |
Fetch data from a database |
get_notion_page_data |
Get complete page data and content |
search_notion_pages |
Search across all Notion content |
update_notion_page |
Update page properties and content |
create_notion_page_in_database |
Create new database pages |
append_notion_page_content |
Add content blocks to pages |
create_notion_database |
Create new databases |
add_database_property |
Add properties to databases |
get_notion_comments |
Retrieve page comments |
create_notion_comment |
Add comments to pages |
archive_notion_page |
Archive or restore pages |
get_notion_users |
List workspace users |
| Tool | Description |
|---|---|
get_slack_channels |
List all channels |
send_slack_message |
Send messages to channels |
get_slack_messages |
Retrieve channel message history |
find_slack_messages |
Search messages by content |
get_slack_thread_replies |
Get thread conversations |
send_slack_thread_reply |
Reply to message threads |
get_slack_user_info |
Get user information |
get_slack_channel_members |
List channel members |
add_slack_reaction |
Add emoji reactions |
update_slack_message |
Edit existing messages |
delete_slack_message |
Delete messages |
find_messages_by_user |
Find messages from specific users |
find_recent_messages_with_keywords |
Search by keywords |
| Tool | Description |
|---|---|
get_jira_projects |
List all projects |
get_jira_issues |
Get issues by project or JQL |
get_jira_issue |
Get specific issue details |
create_jira_issue |
Create new issues |
update_jira_issue_comprehensive |
Update all issue properties |
delete_jira_issue |
Delete issues |
assign_jira_issue |
Assign issues to users |
add_jira_comment |
Add comments to issues |
get_jira_comments |
Retrieve issue comments |
transition_jira_issue |
Change issue status |
get_jira_transitions |
Get available status transitions |
search_jira_users |
Search for users |
get_jira_issue_types |
Get available issue types |
get_jira_project_statuses |
Get project status options |
get_jira_project_users |
Get project team members |
import requests
# Configure tools
config_response = requests.post('http://localhost:3000/mcp/configure', json={
"configuration": {
"notion": {"apiKey": "your_key", "databaseId": "your_db_id"},
"slack": {"botToken": "your_token"}
}
})
# Use a tool
tool_response = requests.post('http://localhost:3000/mcp/tool/get_notion_data', json={
"database_identifier": "Task Tracker",
"page_size": 100
})
print(tool_response.json())requests.post('http://localhost:3000/mcp/tool/create_notion_page_in_database', json={
"database_identifier": "Tasks",
"title": "New Task",
"properties": {
"Status": "In Progress",
"Priority": "High"
}
})requests.post('http://localhost:3000/mcp/tool/send_slack_message', json={
"channel_name": "general",
"text": "Hello from the integration!"
})The API returns standardized responses:
Success Response:
{
"success": true,
"data": { ... }
}Error Response:
{
"success": false,
"error": "Description of what went wrong"
}- Environment Variables: Never commit
.envfiles to version control - API Tokens: Regularly rotate your API tokens
- Permissions: Use principle of least privilege for API scopes
- HTTPS: Use HTTPS in production environments
- Rate Limits: Be mindful of API rate limits for each service
-
"Missing API key" errors
- Ensure
.envfile is in the correct location - Verify environment variable names match exactly
- Check that
python-dotenvis installed
- Ensure
-
Slack "channel not found" errors
- Verify channel name doesn't include '#' prefix
- Ensure bot has been added to the channel
- Check bot permissions include required scopes
-
Notion "database not found" errors
- Verify database has been shared with your integration
- Check database ID is correct
- Ensure you have the right permissions
-
Jira authentication errors
- Verify API token is valid and not expired
- Check email address matches your Jira account
- Ensure Jira URL format is correct
To enable more detailed logging, modify the Flask app startup:
app.run(host="0.0.0.0", port=3000, debug=True)