Dev.to MCP Server

by rawveg

Not rated
GitHub

About

An MCP server for the Dev.to API to search, browse, read, and create content on the platform.

Details

Author
rawveg
Categories
Developer Tools, Other, API

Setup

Install Dev.to MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/rawveg/devtomcp

Follow the installation instructions in the repository README, then restart your MCP client.

An MCP server for the Dev.to API to search, browse, read, and create content on the platform.

An implementation of a Model Context Protocol (MCP) server for the Dev.to API, providing capabilities for searching, browsing, reading, and creating content on Dev.to.

Note:Analyze tools provide natural language summaries and insights, not raw data dumps.

This project is licensed under theGNU Affero General Public License v3.0 (AGPLv3).

If you want to use or deploy this code in any form as a monetised service to others, even if you don't specifically require payment for the code, you need to contact me for permission (this meansYOUSmithery/Glama or ANY similar services) - which will only be granted following payment of the appropriate licensing fee. No, you might not be charging for the use of the code itself, and you might be providing the infrastructure, but you'd be usingMYcode to facilitateYOURservice. That's an intrinsic dependency thatMUSTbe licensed.

For anyone else, whether you're a business or individual, I hope it's of use to you. Enjoy.

The server can be configured using the following environment variables:

Each client needs to provide their own Dev.to API key for authenticated operations. This is done securely by providing the API key as an environment variable in the client's MCP server configuration.

Note:The key should be provided asDEVTO_API_KEYin the environment section of your MCP client configuration.

git clone https://github.com/rawveg/devtomcp.git cd devtomcp

The server will be available athttp://localhost:8000with the SSE endpoint athttp://localhost:8000/sse.

- analyse_article- Analyse a specific article
- analyse_user_profile- Analyse a specific user

- browse_latest_articles()- Get the most recent articles from Dev.to
- browse_popular_articles()- Get the most popular articles
- browse_articles_by_tag(tag)- Get articles with a specific tag

- get_article(id)- Get detailed information about a specific article
- get_user_profile(username)- Get information about a Dev.to user

- search_articles(query, page=1)- Search for articles using keywords
- search_articles_by_user(username, page=1)- Search all articles by a specific user

Managing Content (requires authentication)

- list_my_articles(page=1, per_page=30)- List your own published articles
- list_my_draft_articles(page=1, per_page=30)- List your own draft articles
- list_my_unpublished_articles(page=1, per_page=30)- List your own unpublished articles
- create_article(title, content, tags="", published=False)- Create a new article
- update_article(id, title=None, content=None, tags=None, published=None)- Update an existing article
- delete_article(id)- Delete an existing article
- publish_article_by_id(id)- Publish your own articles by ID
- publish_article_by_title(title)- Publish your own articles by title
- unpublish_article_by_id(id)- Unpublish your own articles by ID
- unpublish_article_by_title(title)- Unpublish your own articles by title
- update_article_by_title(title, new_title=None, content=None, tags=None, published=None)- Update an existing article by title (resolves to ID)

The Dev.to MCP Server now supportsdual-mode operation:

SERVER_MODE=sse # For SSE/MCP (default) # or SERVER_MODE=rest # For REST API & OpenAPI toolserver

- Provide your Dev.to API key in theAuthorizationheader as a Bearer token:

Authorization: Bearer YOUR_DEVTO_API_KEY

- Interactive docs:http://localhost:8000/docs
- OpenAPI schema:
http://localhost:8000/openapi.json
- Fully compatible with OpenAI's function calling, LangChain, and other OpenAPI tool runners.

curl -X GET "http://localhost:8000/list_my_articles?page=1&per_page=30&max_pages=10" \ -H "Authorization: Bearer YOUR_DEVTO_API_KEY"

- All major tools are available as REST endpoints (see/docsfor details)
- Each endpoint includes rich OpenAPI metadata, examples, and tags for easy discovery
- update_article_by_title- Update your own articles by title (resolves to ID)

- Use as a traditional REST API, an OpenAPI toolserver, or an LLM/agent tool provider—all from one codebase!
- Plug-and-play with OpenAI, LangChain, and any OpenAPI-compatible client
- Beautiful, interactive documentation out of the box

Add the MCP server in Claude Desktop'sconfig.json:

{ "mcpServers": { "devto": { "url": "http://localhost:8000/sse" } } }

Add the MCP server in Cursor's configuration:

{ "mcpServers": { "devto": { "url": "http://localhost:8000/sse" } } }

Some clients may require the use ofserverUrlinstead ofurl, eg: Windsurf IDE by Codium.

import asyncio import os from fastmcp.client import Client async def main(): # Set environment variable for authentication os.environ["DEVTO_API_KEY"] = "your_dev_to_api_key_here" # Connect to the MCP server client = Client("http://localhost:8000/sse") # Use the client async with client: # Get popular articles results = await client.call_tool("browse_popular_articles", {}) print(results) if __name__ == "__main__": asyncio.run(main())

-

Follow theGoogle Cloud Run Quickstartto set up your environment

gcloud secrets create devto-api-key --data-file=- <<< "your_api_key_here"

Deploy with the secret mounted in SSE mode:

gcloud run deploy devtomcp \ --source . \ --platform managed \ --allow-unauthenticated \ --region [REGION] \ --set-env-vars="LOG_LEVEL=<<LOG_LEVEL>>" \ --set-env-vars="DEVTO_API_KEY=<<DEVTO_API_KEY>>" \ --set-env-vars="SERVER_MODE=sse" \ --set-env-vars="DEVTO_API_BASE_URL=<<DEVTO_API_BASE_URL>>" \ --format="json"

These variables must be set on the command line for gcloud run deploy as the .env file is not mounted to the container.

Alternative deploy in REST mode with OpenAPI Tools:

gcloud run deploy devtomcp \ --source . \ --platform managed \ --allow-unauthenticated \ --region [REGION] \ --set-env-vars="LOG_LEVEL=<<LOG_LEVEL>>" \ --set-env-vars="SERVER_MODE=rest" \ --set-env-vars="DEVTO_API_BASE_URL=<<DEVTO_API_BASE_URL>>" \ --format="json"

These variables must be set on the command line for gcloud run deploy as the .env file is not mounted to the container.

Region SelectionThe region should be selected according to the region of your associated project. A list of available regions can be foundhere.

-

The--allow-unauthenticatedflag makes your server publicly accessible

Since this is a single-user server with your API key, you MUST implement additional security measures:

- UseCloud Run Authentication
- Set up
Identity-Aware Proxy (IAP)
- Configure
VPC Service Controls
- Use
Ingress Controls

When deploying in REST mode (recommended for Cloud Run) the above security considerations don't apply, as each request to the server in this mode needs to be accomanied by an Authorization Bearer TokenAuthorization: Bearer <<your_dev_to_api_key_here>>immediately limiting destructive access.

SeeGCP_DEPLOYMENT.mdfor detailed security configuration instructions.

The server returns standard MCP error responses:

{ "status": "error", "message": "Error description", "code": 401 }

- 401: Authentication failed (missing or invalid API key)
- 404: Resource not found
- 422: Invalid parameters
- 500: Server error

- The server uses environment variables for API key configuration, providing proper security isolation
- Each client connection uses its own configured API key
- All API credential handling happens server-side
- Use HTTPS in production environments
- Use secure secret management for API keys in cloud deployments

Contributions are welcome! Please feel free to submit a Pull Request.

- Dev.to API Documentation
-
Model Context Protocol

For questions, suggestions, or support, please open an issue.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

CyberNative is an agent-native social network where humans and AI agents collaborate as first-class community members on Discourse.

Underground Cultural District MCP Server

23 free and paid tools for AI agents — UUID, JSON, Base64, hashing, JWT, regex plus 218+ digital goods from 22 shops at substratesymposium.com

Zernio is a social media scheduling platform that lets you manage and publish content across all major platforms from a single API

A MCP server for LinkedIn REST API v2 that enables AI assistants to create, list, and delete posts, manage events, upload images, comment, and react—featuring OAuth 2.0 with session persistence, local post history tracking, and multiple automated tests

Schedule Once. Post Everywhere. Via MCP, API, or dashboard.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

Manage and utilize website content within the DevHub CMS platform

Tool platform by IBM to build, test and deploy tools for any data source

Make your AI agent speak every language on the planet, using Lingo.dev Localization Engine.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.