devto-mcp
# devto-mcp
An MCP (Model Context Protocol) server for managing a Dev.to account from Claude (or any
MCP-compatible client): browse articles, read your own drafts/published posts, create and edit
articles, and read comments. Uses Dev.to's official Forem API v1 with a personal API key — no
OAuth app, no approval process.
The original one-off `publish.js` CLI script is still here and still works if you just want to
publish a single article from the terminal without going through Claude.
## Setup
1. Clone the repo and install dependencies:
```
git clone https://github.com/AhmadTariq1337/devto-mcp.git
cd devto-mcp
npm install
```
2. Copy `.env.example` to `.env` and add your API key (get one from
[dev.to/settings/extensions](https://dev.to/settings/extensions)):
```
cp .env.example .env
```
3. Register it as an MCP server in your client's config. For Claude Desktop
(`claude_desktop_config.json`):
```json
"devto": {
"command": "node",
"args": ["/absolute/path/to/devto-mcp/index.js"]
}
```
4. Restart Claude Desktop (fully quit from the tray, not just close the window) so it picks up
the new server.
## Tools exposed
| Tool | Does |
|---|---|
| `devto_list_articles` | Browse the public feed (by tag, author, or top-of-period) |
| `devto_get_article` | Get one article's full content by id |
| `devto_get_my_articles` | List your own published/unpublished/all articles |
| `devto_get_profile` | Get your profile info |
| `devto_create_article` | Create a new article (draft or published) |
| `devto_update_article` | Edit an existing article you own |
| `devto_get_comments` | Get an article's threaded comments |
## Standalone CLI (no Claude needed)
Write an article as markdown in `articles/`, then:
```
node publish.js "Your Article Title" articles/your-article.md tag1,tag2,tag3
```
Saves as a **draft** by default. Preview at https://dev.to/dashboard, then re-run with
`--publish` added to make it live. (`npm run publish-article -- "Title" articles/file.md` works
the same way.)
## Security
- `.env` holds your real API key and is gitignored — never commit it.
- Drafts are private until explicitly published, so it's safe to experiment freely with
`devto_create_article`.
## License
MIT
TDQS
Scored across 7 tools
Each tool targets a distinct resource and action: browsing the public feed, fetching a single article, listing personal articles, getting profile info, creating, updating, and fetching comments. The descriptions clearly separate the public vs. authenticated scopes, so no ambiguity exists.
All tool names follow a consistent `devto_verb_noun` pattern in snake_case, with verbs like list, get, create, update. This makes the set predictable and easy to navigate.
Seven tools is well-scoped for a Dev.to server covering article retrieval, management, profile, and comments. Each tool has a clear purpose, and the count is neither sparse nor bloated.
The set covers the core article lifecycle (create, read, update, list) and comments, plus profile access. The only notable gap is a missing delete operation for articles, which agents might need for full content management but can work around.