<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Emma Xiang</title>
    <description>The latest articles on Forem by Emma Xiang (@emma_xiang_b31d38bb40b2c2).</description>
    <link>https://forem.com/emma_xiang_b31d38bb40b2c2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3646844%2F77b64f5d-383b-46d2-ae6c-b7f5539f2c1e.png</url>
      <title>Forem: Emma Xiang</title>
      <link>https://forem.com/emma_xiang_b31d38bb40b2c2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/emma_xiang_b31d38bb40b2c2"/>
    <language>en</language>
    <item>
      <title>How I Built a Production MCP Server with Kiro</title>
      <dc:creator>Emma Xiang</dc:creator>
      <pubDate>Thu, 04 Dec 2025 17:16:13 +0000</pubDate>
      <link>https://forem.com/emma_xiang_b31d38bb40b2c2/how-i-built-a-production-mcp-server-with-kiro-5909</link>
      <guid>https://forem.com/emma_xiang_b31d38bb40b2c2/how-i-built-a-production-mcp-server-with-kiro-5909</guid>
      <description>&lt;h1&gt;
  
  
  How I Built a Production MCP Server with Kiro IDE
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: I built &lt;a href="https://github.com/feed-mob/feedmob-adpilot-mcp" rel="noopener noreferrer"&gt;FeedMob AdPilot&lt;/a&gt;, 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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🎯 The Challenge
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The technical challenge? Stitching together technologies that weren't designed to work together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FastMCP&lt;/strong&gt; for the MCP server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@mcp-ui/server&lt;/strong&gt; for interactive components&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Agent SDK&lt;/strong&gt; for AI processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL&lt;/strong&gt; for data persistence&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js&lt;/strong&gt; for the client UI&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏗️ What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;FeedMob AdPilot&lt;/strong&gt; transforms natural language campaign descriptions into complete advertising assets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Parse Requirements&lt;/strong&gt; → Extract campaign parameters from conversation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conduct Research&lt;/strong&gt; → Generate comprehensive market reports&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate Copy&lt;/strong&gt; → Create platform-optimized variations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate Images&lt;/strong&gt; → Produce visual concepts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Mixed Media&lt;/strong&gt; → Combine assets into final creatives&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Campaign Management&lt;/strong&gt; → Store everything in PostgreSQL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Live Demo&lt;/strong&gt;: &lt;a href="https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/" rel="noopener noreferrer"&gt;https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎨 The Kiro Difference
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Spec-Driven Development (10 Features)
&lt;/h3&gt;

&lt;p&gt;I created formal specifications with three documents each:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.kiro/specs/generate-ad-copy/
├── requirements.md    # User stories + acceptance criteria
├── design.md          # Architecture + correctness properties
└── tasks.md           # Implementation checklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Every line of code traces back to a requirement. Zero missed edge cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steering Documents (7 Persistent Contexts)
&lt;/h3&gt;

&lt;p&gt;I taught Kiro once through always-included docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tech.md&lt;/code&gt; - Technology stack and commands&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fastmcp-integration.md&lt;/code&gt; - FastMCP patterns&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mcp-ui-integration.md&lt;/code&gt; - UI component creation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agent-tool-patterns.md&lt;/code&gt; - Claude SDK integration&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-agent-skills.md&lt;/code&gt; - Agent skill development&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;color-guidelines.md&lt;/code&gt; - Design system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Saved 8+ hours of repetitive context across 100+ conversations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agent Hooks (4 Automated Workflows)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Security Pre-Commit Scanner"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"when"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fileEdited"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"patterns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"**/*"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"then"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"askAgent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Scan for API keys, tokens, credentials..."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Hooks I automated&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Security scanning on every file edit&lt;/li&gt;
&lt;li&gt;MCP-UI docs checker for API changes&lt;/li&gt;
&lt;li&gt;MCP builder guidance for server files&lt;/li&gt;
&lt;li&gt;Agent skill builder for new tools&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Prevented 3+ major bugs before they reached production.&lt;/p&gt;

&lt;h3&gt;
  
  
  MCP Integration (6 Servers)
&lt;/h3&gt;

&lt;p&gt;Extended Kiro with specialized capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;mcp-ui-docs&lt;/strong&gt; - Always-current mcp-ui documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;agent-skills&lt;/strong&gt; - Skill creator and MCP builder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;context7&lt;/strong&gt; - Instant library docs (FastMCP, Zod)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;exa&lt;/strong&gt; - Code examples and patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;fetch&lt;/strong&gt; - External documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sequential-thinking&lt;/strong&gt; - Complex problem decomposition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: The mcp-ui-docs server alone saved days of debugging outdated APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 The Most Impressive Moment
&lt;/h2&gt;

&lt;p&gt;I told Kiro: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Create a new MCP tool for generating ad images based on the pattern in #File src/tools/generate-ad-copy.ts"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Kiro generated in &lt;strong&gt;ONE response&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Complete Zod schema with validation&lt;/li&gt;
&lt;li&gt;✅ Agent service with Claude SDK integration&lt;/li&gt;
&lt;li&gt;✅ UI factory with interactive components&lt;/li&gt;
&lt;li&gt;✅ Error handling with all edge cases&lt;/li&gt;
&lt;li&gt;✅ Proper FastMCP registration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It understood the entire project pattern from steering docs—no repeated explanations needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎭 The Frankenstein Architecture
&lt;/h2&gt;

&lt;p&gt;This project is a &lt;strong&gt;Frankenstein's monster&lt;/strong&gt; in the best way—incompatible technologies brought to life:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────┐
│  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                 │
└─────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🚧 Real Challenges I Faced
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gateway Timeouts&lt;/strong&gt;: Long-running AI operations hitting limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Call Timeouts&lt;/strong&gt;: Optimizing agent processing times&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Dependencies&lt;/strong&gt;: Image generation missing libraries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chatbot Compatibility&lt;/strong&gt;: Existing mcp-ui clients didn't work—built custom Next.js interface&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Skill Design&lt;/strong&gt;: Getting consistent JSON output from LLMs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each challenge was solved through iterative fixes with Kiro's help.&lt;/p&gt;

&lt;h2&gt;
  
  
  📊 By The Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎯 &lt;strong&gt;6 MCP tools&lt;/strong&gt; built and deployed&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;6 agent services&lt;/strong&gt; with custom skills&lt;/li&gt;
&lt;li&gt;📝 &lt;strong&gt;10 formal specs&lt;/strong&gt; with complete traceability&lt;/li&gt;
&lt;li&gt;📚 &lt;strong&gt;7 steering docs&lt;/strong&gt; for persistent context&lt;/li&gt;
&lt;li&gt;🪝 &lt;strong&gt;4 agent hooks&lt;/strong&gt; for automated workflows&lt;/li&gt;
&lt;li&gt;🔌 &lt;strong&gt;6 MCP servers&lt;/strong&gt; integrated&lt;/li&gt;
&lt;li&gt;⏱️ &lt;strong&gt;6 days&lt;/strong&gt; from concept to production&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;100+&lt;/strong&gt; conversations with Kiro&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎓 What I Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Hybrid Vibe + Spec Wins
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Spec Mode&lt;/strong&gt; for complex features → Structure, traceability, testing&lt;br&gt;
&lt;strong&gt;Vibe Mode&lt;/strong&gt; for iterations → 10x faster bug fixes and adjustments&lt;/p&gt;

&lt;p&gt;Neither alone is optimal. The combination is magic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Steering Docs Are Superpowers
&lt;/h3&gt;

&lt;p&gt;Teaching Kiro once vs. teaching it every conversation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before: 5 minutes/conversation × 100 = 500 minutes wasted&lt;/li&gt;
&lt;li&gt;After: 0 minutes repetition = &lt;strong&gt;8+ hours saved&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. MCP Integration Enables The Impossible
&lt;/h3&gt;

&lt;p&gt;Without &lt;code&gt;mcp-ui-docs&lt;/code&gt;, I would have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manually searched documentation&lt;/li&gt;
&lt;li&gt;Used outdated API patterns&lt;/li&gt;
&lt;li&gt;Spent days debugging production issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With it: Zero breaking changes, always-current APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Hooks Catch Issues Early
&lt;/h3&gt;

&lt;p&gt;The Security Pre-Commit Scanner found issues &lt;strong&gt;immediately&lt;/strong&gt;, not in code review days later.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 What's Next
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Immediate priorities&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fix gateway timeout issues&lt;/li&gt;
&lt;li&gt;Optimize agent processing times&lt;/li&gt;
&lt;li&gt;Complete Docker image generation setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Future features&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Video ad generation for TikTok/Reels&lt;/li&gt;
&lt;li&gt;A/B testing integration&lt;/li&gt;
&lt;li&gt;Multi-platform campaigns&lt;/li&gt;
&lt;li&gt;Real-time analytics&lt;/li&gt;
&lt;li&gt;Template library&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏁 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Kiro isn't just an AI coding assistant. It's a &lt;strong&gt;development environment&lt;/strong&gt; where AI understands your project deeply and assists at every stage—from requirements to deployment.&lt;/p&gt;

&lt;p&gt;The combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Specs for structured planning&lt;/li&gt;
&lt;li&gt;✅ Steering for persistent context&lt;/li&gt;
&lt;li&gt;✅ Hooks for automation&lt;/li&gt;
&lt;li&gt;✅ MCP for extended capabilities&lt;/li&gt;
&lt;li&gt;✅ Vibe for natural iteration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...enabled me to build in &lt;strong&gt;6 days&lt;/strong&gt; what would have taken &lt;strong&gt;2+ months&lt;/strong&gt; traditionally.&lt;/p&gt;

&lt;p&gt;This isn't incremental improvement. This is transformation.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo&lt;/strong&gt;: &lt;a href="https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/" rel="noopener noreferrer"&gt;https://sc80sggw884kw448kc0sckw0.coolify-dev-pa.tonob.net/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/feed-mob/feedmob-adpilot-mcp" rel="noopener noreferrer"&gt;https://github.com/feed-mob/feedmob-adpilot-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Server&lt;/strong&gt;: &lt;a href="https://b8ggscok0gkgw848444gcokw.coolify-dev-pa.tonob.net/mcp" rel="noopener noreferrer"&gt;https://b8ggscok0gkgw848444gcokw.coolify-dev-pa.tonob.net/mcp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built for &lt;a href="https://kiroween.devpost.com/" rel="noopener noreferrer"&gt;Kiroween 2025&lt;/a&gt; 🎃&lt;/p&gt;




&lt;p&gt;What's your experience with AI-assisted development? Have you tried spec-driven development with AI? Drop your thoughts in the comments! 👇&lt;/p&gt;

&lt;h1&gt;
  
  
  kiro #mcp #ai #devtools #hackathon #fastmcp #claude
&lt;/h1&gt;

</description>
      <category>kiro</category>
      <category>ai</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
