DEV Community

HĂ  Tráş§n
HĂ  Tráş§n

Posted on

How I Built PocketDC: Shift-Left FinOps Powered by Kiro Hooks + MCP

đźš§ The Problem

Cloud cost surprises are painful.
Teams only discover cost issues after deployment — when it's too late and too expensive to fix.

FinOps tools exist, but they’re reactive, complex, and outside the developer’s workflow.

I wanted something simpler:

👉 Cost visibility inside the IDE
👉 Cost analysis that runs on save
👉 No dashboards, no terminals, no scripts

Just instant FinOps inside Kiro.

⚡ Introducing PocketDC

PocketDC is a real-time FinOps guardrail built directly into the Kiro IDE.

Whenever I save a service spec:

A Kiro Hook fires

It reads my service design

It calls an MCP cost-engine

It rewrites a “FinOps Report” block at the top of the file

It warns me if my service is OVER_BUDGET

This transforms a simple Markdown file into a living, cost-aware document.

đź§© How I Built It (Kiro = Magic)

PocketDC stitches together:

Kiro Hooks – triggers logic when saving .service.md

Specs – single source of truth

MCP – external cost engine returning estimates

Kiro Chat – orchestrating everything

This combination allowed me to build a fully automated cost-check system within the IDE.

Here’s the workflow:

Save service spec →
Hook triggers →
MCP server estimates cost →
Kiro rewrites FinOps Report →
Developer instantly sees budget status
Enter fullscreen mode Exit fullscreen mode

Simple. Beautiful. Powerful.

đź›  Example: Saving a File

Before saving:

service_name: my-web-service
max_cost: 50
runtime: node18
Enter fullscreen mode Exit fullscreen mode

After saving:

# PocketDC Report:
# estimated_cost: 80 USD/month
# max_cost: 50 USD/month
# status: OVER_BUDGET
# over_by: 30 USD
Enter fullscreen mode Exit fullscreen mode

Kiro automatically updated the file and suggested optimizations.

🔥 What I Learned

MCP is incredibly powerful for integrating external tools

Hooks turn Kiro into an event-driven automation engine

Specs as source-of-truth lead to predictable, maintainable workflows

“Shift-Left FinOps” is more valuable than I expected — catching issues early saves real money

🚀 What’s Next

Real AWS/GCP/Azure cost APIs

Auto-optimization engine

PR-blocking for over-budget services

System-level cost modeling

PocketDC started as an experiment but now feels like a real FinOps platform.

Kiro made it possible — and made it fun.

âś” Conclusion

PocketDC shows that IDEs can be more than text editors.

With Kiro’s Hooks, Specs, and MCP, the IDE becomes a smart, automated partner that helps developers build better — and cheaper — systems.

Top comments (0)