> ## Documentation Index
> Fetch the complete documentation index at: https://mcp-server-langgraph.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Total Cost of Ownership Calculator

> Interactive TCO calculator comparing MCP Server with LangGraph against competitor frameworks

## Interactive TCO Calculator

Calculate the **Total Cost of Ownership (TCO)** for deploying AI agents across different frameworks. Adjust the sliders to match your expected usage and see real-time cost comparisons.

<Warning>
  **Disclaimer**: These calculations are estimates based on public pricing (as of 2025) and typical deployment patterns. Your actual costs may vary based on specific usage patterns, negotiated pricing, regional differences, and configuration choices.
</Warning>

***

## Usage Configuration

<div style={{padding: '20px', backgroundColor: 'var(--card-background, rgba(0,0,0,0.02))', borderRadius: '8px', marginBottom: '20px', border: '1px solid var(--border-color, rgba(0,0,0,0.1))'}}>
  ### Monthly Request Volume

  <input type="range" id="requestVolume" min="0" max="10000000" step="100000" defaultValue="1000000" style={{width: '100%'}} />

  <div style={{display: 'flex', justifyContent: 'space-between', fontSize: '14px', marginTop: '5px'}}>
    <span>10K</span>
    <span id="requestVolumeDisplay" style={{fontWeight: 'bold', color: 'var(--accent-color, #2563eb)'}}>1M requests/month</span>
    <span>10M</span>
  </div>

  ***

  ### Average Tokens per Request

  <input type="range" id="tokensPerRequest" min="100" max="10000" step="100" defaultValue="1000" style={{width: '100%'}} />

  <div style={{display: 'flex', justifyContent: 'space-between', fontSize: '14px', marginTop: '5px'}}>
    <span>100</span>
    <span id="tokensDisplay" style={{fontWeight: 'bold', color: 'var(--accent-color, #2563eb)'}}>1,000 tokens/request</span>
    <span>10K</span>
  </div>

  ***

  ### Team Size (Developers)

  <input type="range" id="teamSize" min="1" max="20" step="1" defaultValue="3" style={{width: '100%'}} />

  <div style={{display: 'flex', justifyContent: 'space-between', fontSize: '14px', marginTop: '5px'}}>
    <span>1</span>
    <span id="teamSizeDisplay" style={{fontWeight: 'bold', color: 'var(--accent-color, #2563eb)'}}>3 developers</span>
    <span>20</span>
  </div>

  ***

  ### Workflow Complexity

  <select id="workflowComplexity" style={{width: '100%', padding: '8px', borderRadius: '4px', border: '1px solid var(--border-color, #d1d5db)', backgroundColor: 'var(--background-color, #ffffff)', color: 'var(--text-color, inherit)'}}>
    <option value="simple">Simple (Single-agent, basic tools)</option>
    <option value="moderate" selected>Moderate (Multi-agent, state management)</option>
    <option value="complex">Complex (Conditionals, human-in-the-loop, persistence)</option>
  </select>

  ***

  ### Deployment Region

  <select id="deploymentRegion" style={{width: '100%', padding: '8px', borderRadius: '4px', border: '1px solid var(--border-color, #d1d5db)', backgroundColor: 'var(--background-color, #ffffff)', color: 'var(--text-color, inherit)'}}>
    <option value="us" selected>United States</option>
    <option value="eu">Europe (GDPR)</option>
    <option value="asia">Asia Pacific</option>
  </select>

  ***

  ### LLM Model Selection

  <select id="llmModel" style={{width: '100%', padding: '8px', borderRadius: '4px', border: '1px solid var(--border-color, #d1d5db)', backgroundColor: 'var(--background-color, #ffffff)', color: 'var(--text-color, inherit)'}}>
    <optgroup label="Google Gemini (Recommended)">
      <option value="gemini-2.5-flash" selected>Gemini 2.5 Flash ($0.30/$2.50 per 1M)</option>
      <option value="gemini-2.5-flash-lite">Gemini 2.5 Flash Lite ($0.10/$0.40 per 1M)</option>
      <option value="gemini-2.5-pro">Gemini 2.5 Pro ($1.25/$10 per 1M)</option>
      <option value="gemini-3-pro-preview">Gemini 3 Pro Preview ($2/$12 per 1M)</option>
    </optgroup>

    <optgroup label="Anthropic Claude 4.5 (Fallback)">
      <option value="claude-4.5-haiku">Claude 4.5 Haiku ($1/$5 per 1M)</option>
      <option value="claude-4.5-sonnet">Claude 4.5 Sonnet ($3/$15 per 1M)</option>
      <option value="claude-4.5-opus">Claude 4.5 Opus ($5/$25 per 1M)</option>
    </optgroup>

    <optgroup label="OpenAI GPT-5.x (Last Resort)">
      <option value="gpt-5.1">GPT-5.1 ($1.25/$10 per 1M)</option>
      <option value="gpt-5.1-thinking">GPT-5.1 Thinking ($2.50/$15 per 1M)</option>
      <option value="gpt-5-mini">GPT-5 Mini ($0.25/$2 per 1M)</option>
      <option value="gpt-5.1-nano">GPT-5 Nano ($0.05/$0.40 per 1M)</option>
    </optgroup>
  </select>
</div>

***

## Cost Breakdown by Framework

<Info>
  The costs below are **baseline estimates** for 1M requests/month with Gemini 2.5 Flash. Use the sliders and dropdowns above to see dynamic calculations based on your specific configuration.
</Info>

<div id="costResults" style={{marginTop: '30px'}}>
  ### MCP Server with LangGraph (Self-Hosted - Kubernetes)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #ecfdf5)', border: '2px solid #10b981', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component     | Monthly Cost      | Notes                                        |
    | ------------------ | ----------------- | -------------------------------------------- |
    | **Infrastructure** | **\$350**         | GKE cluster (4 pods, n2-standard-4)          |
    | **LLM API Costs**  | **\$420**         | Gemini 2.5 Flash @ $0.30/$2.50 per 1M tokens |
    | **Observability**  | **\$50**          | LangSmith + Prometheus + Grafana             |
    | **Storage**        | **\$20**          | PostgreSQL + Redis (state/checkpoints)       |
    | **Networking**     | **\$15**          | Load balancer + egress                       |
    | **DevOps Time**    | **\$500**         | \~10 hours/month @ \$50/hr (maintenance)     |
    |                    |                   |                                              |
    | **Total TCO**      | **\$1,355/month** | **\$1.36 per 1,000 requests**                |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #d1fae5)', borderRadius: '4px'}}>
      💰 **Cost Savings**: \$3,745/month vs LangGraph Cloud (73% cheaper)
    </div>
  </div>

  ***

  ### MCP Server with LangGraph (Cloud Run - Serverless)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #eff6ff)', border: '2px solid #3b82f6', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component    | Monthly Cost      | Notes                                        |
    | ----------------- | ----------------- | -------------------------------------------- |
    | **Cloud Run**     | **\$600**         | Serverless container hosting                 |
    | **LLM API Costs** | **\$420**         | Gemini 2.5 Flash @ $0.30/$2.50 per 1M tokens |
    | **Observability** | **\$50**          | LangSmith + Cloud Monitoring                 |
    | **Storage**       | **\$30**          | Cloud SQL + Memorystore                      |
    | **Networking**    | **\$25**          | Cloud Load Balancer                          |
    | **DevOps Time**   | **\$200**         | \~4 hours/month (less maintenance)           |
    |                   |                   |                                              |
    | **Total TCO**     | **\$1,325/month** | **\$1.33 per 1,000 requests**                |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #dbeafe)', borderRadius: '4px'}}>
      💰 **Cost Savings**: \$3,775/month vs LangGraph Cloud (74% cheaper)
    </div>
  </div>

  ***

  ### LangGraph Cloud (Managed Platform)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #fef3c7)', border: '2px solid #f59e0b', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component    | Monthly Cost      | Notes                             |
    | ----------------- | ----------------- | --------------------------------- |
    | **Platform Fees** | **\$5,000**       | \$0.001/node × 5M node executions |
    | **Uptime Fees**   | **\$100**         | Always-on deployment              |
    | **LLM API Costs** | **\$0**           | Included in platform fees         |
    | **Observability** | **\$0**           | LangSmith included                |
    | **Storage**       | **\$0**           | Included in platform              |
    | **DevOps Time**   | **\$0**           | Fully managed                     |
    |                   |                   |                                   |
    | **Total TCO**     | **\$5,100/month** | **\$5.10 per 1,000 requests**     |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #fde68a)', borderRadius: '4px'}}>
      ⚠️ **Trade-off**: Zero DevOps effort, but 4x higher cost at scale
    </div>
  </div>

  ***

  ### OpenAI AgentKit (Platform)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #fce7f3)', border: '2px solid #ec4899', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component      | Monthly Cost      | Notes                               |
    | ------------------- | ----------------- | ----------------------------------- |
    | **Platform Fees**   | **\$0**           | No separate AgentKit fee            |
    | **GPT-5.1 API**     | **\$1,688**       | 1B tokens @ $1.25/$10 per 1M tokens |
    | **Web Search**      | **\$500**         | 50K searches @ \$10/1K calls        |
    | **ChatKit Storage** | **\$20**          | 200 GB-days @ \$0.10/GB-day         |
    | **Observability**   | **\$0**           | Basic Evals included                |
    | **DevOps Time**     | **\$0**           | Fully managed                       |
    |                     |                   |                                     |
    | **Total TCO**       | **\$2,208/month** | **\$2.21 per 1,000 requests**       |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #fbcfe8)', borderRadius: '4px'}}>
      * ❌ **Vendor Lock-in**: OpenAI models only, limited flexibility
    </div>
  </div>

  ***

  ### CrewAI (Self-Hosted)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #f3f4f6)', border: '2px solid #6b7280', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component     | Monthly Cost      | Notes                                        |
    | ------------------ | ----------------- | -------------------------------------------- |
    | **Infrastructure** | **\$200**         | Single VM (n2-standard-2)                    |
    | **LLM API Costs**  | **\$420**         | Gemini 2.5 Flash @ $0.30/$2.50 per 1M tokens |
    | **Observability**  | **\$0**           | Basic logging only                           |
    | **Storage**        | **\$10**          | Local SQLite (not production-ready)          |
    | **Networking**     | **\$5**           | Minimal                                      |
    | **DevOps Time**    | **\$800**         | \~16 hours/month (manual setup)              |
    |                    |                   |                                              |
    | **Total TCO**      | **\$1,435/month** | **\$1.44 per 1,000 requests**                |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #e5e7eb)', borderRadius: '4px'}}>
      ⚠️ **Note**: Low infrastructure cost, but high DevOps burden for production features
    </div>
  </div>

  ***

  ### Google ADK (Vertex AI Agent Engine)

  <div style={{padding: '20px', backgroundColor: 'var(--card-background, #fef2f2)', border: '2px solid #ef4444', borderRadius: '8px', marginBottom: '20px'}}>
    | Cost Component             | Monthly Cost      | Notes                               |
    | -------------------------- | ----------------- | ----------------------------------- |
    | **Vertex AI Agent Engine** | **\$1,500**       | Platform fees                       |
    | **Gemini 2.5 Pro API**     | **\$1,688**       | 1B tokens @ $1.25/$10 per 1M tokens |
    | **Cloud Storage**          | **\$30**          | Agent state/artifacts               |
    | **Networking**             | **\$20**          | VPC, load balancer                  |
    | **Observability**          | **\$100**         | Cloud Monitoring + Trace            |
    | **DevOps Time**            | **\$300**         | \~6 hours/month                     |
    |                            |                   |                                     |
    | **Total TCO**              | **\$3,638/month** | **\$3.64 per 1,000 requests**       |

    <div style={{marginTop: '15px', padding: '10px', backgroundColor: 'var(--card-background, #fee2e2)', borderRadius: '4px'}}>
      * ⚠️ **Trade-off**: Good for GCP-native, but 2.5x more expensive than self-hosted MCP Server
    </div>
  </div>
</div>

***

## Cost Comparison Chart

<div id="costComparisonChart" style={{padding: '20px', backgroundColor: 'var(--card-background, rgba(0,0,0,0.02))', border: '1px solid var(--border-color, rgba(0,0,0,0.1))', borderRadius: '8px', marginBottom: '30px'}}>
  *Loading dynamic cost comparison chart...*
</div>

<div id="bestValueDisplay" style={{padding: '15px', backgroundColor: 'var(--card-background, rgba(0,0,0,0.02))', border: '1px solid var(--border-color, rgba(0,0,0,0.1))', borderRadius: '8px', marginBottom: '20px', textAlign: 'center'}}>
  **Best Value**: Calculating based on your configuration...
</div>

***

## TCO Factors Explained

<AccordionGroup>
  <Accordion title="Infrastructure Costs">
    **Kubernetes (GKE/EKS/AKS):**

    * Cluster management: \$70-150/month
    * Node pools: \$250-400/month (4 pods, n2-standard-4)
    * Load balancer: \$15-30/month
    * **Total**: \~\$350/month for 1M requests

    **Cloud Run (Serverless):**

    * Pay-per-use: \$0.40-2.00 per 1M requests
    * Always-on: Add \~\$200/month for warm instances
    * **Total**: \~\$600/month for 1M requests

    **Platform Fees (LangGraph Cloud, OpenAI):**

    * Node executions: $0.001/node (5M nodes = $5,000)
    * API markup: Often included but higher per-request cost
  </Accordion>

  <Accordion title="LLM API Costs">
    **Model Selection Impact:**

    * **Gemini Flash**: \$0.075/1M tokens (cheapest)
    * **Claude Haiku**: \$0.25/1M tokens
    * **GPT-4o Mini**: \$0.15/1M tokens
    * **GPT-4**: \$10-30/1M tokens (most expensive)

    **For 1M requests @ 1,000 tokens/request:**

    * Gemini Flash: \$75/month
    * GPT-4: \$10,000/month (133x more expensive!)

    **Optimization**: Use cheaper models for high-volume workloads, premium models for complex reasoning.
  </Accordion>

  <Accordion title="DevOps Time Costs">
    **Self-Hosted (Kubernetes):**

    * Initial setup: 20-40 hours (one-time)
    * Monthly maintenance: 8-12 hours
    * Troubleshooting: 2-5 hours
    * **Total**: \~10 hours/month @ $50-100/hr = $500-1,000

    **Serverless (Cloud Run):**

    * Initial setup: 4-8 hours
    * Monthly maintenance: 2-4 hours
    * **Total**: \~4 hours/month = \$200-400

    **Managed Platforms:**

    * Zero DevOps time (fully managed)
    * Trade-off: 5-10x higher platform fees
  </Accordion>

  <Accordion title="Observability Costs">
    **MCP Server (Dual Stack):**

    * LangSmith: \$0-50/month (usage-based)
    * Prometheus + Grafana: Self-hosted (free) or Cloud (\$50-100/month)
    * **Total**: \~\$50-100/month

    **Managed Platforms:**

    * Included in platform fees
    * Limited customization
    * No infrastructure metrics (only LLM tracing)

    **Value**: Self-hosted observability provides more visibility at lower cost.
  </Accordion>

  <Accordion title="Hidden Costs">
    **Vendor Lock-in Opportunity Cost:**

    * Switching costs if pricing changes
    * Negotiation leverage with multi-cloud
    * **Value**: Estimated \$500-2,000/month in flexibility

    **Learning Curve:**

    * Team onboarding time: 40-80 hours (one-time)
    * Training costs: \$2,000-5,000 (one-time)
    * **Amortized**: \~\$200-400/month over 12 months

    **Compliance/Audit:**

    * SOC 2 audit: \$20,000-50,000 (annual)
    * HIPAA readiness: \$10,000-30,000 (one-time)
    * **Amortized**: \~\$200-500/month
  </Accordion>
