Skip to content

About

An agent-ready DEV.to publishing platform that combines MCP and WebMCP to help AI agents research technical topics, discover content gaps, create authenticated article drafts, and support periodic publishing—with semantic retrieval, evaluation, security controls, and human approval built into every workflow.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

DEV.to MCP Server

An MCP-first DEV.to agent publishing platform. It exposes public DEV.to discovery tools over Streamable HTTP and, when persistence is configured, mounts a versioned REST API and Angular dashboard for retrieval, drafting, approval-aware workflows, scheduling, audit history, and publishing.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Full local platform
  5. Development commands
  6. Docker
  7. Documentation map
  8. Roadmap
  9. Contributing
  10. License
  11. Contact
  12. Acknowledgments

About The Project

Project architecture

The adapters converge on one shared core. MCP and REST do not duplicate business policy; the workflow engine enforces approval, version/hash matching, leases, retries, audit records, and the rule that scheduling cannot publish.

Built With

  • Node.js 22+ and TypeScript
  • Express and the Model Context Protocol SDK
  • Prisma with PostgreSQL/pgvector, and Redis
  • Angular (dashboard)
  • Vite, Vitest, and Docker

Getting Started

The public MCP path does not require PostgreSQL, Redis, an API key, or a model provider. A clean checkout can be running in under a minute.

Prerequisites

  • Node.js 22 or newer
  • npm
  • Network access to https://dev.to

Installation

git clone https://github.com/owezzy-tech/dev-to-mcp.git
cd dev-to-mcp
npm ci
npm run dev

The development server listens on http://127.0.0.1:3535 by default. Verify it in another terminal:

curl http://127.0.0.1:3535/healthz
curl http://127.0.0.1:3535/mcp

To run the MCP server as a local container instead, use the mcp Compose service. It needs no database and restarts with Docker:

docker compose up -d --build mcp

Usage

Configure an MCP client with this Streamable HTTP URL:

http://127.0.0.1:3535/mcp

The public tools are:

  • get_articles
  • get_article
  • get_user
  • get_tags
  • get_comments
  • search_articles

DEV.to retired its public search endpoint, so search_articles queries the Algolia index behind the DEV.to site search, using the public search-only key published on https://dev.to/search. Results omit description.

See Connect an MCP client for the initialization/session contract and client configuration example.

Full local platform

Use the full stack when you need the REST API, dashboard, drafts, retrieval, workflow persistence, or pgvector integration.

1. Start PostgreSQL/pgvector and Redis

Docker Desktop (or another Docker Engine with Compose) is required.

docker compose -f compose.yml up -d
docker compose -f compose.yml ps

The Compose services bind to loopback only:

PostgreSQL: 127.0.0.1:5432
Redis:      127.0.0.1:6379

If either port is already in use, choose another host port:

POSTGRES_PORT=55432 REDIS_PORT=56379 docker compose -f compose.yml up -d

Use matching URLs in the environment below.

2. Configure the server

Create a local shell environment. Do not commit this file or real secrets.

export DATABASE_URL='postgresql://dev_to_mcp:dev_to_mcp_local@127.0.0.1:5432/dev_to_mcp'
export REDIS_URL='redis://127.0.0.1:6379'
export MCP_BEARER_TOKEN='replace-with-at-least-16-random-characters'

The MCP discovery path remains public. MCP_BEARER_TOKEN is reserved for authenticated deployments and must not be placed in browser code or an MCP client configuration unless the deployment explicitly requires it.

Apply the checked-in migrations and generate the Prisma client:

npm run prisma:migrate:deploy
npm run prisma:generate

3. Run the server and dashboard

Run the API in one terminal:

npm run dev

Build the Angular dashboard in another terminal:

cd dashboard
npm ci
npm start

For a production-style single process, build the dashboard and root server:

cd dashboard && npm ci && npm run build
cd ..
npm run build
npm start

The root server serves the dashboard bundle at / when dashboard/dist/dashboard/browser exists. The API is mounted at /v1 when DATABASE_URL is configured.

Useful probes:

curl http://127.0.0.1:3535/healthz
curl http://127.0.0.1:3535/readyz
curl http://127.0.0.1:3535/metrics

/readyz returns success only when DATABASE_URL is configured. Authenticated /v1 routes require a valid dashboard session; a local session/login UI is not currently included, so public MCP discovery is the simplest first verification.

Optional providers

The platform uses provider ports and falls back to null adapters when keys are absent. Configure only the capabilities you need:

export FOREM_API_KEY='...'                 # authenticated DEV.to writes
export EMBEDDING_API_KEY='...'             # hybrid retrieval vectors
export EMBEDDING_BASE_URL='https://api.openai.com'
export GENERATION_API_KEY='...'            # idea and draft generation
export GENERATION_BASE_URL='https://api.openai.com'
export TYPESAFE_API_KEY='...'              # Jev duplication/gap/safety judgments
export TYPESAFE_BASE_URL='https://api.typesafe.ai'

Provider keys are read only by the server. Never put them in dashboard/ or commit them to the repository.

Development commands

npm run dev                 # watch the TypeScript server
npm run build               # build the root server
npm run typecheck           # TypeScript validation
npm run lint                # ESLint
npm run format:check        # Prettier check
npm run test:ci             # root Vitest suite
npm run eval                # critical safety evaluations
npm run prisma:migrate:dev  # create a development migration

Dashboard commands run from dashboard/:

npm ci
npm start
npm run build
npm run test:ci

Docker

Build and run the server image with Compose (image dev-to-mcp:local, bound to 127.0.0.1:3535; set MCP_PORT to change the host port):

docker compose up -d --build mcp

Or with plain Docker:

docker build -t dev-to-mcp:local .
docker run -d --name dev-to-mcp -p 127.0.0.1:3535:3535 dev-to-mcp:local

The image contains the root server. It does not provision PostgreSQL or Redis; provide those services separately and pass DATABASE_URL/REDIS_URL when running the full platform.

Documentation map

Roadmap

Implemented:

  • Streamable HTTP MCP endpoint with public DEV.to discovery tools
  • Versioned REST API, Angular dashboard, and WebMCP adapter
  • Retrieval, drafting, approval-aware workflows, and scheduling
  • Critical evaluations, observability, and release gates

See the open issues and implementation plan for proposed features and known gaps.

Contributing

Contributions are welcome. Keep changes focused and add or update tests when behavior changes.

  1. Fork the project.
  2. Create a focused feature branch.
  3. Install dependencies with npm ci.
  4. Make the change and run the checks in Development commands.
  5. Open a pull request with the behavior affected and checks performed.

Read the full contributing guide before opening a pull request. Participation is governed by the Code of Conduct.

Top contributors:

contrib.rocks image

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Owen Adirah: @owezzy-tech

Project Link: https://github.com/owezzy-tech/dev-to-mcp

Acknowledgments

About

An agent-ready DEV.to publishing platform that combines MCP and WebMCP to help AI agents research technical topics, discover content gaps, create authenticated article drafts, and support periodic publishing—with semantic retrieval, evaluation, security controls, and human approval built into every workflow.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages