DEV Community

Cover image for Introducing the dev.to MCP server
Nick Taylor
Nick Taylor Subscriber

Posted on • Edited on • Originally published at nickyt.co

Introducing the dev.to MCP server

If you've been wondering how to get your AI tools talking to dev.to's content without building yet another custom integration, I've got something that might interest you. I recently built a remote Model Context Protocol (MCP) server for dev.to that makes this whole thing a lot more straightforward.

Dev.to MCP Server

A remote Model Context Protocol (MCP) server for interacting with the dev.to public API without requiring authentication.

Features

This MCP server provides access to the following dev.to public API endpoints:

  • get_articles - Get articles from dev.to with optional filters (username, tag, state, pagination)
  • get_article - Get a specific article by ID or path
  • get_user - Get user information by ID or username
  • get_tags - Get popular tags from dev.to
  • get_comments - Get comments for a specific article
  • search_articles - Search articles using query parameters

Installation

npm install
npm run build
Enter fullscreen mode Exit fullscreen mode

Usage

The server runs as a remote HTTP server on port 3000 (or the PORT environment variable) and can be used with any MCP-compatible client.

npm start
Enter fullscreen mode Exit fullscreen mode

The server will be available at http://localhost:3000 for MCP connections.

Development

# Build the project
npm run build
# Watch mode for development
npm run dev

# Linting
npm run
Enter fullscreen mode Exit fullscreen mode

Why? Well, a couple of reasons. One, I used to work at Forem, so dev.to is near and dear to my heart. The other reason is because I've been doing a lot of work in the MCP space recently.

GitHub logo pomerium / mcp-app-demo

Demo application showcasing how to build and secure MCP servers and clients with Pomerium using contextual access policies.

Welcome to the Pomerium Chat, a minimal chat application for showcasing remote Model Context Protocol servers secured with Pomerium.

Discord Docker

quickstart.mp4

Pre-requisites

  1. Linux or MacOS host
  2. Docker and Docker Compose
  3. Your machine should have port 443 exposed to the internet so that it could acquire TLS certificates from LetsEncrypt and OpenAI could call your MCP server endpoints.
  4. OpenAI API Key

Quickstart

Pomerium MCP Client Demo Setup

Environment Variables

Create a .env-mcp-app-demo file in the root directory and add the following environment variables:

OPENAI_API_KEY=your_api_key_here
Enter fullscreen mode Exit fullscreen mode

Pomerium Config

Update pomerium-config.yaml and replace YOUR-DOMAIN with the subdomain you control. Create A DNS records for relevant hosts (or *.YOUR-DOMAIN).

By default, the access policy limits access to users with emails in YOUR-DOMAIN. See policy language reference if you need to adjust it.

Docker Compose

See docker-compose.yaml file in this repo.

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

It includes a demo SQLite server that requires a demo database, for example https://github.com/jpwhite3/northwind-SQLite3

What's MCP All About?

Let me back up a bit. The Model Context Protocol (MCP) is Anthropic's open standard for connecting AI models to external data sources.

MCP is like having a standardized way for any AI system to talk to external resources without reinventing the wheel every time. It's been dubbed "the USB-C for AI."

What dev-to-mcp Does

The dev-to-mcp server exposes dev.to's public API through six focused tools. Here's what you get:

Content Discovery:

  • get_articles - Filter by author, tag, popularity, publication state
  • search_articles - Full-text search across all of dev.to's content
  • get_tags - Access trending tags and topics

For example, ask to get the latest React articles

getting latest react articles using the dev.to mcp server in VS Code

Content Access:

  • get_article - Grab specific articles by ID or URL path
  • get_user - Pull author profiles and user info
  • get_comments - Read through article discussions and comment threads

Here I am asking for my articles:

In VS Code:

dev.to MCP server running in VS Code

In the Pomerium MCP app demo.

dev.to MCP server running in the Pomerium MCP app demo

In Goose:

dev.to MCP server running in Goose

Real-World Use Cases

Once your AI has direct access to dev.to's ecosystem, you can do things like:

  • Research the latest React patterns by pulling top articles tagged with "react"
  • Track specific authors' posting patterns and expertise areas
  • Analyze community discussions to understand developer sentiment on new technologies
  • Generate content recommendations based on trending topics and engagement

The possibilities get interesting when you start combining different searches and analyses.

Getting It Running

The setup is pretty straightforward:

npm install
npm run build  
npm start
Enter fullscreen mode Exit fullscreen mode

That's it. Your MCP server is now running on http://localhost:3000 and ready to serve up dev.to data. Use it in your favourite MCP client, like VS Code, Claude, Goose, etc.

For development, there's watch mode:

npm run dev
Enter fullscreen mode Exit fullscreen mode

And if you want to deploy it via Docker:

docker build -t dev-to-mcp .
docker run -p 3000:3000 dev-to-mcp
Enter fullscreen mode Exit fullscreen mode