</AccordionGroup>

***

## Break-Even Analysis

### When Does Self-Hosting Pay Off?

<Tabs>
  <Tab title="Low Volume (< 100K/month)">
    **Recommendation**: Managed platform (LangGraph Cloud or OpenAI AgentKit)

    **Why**:

    * DevOps overhead dominates costs at low volume
    * Platform fees are low (\< \$500/month)
    * Time-to-market matters more than cost optimization

    **Example**:

    * 50K requests/month
    * LangGraph Cloud: \$250/month (platform fees)
    * MCP Server: \$400/month (infrastructure + DevOps)
    * **Winner**: LangGraph Cloud (simpler, cheaper)
  </Tab>

  <Tab title="Medium Volume (100K - 1M/month)">
    **Recommendation**: MCP Server (Cloud Run or Kubernetes)

    **Why**:

    * Cost savings outweigh DevOps overhead
    * Platform fees start to dominate budget
    * Production features (observability, security) become important

    **Example**:

    * 500K requests/month
    * LangGraph Cloud: \$2,500/month
    * MCP Server (Cloud Run): \$700/month
    * **Savings**: \$1,800/month (72% reduction)
  </Tab>

  <Tab title="High Volume (> 1M/month)">
    **Recommendation**: MCP Server (Kubernetes for best cost/performance)

    **Why**:

    * Massive cost savings (10-50x cheaper)
    * DevOps costs amortized across high volume
    * Enterprise features required at this scale anyway

    **Example**:

    * 5M requests/month
    * LangGraph Cloud: \$25,000/month
    * MCP Server (K8s): \$1,500/month
    * **Savings**: \$23,500/month (94% reduction)
  </Tab>
</Tabs>

***

## 3-Year TCO Projection

### Total Cost Over 3 Years (assuming 1M req/month growth)

