Stop Using Fragile Chatbots: Build Standard MCP Agents with TypeScript
In 2026, we are drowning in AI chatbots. Every SaaS has a "Chat with our data" button. But if you're a developer or an agency building for clients, you've probably hit a wall: LLMs are trapped in their chat boxes. To ma
In 2026, we are drowning in AI chatbots. Every SaaS has a "Chat with our data" button. But if you're a developer or an agency building for clients, you've probably hit a wall: LLMs are trapped in their chat boxes.
To make an LLM actually do thingsβlike read a local file, trigger an API, or move a PDFβyou either rely on brittle Zapier workflows or spend weeks writing custom OpenAI function-calling code.
Thatβs why MCP (Model Context Protocol) and the Agent Plugins 1.0 ecosystem were born. Itβs the industry standard for giving models safe access to real tools.
Recently, I built an Agent Orchestratorβan open-source, personal software factory. It takes a natural language prompt and generates a fully compliant Agent Plugin (MCP + Skills). Today, Iβm pulling back the curtain on how it works and how you can use it to automate real business workflows.
The Architecture: Three Protocols, One Goal
Building an AI agent isn't just about prompting. A standard-compliant agent directory needs three things:
plugin.json: The Agent Plugins 1.0 manifest (metadata).
mcp.json: The Model Context Protocol configuration (tools).
SKILL.md: The Agent Skills instructions (workflows).
Here is the exact directory structure my tool generates:
text
agents/my-agent/
βββ plugin.json # Manifest
βββ mcp.json # Tools connection
βββ skills/my-agent/
βββ SKILL.md # Workflow instructions
The "Aha!" Moment: Solving the Windows MCP Bug
If you've tried running the official @modelcontextprotocol/server-filesystem on Windows, you know the pain.
Windows doesn't recognize npx as an executable in stdio transport. It expects a .cmd shim. The standard fix is wrapping it in cmd /c.
In my TypeScript Orchestrator, I built an automatic platform interceptor:
typescript
export function normalizeMcpConfigForPlatform(config: any) {
if (process.platform !== "win32") return config;
// Wrap npx/uvx for Windows compatibility
if (/^(npx|uvx|npm)$/i.test(config.command)) {
return {
command: "cmd",
args: ["/c", config.command, ...(config.args || [])]
};
}
return config;
}
Now, when the agent is created, the mcp.json is instantly ready for Claude Desktop or Cursor, even on Windows.
Enter the Web UI: Drag, Drop, Generate
CLI is great for power users, but to make this accessible, I built a sleek Web UI (React + Vite + Tailwind).
You type: "Organize PDFs in my downloads folder by project name."
The UI hits the backend API, parses the intent, and dynamically selects the filesystem MCP server. It also calculates the estimated token cost (using DeepSeek or GPT-4o) before you even run it.
Why This Matters for Businesses
If you are a freelance developer, you know clients don't pay for "AI." They pay for saved hours.
With a standardized MCP agent, you can now hand a client a folder. They double-click start.bat, and they have a local, secure AI assistant that manages their Excel sheets, categorizes their invoices, or drafts email repliesβwithout sending sensitive data to a cloud database.
What's Next?
The Agent Orchestrator is just the beginning. The true power of MCP lies in the ecosystem. We are moving from "Chat" to "Action."
Cost Control: The tool includes a BudgetGuardian that kills the agent if API costs exceed $0.50.
Security: Every destructive file operation requires explicit user confirmation.
Want to build your own automated agent?
I'm currently helping small businesses integrate MCP workflows to cut their operational costs.
Want to see how this works or need a custom automation solution for your business?
I help small businesses save hours of manual work by integrating local MCP agents.
π Let's discuss your project: Email me
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.