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
Visit Server

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured