DevTo Agent
About
Build and deploy an autonomous Devto Agent capable of interacting with the Dev.to platform, powered by A2A (Agent-to-Agent) and MCP (Model Context Protocol)
Details
- Author
- HeetVekariya
- Downloads
- 279
- Categories
- AI
Jump to
- Fetch and manage DevTo articles by tags or authors
- Generate and post markdown content to DevTo
- Retrieve user profiles and reading lists
- Manage article comments and followers
- Supports both SSE and STDIO interfaces
Clone the repository, create a .env file with DEVTO_API_KEY and GOOGLE_API_KEY, then install dependencies with uv pip install -e .. Start the MCP server with uv run mcp_servers/sse/devto_server.py, launch the DevTo agent with uv run a2a_servers/agent_server/devto_agent.py, and optionally start the host agent with uv run a2a_servers/agent_server/host_agent.py. Run the client application with uv run main.py.
DevTo Agent
A comprehensive multi-agent system for interacting with Dev.to (DevTo) platform, built using Google ADK (Agent Development Kit) and Model Context Protocol (MCP). This project enables automated content creation, article management, and user profile interactions with DevTo through both Agent-to-Agent (A2A) communication and MCP server implementations.
You can find follow along blog here
Project Overview
This project implements a sophisticated agent architecture that can:
- Fetch and manage DevTo articles by tags or authors
- Generate and post markdown content to DevTo
- Retrieve user profiles and reading lists
- Manage article comments and followers
- Provide both SSE (Server-Sent Events) and STDIO interfaces for different integration needs
Table of Contents
- Architecture Overview
- Project Structure
- Component Details
- Setup and Installation
- API Reference
Architecture Overview
The project follows a modular architecture with three main communication patterns:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Client App │───▶│ A2A Server │───▶│ DevTo API │
│ (main.py) │ │ (devto_agent) │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ ▲
│ ▼ │
│ ┌─────────────────┐ │
└─────────────▶│ MCP Server │──────────────┘
│ (SSE/STDIO) │
└─────────────────┘
Key Components:
1. A2A Agent Server: High-level agent interface using Google ADK
2. MCP Servers: Low-level tool interface using Model Context Protocol
3. DevTo Service: Direct API integration with Dev.to
4. Tool Connectors: Bridge between agents and MCP servers
Project Structure
devto-agent/
├── a2a_servers/ # Agent-to-Agent server implementations
│ ├── agent_server/ # Individual agent definitions
│ │ ├── devto_agent.py # Main DevTo agent server
│ │ ├── host_agent.py # Host agent coordinator
│ │ └── utils.py # Agent utilities
│ ├── agents/ # Agent base classes and implementations
│ │ ├── adk_agent.py # Google ADK agent wrapper
│ │ └── utils/ # Agent utilities
│ └── common/ # Shared components
│ ├── client/ # A2A client implementations
│ ├── server/ # A2A server implementations
│ └── types.py # Common type definitions
├── connector/ # Tool connectors
│ └── tools/
│ └── devto_tools.py # DevTo MCP tool connector
├── mcp_servers/ # Model Context Protocol servers
│ ├── sse/ # Server-Sent Events implementation
│ │ └── devto_server.py # SSE-based MCP server
│ └── stdio/ # Standard I/O implementation
│ └── devto_server.py # STDIO-based MCP server
├── services/ # Core business logic
│ └── devto_service.py # DevTo API service wrapper
├── test/ # Test files
├── main.py # Main client application
└── pyproject.toml # Project dependencies
Component Details
1. A2A Servers (a2a_servers/)
Purpose: Implements high-level agent interfaces using Google ADK framework.
Key Files:
-devto_agent.py: Main DevTo agent that handles:
- Content generation for DevTo articles
- Article fetching and management
- User profile operations
- Article posting with markdown support
- host_agent.py: Coordinator agent that can manage multiple sub-agents
- adk_agent.py: Wrapper class that integrates Google ADK with MCP tools
2. MCP Servers (mcp_servers/)
Purpose: Provides low-level tool interfaces using Model Context Protocol.
SSE Implementation (sse/devto_server.py):
```pythonSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