| Framework                  | Year 1    | Year 2    | Year 3    | 3-Year Total  |
| -------------------------- | --------- | --------- | --------- | ------------- |
| **MCP Server (K8s)**       | \$12,000  | \$18,000  | \$24,000  | **\$54,000**  |
| **MCP Server (Cloud Run)** | \$12,000  | \$18,000  | \$24,000  | **\$54,000**  |
| **LangGraph Cloud**        | \$61,000  | \$122,000 | \$183,000 | **\$366,000** |
| **OpenAI AgentKit**        | \$126,000 | \$252,000 | \$378,000 | **\$756,000** |
| **Google ADK**             | \$25,000  | \$40,000  | \$60,000  | **\$125,000** |

**Savings**: MCP Server saves **\$312,000 over 3 years** vs LangGraph Cloud at scale.

***

## ROI Calculator

### Return on Investment for Self-Hosting

**Scenario**: Migrating from LangGraph Cloud to MCP Server (K8s)

**Initial Investment**:

* Setup time: 40 hours @ $100/hr = $4,000
* Training: \$3,000
* **Total**: \$7,000 (one-time)

**Monthly Savings**:

* Platform cost reduction: $5,100 - $1,010 = \$4,090/month

**Break-Even**:

* $7,000 / $4,090 = **1.7 months**

**12-Month ROI**:

* Savings: $4,090 × 12 = $49,080
* Investment: \$7,000
* **ROI**: 601% (\$42,080 profit)

***

## Cost Optimization Strategies

<CardGroup cols={2}>
  <Card title="Choose Cheaper LLMs" icon="coins">
    Use Gemini Flash (\$0.075/1M tokens) for 90% of requests, GPT-4 for complex reasoning only.

    **Savings**: 10-20x on LLM costs
  </Card>

  <Card title="Implement Caching" icon="database">
    Cache common queries with Redis TTL.

    **Savings**: 30-50% reduction in LLM API calls
  </Card>

  <Card title="Batch Requests" icon="layer-group">
    Group multiple requests for parallel processing.

    **Savings**: 20% infrastructure efficiency gain
  </Card>

  <Card title="Use Spot Instances" icon="dollar-sign">
    Kubernetes node pools with spot/preemptible VMs.

    **Savings**: 60-80% on compute costs
  </Card>
</CardGroup>

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Why is MCP Server cheaper than managed platforms?">
    **Three reasons:**

    1. **No Platform Markup**: You pay cloud costs directly (no 10x markup)
    2. **Model Flexibility**: Use cheaper LLMs (Gemini Flash vs GPT-4)
    3. **Economies of Scale**: Self-hosting benefits from volume (managed platforms charge per-request)

    **Trade-off**: Requires DevOps expertise and maintenance time.
  </Accordion>

  <Accordion title="Are these costs accurate?">
    These estimates are based on:

    * **Public pricing** (GCP, AWS, Azure, LLM providers) as of 2025
    * **Typical deployment patterns** from real-world usage
    * **Average assumptions** (e.g., 1,000 tokens/request)

    **Your costs may vary** based on:

    * Negotiated enterprise pricing
    * Regional pricing differences
    * Actual token usage (can be 100-10,000+ tokens/request)
    * Custom configurations and optimizations
  </Accordion>

  <Accordion title="What about egress costs?">
    **Included in estimates** but can vary significantly:

    * **GCP**: \$0.12/GB (North America)
    * **AWS**: \$0.09/GB (first 10 TB)
    * **Azure**: \$0.087/GB (first 5 GB free)

    **For 1M requests**:

    * Average response: 2 KB
    * Total egress: 2 GB = \$0.18-0.24/month (negligible)

    **Exception**: Large file transfers or streaming can significantly increase egress costs.
  </Accordion>

  <Accordion title="How do I reduce DevOps time?">
    **Strategies**:

    1. **Use Cloud Run** instead of Kubernetes (4 hours vs 10 hours/month)
    2. **Automate deployments** with CI/CD (GitHub Actions, ArgoCD)
    3. **Use Helm charts** provided by MCP Server (pre-configured)
    4. **Enable auto-scaling** to reduce manual intervention
    5. **Invest in monitoring** to catch issues early

    **Result**: Reduce maintenance to 2-4 hours/month after initial setup.
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Try MCP Server" icon="rocket" href="/getting-started/quickstart">
    Get started in 5 minutes
  </Card>

  <Card title="Deployment Guide" icon="cloud" href="/deployment/kubernetes">
    Deploy to Kubernetes
  </Card>

  <Card title="Multi-LLM Setup" icon="dollar-sign" href="/guides/multi-llm-setup">
    Advanced cost reduction strategies
  </Card>

  <Card title="Framework Comparison" icon="chart-bar" href="/comparisons/choosing-framework">
    Full framework comparison
  </Card>
</CardGroup>

<script src="/tco-calculator.js" />
