Notion MCP Task Orchestrator

Notion MCP Task Orchestrator

Automates task execution from Notion across GitHub, Instagram, VS Code, and Telegram, running as an MCP server locally or as a Vercel cron job.

Category
访问服务器

README

🚀 Notion MCP Task Orchestrator

An automated, self-healing workflow orchestrator that reads tasks from your structured Notion database and executes them across GitHub, Instagram, and VS Code.

It can run locally as a Model Context Protocol (MCP) server with OpenCode, or in the cloud as a Vercel Serverless Function triggered by an automated Cron Job every 30 minutes.


🛠️ Architecture Options

Option 1: Vercel Cloud with Cron (Recommended for Cloud Tasks)

This executes GitHub and Instagram tasks automatically every 30 minutes in the background, without needing to keep a terminal window open. Note: VS Code tasks cannot be processed in the cloud because Vercel does not have access to your local machine.

Option 2: Local OpenCode (For Local & Cloud Tasks)

This runs the codebase as an MCP server. It handles all task types, including opening folders and executing commands inside your local VS Code application.


🚀 Step-by-Step Vercel Hosting & Cron Setup

  1. Deploy to Vercel:

    • Go to vercel.com and sign in.
    • Click Add NewProject.
    • Import your repository https://github.com/Shravan44s/MCP.
  2. Add Environment Variables: In your Vercel Project settings under Environment Variables, add the following:

    • NOTION_TOKEN — Your Notion integration token (ntn_...)
    • NOTION_DATABASE_ID — Your Notion task database ID (38eed919-4589-81b4-a6fe-d092d6efecf1)
    • GITHUB_TOKEN — Your GitHub Personal Access Token (ghp_...)
    • CRON_SECRET — A secure, secret password of your choice (e.g. my-super-secret-cron-key). Vercel uses this to authenticate the cron trigger.
  3. Deploy:

    • Click Deploy. Vercel will build the project and map the automated cron job using the configuration in vercel.json.

📸 Connecting Instagram

Instagram content publishing requires a Professional Business or Creator Account connected to a Facebook Page under the Meta Graph API structure.

Step 1: Account Preparation

  1. Open the Instagram app → Go to SettingsAccount type and tools → Switch to Professional Account (choose Business or Creator).
  2. Create a Facebook Page (if you don't have one).
  3. Connect your Instagram Professional Account to your Facebook Page (in Instagram Settings or Facebook Page Settings).

Step 2: Meta App Setup

  1. Go to the Meta for Developers Portal and register as a developer.
  2. Click Create App → Select OtherBusiness app type.
  3. Add the Instagram Graph API product to your app.

Step 3: Get Credentials

  1. Go to the Graph API Explorer tool.
  2. Request the following permissions:
    • instagram_basic
    • instagram_content_publish
    • instagram_manage_insights
    • pages_show_list
    • pages_read_engagement
  3. Generate a long-lived user access token.
  4. Query the API (GET /me/accounts) to get your connected Facebook page access tokens and select your Instagram Business Account ID.

Step 4: Configure ig-mcp on OpenCode

Once you have the credentials, add them to your opencode.jsonc file:

"ig-mcp": {
  "enabled": true,
  "type": "local",
  "command": ["uvx", "ig-mcp"],
  "environment": {
    "INSTAGRAM_ACCESS_TOKEN": "YOUR_LONG_LIVED_ACCESS_TOKEN",
    "INSTAGRAM_BUSINESS_ACCOUNT_ID": "YOUR_INSTAGRAM_BUSINESS_ACCOUNT_ID"
  }
}

✈️ Connecting Telegram

You can get instant notifications on your phone whenever a Notion task runs or execute custom Telegram notification tasks.

Step 1: Create a Bot

  1. Start a chat with @BotFather on Telegram.
  2. Send /newbot and follow the prompts to choose a name and username.
  3. Save the HTTP API Token (looks like 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).

Step 2: Get Your Chat ID

  1. Start a chat with @userinfobot on Telegram and send a message.
  2. It will reply with your Id (e.g. 987654321). This is your Chat ID.

Step 3: Configure Environment Variables

Add these to your local .env file or Vercel Environment Variables:

  • TELEGRAM_BOT_TOKEN — Your Bot token from Step 1
  • TELEGRAM_CHAT_ID — Your Chat ID from Step 2

Once set, the orchestrator will automatically notify your phone whenever any task is run in the background by Vercel! You can also target Telegram as a Platform in Notion, and it will forward the Task Name/Details to your Telegram.


📋 Notion Database Layout

The auto-generated database contains the following columns:

Column Type Description
Task Name Title The task description/title
Platform Select GitHub, Instagram, VSCode, General
Status Status Todo, In Progress, Done, Failed
Priority Select High, Medium, Low
GitHub Repo Text Repository target (owner/repo)
GitHub Action Select Create Repo, Create Issue, Create PR, Commit File, List Issues, Get Repo
VSCode Project Path Text File path to project directory
VSCode Command Text CLI command to execute
Details Text Multi-line specifications or description
Result Text Read-only output logs from the engine

推荐服务器

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 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
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 模型以安全和受控的方式获取实时的网络信息。

官方
精选