How I Built a Production MCP Server with Kiro IDE
TL;DR: I built FeedMob AdPilot, a production-ready MCP server with 6 AI-powered tools, interactive UI components, and PostgreSQL persistence using Kiro IDE. This is the story of how Specs, Steering Docs, Agent Hooks, and MCP integration transformed my development workflow.
π― The Challenge
Creating effective advertising campaigns requires expertise across multiple domainsβunderstanding audiences, crafting copy, designing visuals, and optimizing for platforms. I wanted to build an AI system that could handle this entire workflow conversationally.
The technical challenge? Stitching together technologies that weren't designed to work together:
- FastMCP for the MCP server
- @mcp-ui/server for interactive components
- Claude Agent SDK for AI processing
- PostgreSQL for data persistence
- Next.js for the client UI
ποΈ What I Built
FeedMob AdPilot transforms natural language campaign descriptions into complete advertising assets:
- Parse Requirements β Extract campaign parameters from conversation
- Conduct Research β Generate comprehensive market reports
- Generate Copy β Create platform-optimized variations
- Generate Images β Produce visual concepts
- Create Mixed Media β Combine assets into final creatives
- Campaign Management β Store everything in PostgreSQL
Live Demo: https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/
π¨ The Kiro Difference
Spec-Driven Development (10 Features)
I created formal specifications with three documents each:
.kiro/specs/generate-ad-copy/
βββ requirements.md # User stories + acceptance criteria
βββ design.md # Architecture + correctness properties
βββ tasks.md # Implementation checklist
Impact: Every line of code traces back to a requirement. Zero missed edge cases.
Steering Documents (7 Persistent Contexts)
I taught Kiro once through always-included docs:
-
tech.md- Technology stack and commands -
fastmcp-integration.md- FastMCP patterns -
mcp-ui-integration.md- UI component creation -
agent-tool-patterns.md- Claude SDK integration -
claude-agent-skills.md- Agent skill development -
color-guidelines.md- Design system
Impact: Saved 8+ hours of repetitive context across 100+ conversations.
Agent Hooks (4 Automated Workflows)
{
"name": "Security Pre-Commit Scanner",
"when": { "type": "fileEdited", "patterns": ["**/*"] },
"then": {
"type": "askAgent",
"prompt": "Scan for API keys, tokens, credentials..."
}
}
Hooks I automated:
- Security scanning on every file edit
- MCP-UI docs checker for API changes
- MCP builder guidance for server files
- Agent skill builder for new tools
Impact: Prevented 3+ major bugs before they reached production.
MCP Integration (6 Servers)
Extended Kiro with specialized capabilities:
- mcp-ui-docs - Always-current mcp-ui documentation
- agent-skills - Skill creator and MCP builder
- context7 - Instant library docs (FastMCP, Zod)
- exa - Code examples and patterns
- fetch - External documentation
- sequential-thinking - Complex problem decomposition
Impact: The mcp-ui-docs server alone saved days of debugging outdated APIs.
π‘ The Most Impressive Moment
I told Kiro:
"Create a new MCP tool for generating ad images based on the pattern in #File src/tools/generate-ad-copy.ts"
Kiro generated in ONE response:
- β Complete Zod schema with validation
- β Agent service with Claude SDK integration
- β UI factory with interactive components
- β Error handling with all edge cases
- β Proper FastMCP registration
It understood the entire project pattern from steering docsβno repeated explanations needed.
π The Frankenstein Architecture
This project is a Frankenstein's monster in the best wayβincompatible technologies brought to life:
βββββββββββββββββββββββββββββββββββββββββββ
β MCP Tools (FastMCP) β
β - parseAdRequirements β
β - conductAdResearch β
β - generateAdCopy β
β - generateAdImages β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββββββ
β Agent Services (Claude Agent SDK) β
β - 6 specialized agents β
β - Custom skill plugins β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββββββ
β UI Factories (mcp-ui) β
β - Interactive components β
β - Real-time updates β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββββββ
β Data Layer (PostgreSQL) β
β - Campaign persistence β
βββββββββββββββββββββββββββββββββββββββββββ
π§ Real Challenges I Faced
- Gateway Timeouts: Long-running AI operations hitting limits
- Tool Call Timeouts: Optimizing agent processing times
- Docker Dependencies: Image generation missing libraries
- Chatbot Compatibility: Existing mcp-ui clients didn't workβbuilt custom Next.js interface
- Agent Skill Design: Getting consistent JSON output from LLMs
Each challenge was solved through iterative fixes with Kiro's help.
π By The Numbers
- π― 6 MCP tools built and deployed
- π€ 6 agent services with custom skills
- π 10 formal specs with complete traceability
- π 7 steering docs for persistent context
- πͺ 4 agent hooks for automated workflows
- π 6 MCP servers integrated
- β±οΈ 6 days from concept to production
- π¬ 100+ conversations with Kiro
π What I Learned
1. Hybrid Vibe + Spec Wins
Spec Mode for complex features β Structure, traceability, testing
Vibe Mode for iterations β 10x faster bug fixes and adjustments
Neither alone is optimal. The combination is magic.
2. Steering Docs Are Superpowers
Teaching Kiro once vs. teaching it every conversation:
- Before: 5 minutes/conversation Γ 100 = 500 minutes wasted
- After: 0 minutes repetition = 8+ hours saved
3. MCP Integration Enables The Impossible
Without mcp-ui-docs, I would have:
- Manually searched documentation
- Used outdated API patterns
- Spent days debugging production issues
With it: Zero breaking changes, always-current APIs.
4. Hooks Catch Issues Early
The Security Pre-Commit Scanner found issues immediately, not in code review days later.
π What's Next
Immediate priorities:
- Fix gateway timeout issues
- Optimize agent processing times
- Complete Docker image generation setup
Future features:
- Video ad generation for TikTok/Reels
- A/B testing integration
- Multi-platform campaigns
- Real-time analytics
- Template library
π Final Thoughts
Kiro isn't just an AI coding assistant. It's a development environment where AI understands your project deeply and assists at every stageβfrom requirements to deployment.
The combination of:
- β Specs for structured planning
- β Steering for persistent context
- β Hooks for automation
- β MCP for extended capabilities
- β Vibe for natural iteration
...enabled me to build in 6 days what would have taken 2+ months traditionally.
This isn't incremental improvement. This is transformation.
π Links
- Live Demo: https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/
- GitHub: https://github.com/feed-mob/feedmob-adpilot-mcp
- MCP Server: https://b8ggscok0gkgw848444gcokw.coolify-dev-pa.tonob.net/mcp
Built for Kiroween 2025 π
What's your experience with AI-assisted development? Have you tried spec-driven development with AI? Drop your thoughts in the comments! π
Top comments (0)