Skip to main content
Glama
VshlK

MCP Dev.to + LinkedIn Integration

by VshlK

MCP Dev.to + LinkedIn Integration

Simple MCPs (Model Context Protocol) for automating posts to Dev.to (Forem) and LinkedIn via command-line, cron jobs, or Copilot sessions.

Features

  • 📝 Post articles to Dev.to (Forem API v1)

  • 💬 Read comments from Dev.to articles

  • 🔗 Share posts on LinkedIn (UGC API)

  • ⚙️ Works with cron jobs and Copilot sessions

  • 🐍 Node.js & Python scripts

Related MCP server: Dev Blog MCP Server

Setup

1. Clone & Install

git clone https://github.com/YOUR_USERNAME/mcp-devto-linkedin.git
cd mcp-devto-linkedin

# Node setup
npm install

# Python setup
pip install -r requirements.txt

2. Get API Keys & Tokens

Dev.to (Forem)

  1. Go to https://dev.to/settings/account

  2. Scroll to "DEV Community API Keys"

  3. Generate and copy your API key

LinkedIn

  1. Go to https://www.linkedin.com/developers/apps

  2. Create or select your app

  3. Under "Auth", copy your Access Token

  4. Get your Person URN (typically shown in your profile or auth response as urn:li:person:XXXXXXXXX)

3. Configure .env

cp .env.example .env

Edit .env and add your credentials:

FOREM_API_KEY=your_devto_api_key
LINKEDIN_ACCESS_TOKEN=your_linkedin_access_token
LINKEDIN_PERSON_URN=urn:li:person:YOUR_ID

Usage

Node.js

Post to Dev.to:

node scripts/forem-post.js --title "My Article" --body "# Hello\nContent here" --tags "javascript,mcp"

Read Dev.to comments:

node scripts/forem-read-comments.js --article-id 12345

Post to LinkedIn:

node scripts/linkedin-post.js --text "Check out my new article!" --visibility PUBLIC

Python

Post to Dev.to:

python scripts/forem_post.py --title "My Article" --body "# Hello\nContent" --tags "python,api"

Read Dev.to comments:

python scripts/forem_read_comments.py --article-id 12345

Post to LinkedIn:

python scripts/linkedin_post.py --text "Great article published!" --visibility PUBLIC

Cron Job Examples

Daily post to Dev.to

0 9 * * * cd /path/to/mcp-devto-linkedin && node scripts/forem-post.js --title "Daily Update $(date +\%Y-\%m-\%d)" --body "Today's updates..." --tags "daily,update"

Weekly LinkedIn share

0 10 * * MON cd /path/to/mcp-devto-linkedin && python scripts/linkedin_post.py --text "Happy Monday! Sharing insights..." --visibility PUBLIC

Copilot Integration

Use these scripts in Copilot sessions by referencing environment variables and scripts:

export FOREM_API_KEY="..."
export LINKEDIN_ACCESS_TOKEN="..."
export LINKEDIN_PERSON_URN="..."

node /path/to/mcp-devto-linkedin/scripts/forem-post.js --title "..." --body "..."

API Documentation

License

MIT

Related MCP Connectors

Related MCP Servers