diff --git a/docs/my-website/docs/mcp.md b/docs/my-website/docs/mcp.md index a0a17ee03d..03de776a5c 100644 --- a/docs/my-website/docs/mcp.md +++ b/docs/my-website/docs/mcp.md @@ -19,6 +19,8 @@ LiteLLM Proxy provides an MCP Gateway that allows you to use a fixed endpoint fo |---------|-------------| | MCP Operations | • List Tools
• Call Tools | | Supported MCP Transports | • Streamable HTTP
• SSE
• Standard Input/Output (stdio) | +| MCP Tool Cost Tracking | ✅ Supported | +| Grouping MCPs (Access Groups) | ✅ Supported | | LiteLLM Permission Management | ✨ Enterprise Only
• By Key
• By Team
• By Organization | ## Adding your MCP @@ -570,16 +572,37 @@ curl --location '/v1/responses' \ -## ✨ MCP Cost Tracking +## MCP Cost Tracking -LiteLLM provides two ways to track costs for MCP tool calls: +LiteLLM provides cost tracking for MCP tool calls, allowing you to monitor and control expenses associated with MCP operations. You can configure costs at two levels: -| Method | When to Use | What It Does | -|--------|-------------|--------------| -| **Config-based Cost Tracking** | Simple cost tracking with fixed costs per tool/server | Automatically tracks costs based on configuration | -| **Custom Post-MCP Hook** | Dynamic cost tracking with custom logic | Allows custom cost calculations and response modifications | +- **Default cost per tool**: Set a uniform cost for all tools from a specific MCP server +- **Tool-specific costs**: Define individual costs for specific tools (e.g., `search_tool` costs $10, while `get_weather` costs $5) -### Config-based Cost Tracking +### Configure cost tracking + +LiteLLM offers two approaches to track MCP tool costs, each designed for different use cases: + +| Method | Best For | Capabilities | +|--------|----------|-------------| +| **UI/Config-based Cost Tracking** | Simple, static cost tracking scenarios | • Set default costs for all server tools
• Configure individual tool costs
• Automatic cost tracking based on configuration | +| **Custom Post-MCP Hook** | Dynamic, complex cost tracking requirements | • Custom cost calculation logic
• Real-time cost adjustments
• Response modification capabilities | + +### Configuration on UI/config.yaml + + + + +On the UI when adding a new MCP server, you can navigate to the "Cost Configuration" tab to configure the cost for the MCP server. + + + + + + Configure fixed costs for MCP servers directly in your config.yaml: @@ -609,6 +632,9 @@ mcp_servers: default_cost_per_query: 1.50 ``` + + + ### Custom Post-MCP Hook Use this when you need dynamic cost calculation or want to modify the MCP response before it's returned to the user. diff --git a/docs/my-website/img/mcp_cost.png b/docs/my-website/img/mcp_cost.png new file mode 100644 index 0000000000..1d393d5ec8 Binary files /dev/null and b/docs/my-website/img/mcp_cost.png differ