How to Use the Dev.to (Forem) MCP in Mastra AI
Build resilient content automation workflows for Dev.to using Mastra AI's TypeScript-native agent framework.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Dev.to (Forem) MCP to Mastra AI
Create your Vinkius account to connect Dev.to (Forem) to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Create Unbreakable Content Pipelines
This isn't just about posting an article. It's about building a workflow that survives errors. With Mastra AI, you can chain Dev.to tools with conditional logic. For instance, try to `create_article`, and if it fails because the slug already exists, have the workflow automatically pivot to using `update_article` on the existing post. This MCP server gives your agent the basic operations. Mastra AI provides the intelligence to connect them. You can build a multi-step process: `list_my_articles` to check for duplicates, then `create_article` to post, and finally, notify a Slack channel. Automatic retries are built-in, so temporary network issues won't kill your entire run.
Human-in-the-Loop Content Moderation
Don't give an agent the keys to the kingdom without oversight. Mastra AI's `requireToolApproval` feature is a perfect match for this MCP server. You can build a workflow where an agent drafts a post using `create_article`, but it pauses for human approval before actually publishing. This is critical for actions like `update_article` or `unpublish_article`. The agent can flag an article for review based on some logic, but a human gets the final say. It's the right way to automate without risking accidental deletion or publication of sensitive drafts.
Automated Content Auditing and Reporting
Use Mastra AI to build scheduled jobs that audit your Dev.to presence. A workflow could run daily, use `list_org_articles` to get all posts, then loop through each one with `get_article_by_id` to check for broken links or outdated information. You can also track your team's activity. A weekly workflow could use `list_org_users` to get the current member list and then `list_my_articles` for each user to generate a report on who published what. It's set-and-forget reporting for your developer advocacy team.
Set up Dev.to (Forem) MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All Dev.to (Forem) tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "devto-forem-mcp-client",
servers: {
"devto-forem-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Dev.to (Forem) Agent",
model: openai("gpt-4o"),
instructions: "You have access to Dev.to (Forem) tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Dev.to (Forem) transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Dev.to (Forem). All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Dev.to (Forem) MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Dev.to (Forem) MCP today
We host it, we monitor it, we maintain it. You just paste one token.