{
  "markdown": "# IntegrityPulse FinOps\n\n**Stop your AI agents from hallucinating cloud costs. Get real pricing forecasts inside the conversation.**\n\n[![MCP Server](https://img.shields.io/badge/MCP-Streamable%20HTTP-blue)](https://modelcontextprotocol.io)\n[![Cloudflare Workers](https://img.shields.io/badge/Runtime-Cloudflare%20Workers-orange)](https://workers.cloudflare.com)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n---\n\n## What is this?\n\nIntegrityPulse FinOps is a **remote MCP server** that gives AI coding agents accurate, real-time cloud deployment cost forecasts. Instead of your agent guessing that \"an EC2 instance costs around $50/month,\" it calls a tool backed by a verified pricing matrix and returns a line-item breakdown.\n\n**One tool. Three providers. Zero hallucinations.**\n\n```\nUser: \"What would it cost to run our API on AWS with an m5.large, a managed Postgres, and Redis?\"\n\nAgent (via IntegrityPulse FinOps):\n  | Service                    | Category | Hours | Est. Cost |\n  |----------------------------|----------|-------|-----------|\n  | m5.large                   | Compute  | 730   | $70.08    |\n  | rds.postgres.db.m5.large   | Database | 730   | $204.40   |\n  | elasticache.redis.t3.micro | Cache    | 730   | $11.68    |\n\n  Total Estimated Monthly Cost: $286.16\n```\n\n---\n\n## Quick Start\n\n### Claude Desktop\n\nAdd this to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"integritypulse\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://integritypulse.marywomack.workers.dev/mcp\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to your `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"integritypulse\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://integritypulse.marywomack.workers.dev/mcp\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n### cURL\n\n```bash\ncurl -X POST https://integritypulse.marywomack.workers.dev/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"tools/call\",\n    \"params\": {\n      \"name\": \"forecast_deployment_cost\",\n      \"arguments\": {\n        \"provider\": \"AWS\",\n        \"services_to_add\": [\n          {\"service_name\": \"m5.large\", \"estimated_usage_hours\": 730}\n        ]\n      }\n    }\n  }'\n```\n\n---\n\n## The Tool: `forecast_deployment_cost`\n\n| Parameter | Type | Description |\n|---|---|---|\n| `provider` | `\"AWS\" \\| \"GCP\" \\| \"AZURE\"` | Cloud provider to price against |\n| `services_to_add` | `Array<{ service_name, estimated_usage_hours }>` | Services to include in the forecast |\n\n**Supported services:**\n\n| AWS | GCP | Azure |\n|-----|-----|-------|\n| t3.micro, t3.medium, m5.large | e2-micro, e2-medium, n2-standard-2 | B1s, B2s, D2s_v3 |\n| rds.postgres.db.t3.micro, rds.postgres.db.m5.large | cloudsql.postgres.db-custom-1-3840, cloudsql.postgres.db-custom-4-15360 | postgresql.flexible.b1ms |\n| elasticache.redis.t3.micro | memorystore.redis.1gb | |\n| s3.standard.1tb | | |\n\n---\n\n## Why It Exists: FinOps for the Agentic Era\n\nAI agents are moving from \"write me code\" to \"deploy this for me.\" When an agent provisions infrastructure, cost accuracy isn't a nice-to-have -- it's a financial control.\n\n**The problem:** LLMs hallucinate pricing. They confidently tell you an RDS instance costs \"$15/month\" when the real number is $204. When agents start executing deployments autonomously, these hallucinations become real invoices.\n\n**The solution:** IntegrityPulse FinOps is a **grounded pricing oracle** that agents call as a tool. The pricing matrix is maintained, versioned, and deterministic. No generation, no guessing.\n\n### Agentic Commerce & the Revenue Gate\n\nThis server is also a reference implementation of **Revenue-Gated MCP** -- a pattern for monetizing MCP tools without breaking the agent experience.\n\nHere's how it works:\n\n1. Every request carries an `x-api-key` header.\n2. The server checks the user's `tier` and `monthly_usage_count` in Supabase.\n3. Free tier users get **25 operations/month**.\n4. When the limit is hit, the server does NOT return an HTTP error. Instead, it returns a valid MCP tool result with `isError: true`:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"result\": {\n    \"content\": [{\n      \"type\": \"text\",\n      \"text\": \"IntegrityPulse FinOps Alert: Your free monthly tier (25/25 operations) has been exhausted. To generate this architectural cost forecast, please upgrade to the Pro tier here: https://billing.openclaw.com/upgrade. Once upgraded, ask me to retry.\"\n    }],\n    \"isError\": true\n  }\n}\n```\n\n**Why `isError: true` instead of HTTP 402/429?**\n\nBecause the consumer is an LLM, not a browser. An HTTP error gets swallowed by the MCP transport layer and the user never sees it. By returning a tool result with `isError: true`, the upgrade CTA lands **directly in the conversation** where the user is already engaged. The agent reads it, surfaces it, and the user can act on it immediately. This is commerce at the point of intent.\n\n### Stripe Integration\n\nWhen a user upgrades via the billing link, Stripe fires a `checkout.session.completed` webhook to `/api/webhook/stripe`. The server automatically:\n- Updates their tier from `FREE` to `PRO`\n- Resets their usage counter to 0\n- The next agent request goes through seamlessly\n\n---\n\n## Architecture\n\n```\n                         +-----------------+\n  Claude / Cursor        |  Cloudflare     |       +------------+\n  (MCP Client)  -------->|  Worker (Hono)  |------>|  Supabase  |\n                POST     |                 |       |  (users)   |\n                /mcp     |  Revenue Gate   |       +------------+\n                         |  MCP Server     |\n                         |  Stripe Webhook |------>  Stripe API\n                         +-----------------+\n```\n\n- **Runtime:** Cloudflare Workers (edge, ~0ms cold start)\n- **Framework:** Hono (lightweight, Workers-native)\n- **MCP SDK:** `@modelcontextprotocol/sdk` with Streamable HTTP transport\n- **Auth:** API key in `x-api-key` or `Authorization: Bearer` header\n- **Database:** Supabase (PostgreSQL)\n- **Payments:** Stripe Checkout + Webhooks\n\n---\n\n## Self-Hosting\n\n```bash\ngit clone https://github.com/maryadawson-code/integritypulse.git\ncd integritypulse\nnpm install\n\n# Configure secrets\ncp .env.example .env\n# Edit .env with your Supabase and Stripe credentials\n\n# Local development\nnpx wrangler dev\n\n# Deploy to Cloudflare Workers\nnpx wrangler secret put SUPABASE_URL\nnpx wrangler secret put SUPABASE_SERVICE_KEY\nnpx wrangler secret put STRIPE_SECRET_KEY\nnpx wrangler secret put STRIPE_WEBHOOK_SECRET\nnpx wrangler deploy\n```\n\n---\n\n## License\n\nMIT\n",
  "bytes": 6748,
  "sha": "af2e148655fab06bb2cc360a2e8f1a20795b12123484512f1641fd99008a9d1a",
  "repo_slug": "maryadawson-code/openclaw-finops",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_maryadawson_code_openclaw_fino_a3dbf268/readme"
}