Inspiration

Every developer knows the pain of cloud bill shock.

You deploy a service, forget about it, and 30 days later you receive a surprise invoice that blows past your budget. FinOps tools exist—but they are reactive, complex, and disconnected from a developer’s daily workflow.

Meanwhile, Kiro introduced a new power: MCP, hooks, and spec-driven automation.

I realized something:

"If Kiro can understand code, trigger logic on save, and communicate with external tools… then FinOps doesn’t need to wait for deployment. It can happen directly inside the IDE."

That insight became PocketDC — a “Shift-Left FinOps” guardrail that catches cloud overspending the moment a developer writes or edits their service spec.

What it does

PocketDC embeds FinOps into the development workflow using Kiro’s automation stack.

Whenever a .service.md file is saved, PocketDC:

  1. Reads the service specification
  2. Extracts service_name and max_cost
  3. Calls a custom MCP server (pocketdc-mcp) to estimate monthly cloud cost
  4. Compares the estimate with the allowed budget
  5. Updates the spec file with a PocketDC Report block
  6. Notifies the developer if the service is OVER_BUDGET or WITHIN_BUDGET
  7. Provides actionable optimization tips

It is FinOps that runs every time you press save.

How we built it

PocketDC is composed of three coordinated pieces:

1. MCP Server (pocketdc-mcp)

A lightweight node server implemented using the Model Context Protocol. It defines one tool:

get_estimated_cost(service_name: string)

For demo purposes, it returns a predictable estimated cost ($80), allowing the FinOps logic to be tested quickly and reliably.

2. Kiro FinOps Hook

A custom hook that triggers on:

"type": "fileSaved",
"patterns": ["**/*.service.md"]

On save, it:

  • Reads the spec
  • Calls the MCP tool
  • Runs cost comparison logic
  • Updates the spec file directly
  • Generates FinOps recommendations This transforms a static Markdown spec into a living cost-aware document.

3. Cost-Aware Service Spec

A simple, human-readable YAML file that includes budget constraints and service configuration. PocketDC rewrites a “FinOps Report” block at the top of the file every time it runs:

# PocketDC Report:
# estimated_cost: 80 USD/month
# max_cost: 50 USD/month
# status: OVER_BUDGET

The developer sees the result instantly.

Challenges we ran into

  • MCP integration required strict input/output formats
  • Early versions of the hook did not trigger due to fileEdited vs fileSaved mismatch
  • Ensuring Kiro properly matched patterns like */.service.md
  • Designing a simple, clean spec format that could be extended easily
  • Capturing the entire FinOps cycle inside a short hackathon timeframe Debugging the hook system and aligning it with Kiro’s async agent execution was the hardest part, but completing it made the final flow extremely satisfying.

Accomplishments that we're proud of

  • Shift-Left FinOps inside the IDE PocketDC successfully brought cloud cost analysis directly into Kiro, transforming cost checking from a late-stage, reactive process into an automatic guardrail that runs at development time.
  • Full integration using MCP + Hooks + Spec The project showcases a fully automated pipeline: saving a spec triggers a hook → which calls an MCP tool → which updates the document → and returns actionable insights.
  • A “living” service specification The .service.md file becomes self-updating. Every edit rewrites the FinOps Report block with real-time cost metadata, turning documentation into something alive and intelligent.
  • A seamless 3-second workflow Just hitting Save gives developers an instant FinOps status. No commands, no terminals, no dashboards—pure automation.
  • A creative, high-impact use of Kiro PocketDC uses Kiro not just for coding, but as a smart environment capable of enforcing cost policies and preventing financial waste—something no traditional IDE provides.

What we learned

  • The power of MCP in extending IDEs MCP isn't just an API bridge; it enables entirely new categories of tooling that merge external systems with in-editor intelligence.
  • Hooks as real-time automation We learned how Kiro Hooks can transform the IDE into an event-driven platform where saving a file can trigger complex workflows, validations, and external tools.
  • Spec-driven workflows matter Structured specs paired with automatic analysis create a clean, scalable workflow that teams can rely on.
  • FinOps is most valuable before deployment The earlier cost issues are caught, the cheaper they are to fix. PocketDC proved that cost engineering belongs at the start of the dev cycle.
  • Debugging event triggers requires precision Getting fileSaved vs fileEdited correct, ensuring globs match patterns, and validating hook execution order taught us the importance of precision in IDE automation.

What's next for PocketDC

  • Real AWS/GCP/Azure integration Replace the mock cost estimator with real cloud usage models or cost APIs for accurate forecasting.
  • PocketDC-Optimize A new MCP tool to automatically apply optimization patches—reducing memory, adjusting autoscaling, rewriting runtime choices, or generating recommended config diffs.
  • CI/CD FinOps Enforcement Add a mode that blocks pull requests when services exceed cost budgets, ensuring compliance across teams.
  • Service-to-Service Cost Modeling Extend PocketDC to analyze upstream/downstream dependencies and generate system-level cost projections.
  • Live Cost Heatmap Show a dynamic view of which services are “hot” (expensive) or “cool” (safe) directly inside the IDE.
  • Team Budget Sharing Support shared organization-wide budgets, allowing PocketDC to alert teams when multiple services together exceed monthly allocations.
  • Gamified Cost Savings Introduce scoring, badges, and “Sustainability Streaks” to incentivize cost-efficient development practices.

PocketDC started as a small experiment, but it has the potential to evolve into a full FinOps platform built directly into the developer workflow—catching waste early, saving money, and empowering teams to build smarter cloud systems.

Built With

Share this project:

Updates