Dev.to Blog Publisher MCP Server
Enables publishing blog posts directly to Dev.to through the Dev.to API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dev.to Blog Publisher MCP Server publish my latest article about AI trends to Dev.to"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 Dev.to Model Context Protocol (MCP) Server
A production-ready Model Context Protocol (MCP) server built in Python using FastMCP. It exposes Dev.to publishing capabilities as native, schema-validated tools directly invocable by agentic LLMs and IDE assistants such as Claude Desktop, Cursor, and other MCP-compliant agents.
📐 Architecture & Interaction Flow
The server establishes a secure stdio (standard input/output) channel using JSON-RPC 2.0. Rather than making manual API calls, your AI agent autonomously binds parameters to the tool schema and executes the publish command natively.
sequenceDiagram
autonumber
actor Developer
participant Agent as Claude Desktop / Cursor (MCP Client)
participant MCP as Python FastMCP Server (stdio)
participant DevTo as Dev.to REST Gateway
Developer->>Agent: "Draft and publish an article on Snowflake ETL"
Agent->>Agent: Read schema for `publish_blog_to_devto`
Agent->>MCP: JSON-RPC Call: `publish_blog_to_devto(title, body, tags, published=False)`
MCP->>MCP: Validate API key & payload format
MCP->>DevTo: POST https://dev.to/api/articles (Headers: api-key)
DevTo-->>MCP: HTTP 201 Created (JSON Response with Article URL)
MCP-->>Agent: "Article published successfully! URL: https://dev.to/..."
Agent-->>Developer: Confirmation with live article URLRelated MCP server: Dev Blog MCP Server
✨ Features & Capabilities
Native Tool Integration: Exposes
publish_blog_to_devtowith strict parameter validation.Drafts or Live Publishing: Seamlessly switch between publishing immediate live articles or drafting articles (
published: bool = False) for manual review on Dev.to.Metadata & Canonical URLs: Built-in support for article tags, series identifiers, custom cover images, and canonical URL cross-posting.
High-Performance Transport: Uses standard I/O (
stdio) to avoid port collisions and firewall restrictions on local development machines.Blazing Fast Virtual Environment: Managed with Astral's
uvpackage manager for sub-second environment initialization and dependency resolution.
🛠️ Tool Schema Reference
publish_blog_to_devto
Parameter | Type | Required | Description |
|
| Yes | The headline or title of the blog post. |
|
| Yes | Full article content written in Markdown format. |
|
| No | List of up to 4 tags (e.g. |
|
| No |
|
|
| No | Name of the series to group the post into. |
|
| No | Original article URL if cross-posting from an external blog. |
|
| No | Direct image URL to display as the article's hero banner. |
🚀 Quickstart Guide
1. Prerequisites
Python 3.10+
Astral
uv(Python package installer):curl -LsSf https://astral.sh/uv/install.sh | shDev.to API Key: Generate your key at dev.to/settings/extensions under DEV Community API Keys.
2. Installation & Setup
Clone the repository:
git clone https://github.com/Kiruthick7/mcp.git cd mcpCreate and activate a virtual environment with
uv:uv venv source .venv/bin/activateInstall dependencies:
uv syncConfigure environment variables:
cp .env.template .envAdd your Dev.to API key in
.env:DEVTO_API_KEY=your_devto_api_key_here
🔌 Connecting to MCP Clients
A. Claude Desktop Integration
Edit your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the devto-publisher server block:
{
"mcpServers": {
"devto-publisher": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/mcp",
"run",
"dev-server.py"
],
"env": {
"DEVTO_API_KEY": "your_devto_api_key_here"
}
}
}
}Note: Replace
/ABSOLUTE/PATH/TO/mcpwith your actual repository path (runpwdinside the repository).
Restart Claude Desktop, and you will see the hammer 🔨 tool icon showing publish_blog_to_devto ready to use!
B. Testing with the MCP Inspector
You can interactively test and debug your MCP server using the official Anthropic MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory $(pwd) run dev-server.pyThis launches a local web UI at http://localhost:5173 where you can inspect schemas, send test payloads, and verify Dev.to API responses.
🔒 Security & Best Practices
Token Isolation: Never hardcode API keys. Keys are passed via local
.envor client environment parameters.Local Stdio Sandboxing: Because execution uses
stdio, no external HTTP ports are exposed on your host machine.Safe Draft Defaults: By default,
published: falseprevents accidental live publication until content is reviewed in Dev.to drafts.
📄 License
This project is licensed under the MIT License.
Available Tools
1 toolpublish_blog_to_devtoA
Publishes a blog post to dev.to.
Args:
title (str): The title of the blog post.
body_markdown (str): The content of the blog post in Markdown format.
tags (Optional[List[str]]): A list of tags for the blog post (e.g., ["python", "webdev"]).
published (bool): Set to True to publish immediately, False to save as a draft.
series (Optional[str]): The name of the series this article belongs to.
canonical_url (Optional[str]): The canonical URL of the article if it's cross-posted.
cover_image (Optional[str]): URL of the cover image for the article.
Returns:
str: A message indicating the success or failure of the publishing operation,
including the article URL if successful.
Inputs: title (required), body_markdown (required), tags, series, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is nothing for an agent to confuse it with. Its purpose is stated explicitly and the parameters map cleanly to the publishing action.
The single name publish_blog_to_devto follows a clear verb_noun_target snake_case convention. Even with one tool, the pattern is predictable and readable.
One tool is a very thin surface, but it does match the narrow 'publisher' framing of the server. It sits at the borderline where a couple more operations would make the server genuinely useful.
The surface only covers creation — there is no way to list, fetch, update, or delete published articles or drafts. An agent that needs to fix a typo in a live post or verify a draft's state hits a dead end.
Maintenance
Related MCP Connectors
Publish blog posts, send newsletters and emails from Claude, Claude Code, Codex and ChatGPT.
Publish articles and notes under your own byline, to a readership of other AI agents.
Publish AI-generated HTML & Markdown to a hosted, shareable URL via MCP.
Publish and share access-controlled Markdown documents from any MCP-enabled AI tool.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Hashnode's tools and services through a unified API using the Model Context Protocol.1MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to publish blog posts directly to Dev.to via the Model Context Protocol.11-
- FlicenseNot gradedqualityDmaintenanceProvides MCP tools to interact with Dev.to, enabling searching, browsing, and publishing articles through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Dev.to platform through MCP tools, including article search, retrieval, and creation.-