However you run it, remember that the URL when you register it in an MCP client like VS Code will be e.g. http://localhost:3000/mcp

Under the Hood

The MCP server leverages the MCP TypeScript SDK and Vite for a clean, modern development experience and leverages the dev.to API for dev.to content.

GitHub logo modelcontextprotocol / typescript-sdk

The official TypeScript SDK for Model Context Protocol servers and clients

MCP TypeScript SDK NPM Version MIT licensed

Table of Contents

Overview

The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This TypeScript SDK implements the full MCP specification, making it easy to:

  • Build MCP clients that can connect to any MCP server
  • Create MCP servers that expose resources, prompts and tools
  • Use standard transports like stdio and Streamable HTTP
  • Handle all MCP protocol messages and lifecycle events

Installation

npm install @modelcontextprotocol/sdk
Enter fullscreen mode Exit fullscreen mode

⚠️ MCP requires Node.js v18.x or higher to work fine.

Quick Start

Let's create a simple MCP server that exposes…




What's Next

This is meant to be for the dev.to public API server. You have access to additional endpoints with a dev.to API key as well, but for the initial release, I omitted that to keep things simple.

It'd be neat if you could register an OAuth app to avoid API keys altogether. That way, it could be deployed with the additional user-specific endpoints without requiring an API key which is only works for the editable content of the owner of the API key if accessing the additional endpoints.

@ben, if you want to host it officially, I think that'd be awesome, and I'd also be happy to move it to the forem org if there's interest.

For those interested in trying it out if you don't feel like deploying it yourself, it's available at https://devto.mcp.maisonlab.dev. If you try to use it, you'll be denied, so if you're OK with sending me your email address, I can add you to the Pomerium policy to give you access.

That's it! Check out the repo and give it a star if you find it useful. 😎

If you want to stay in touch, all my socials are on nickyt.online.

Photo by Gerard Siderius on Unsplash

Top comments (27)

Collapse
 
ben profile image
Ben Halpern

Very interesting stuff!

@ben, if you want to host it officially, I think that'd be awesome, and I'd also be happy to move it to the forem org if there's interest.

Will give a deep dive asap and give you an answer

Collapse
 
nickytonline profile image
Nick Taylor

Hot Rod saying Cool beans!

Collapse
 
fm profile image
Fayaz

Cool!

I too recently experimented with an mcp server implementation with dev.to API.
But I only did it with contest submissions!

Looks like you went full on with it. Super!

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
extinctsion profile image
Aditya • Edited

Hi, your dev MCP server is awesome. I have also made MCP tools for dev.to. check it out- github.com/extinctsion/mcp-py-devto

And yes it would be awesome if we can Collab and make official dev.to MCP server under forem. @ben

Collapse
 
nickytonline profile image
Nick Taylor

Glad you like it!

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
nickytonline profile image
Nick Taylor

Initializing the sessions varies depending on your MCP client, e.g. VS Code, Goose, Claude etc.

not sure what you mean by sub requests. The MCP Client with the LLM will decide if it needs to call the tools in the dev.to MCP server.

Feel free to open an issue.

For example you can ask for the latest react articles. Notice how with the natural language, it knows to call the get_articles tool with the tag "react"

getting latest react articles using the dev.to mcp server in VS Code

Collapse
 
aman_shukla_29 profile image
Aman Shukla • Edited

What is a MCP server in easy words ?

Collapse
 
rooted profile image
Rooted

MCP stands for Most Compromised Protocol

Collapse
 
nickytonline profile image
Nick Taylor

Not if you secure it properly. 👀

Collapse
 
nickytonline profile image
Nick Taylor

It’s mentioned in the blog post, but you can read more about it here, modelcontextprotocol.io/docs/getti...

Collapse
 
futuritous profile image
Futuritous

Lovely!

Will give it a try for sure.

Collapse
 
nickytonline profile image
Nick Taylor

Multiple TV and movie characters giving a thumbs up

Collapse
 
devopsdaily profile image
DevOps Daily

This is cool!

Collapse
 
nickytonline profile image
Nick Taylor

Bobby Moynahan character from SNL saying awesome!

Collapse
 
siswoyo profile image
Siswoyo Siswoyo

This is really interesting! Thanks for sharing, I’m excited to try out the dev.to MCP server.

Collapse
 
nickytonline profile image
Nick Taylor

Thanks Siswoyo! Lemme know what you think once you've tried it out!

Hackerman from Kung Fury putting on a Nintendo Power glove

Collapse
 
manisshh profile image
Maxx

cool stuff !!

Collapse
 
nickytonline profile image
Nick Taylor

Awesome!

Hackerman from Kung Fury putting on a Nintendo Power glove

Collapse
 
nancy21 profile image
Nancy

Nice

Some comments may only be visible to logged-in visitors. Sign in to view all comments.