Okta targets AI agent token costs with MCP scoping
Okta proposes identity-scoped Model Context Protocol (MCP) tool lists to reduce AI agent token costs caused by "tool tax" — the overhead of including all tool schemas in every model prompt Filtering tools before prompt construction based on user/agent permissions can reduce visible tools by over 90% in some scenarios, proportionally cutting schema token costs The approach applies least-privilege access at the tool level rather than the MCP server level, with scope checks at both prompt assembly
Analysis
TL;DR
- Okta proposes identity-scoped Model Context Protocol (MCP) tool lists to reduce AI agent token costs caused by "tool tax" — the overhead of including all tool schemas in every model prompt
- Filtering tools before prompt construction based on user/agent permissions can reduce visible tools by over 90% in some scenarios, proportionally cutting schema token costs
- The approach applies least-privilege access at the tool level rather than the MCP server level, with scope checks at both prompt assembly and runtime execution
- Identity-based scoping complements but differs from gateway controls, which meter and cap spending after tokens are already consumed
- Reducing tool visibility also shrinks the attack surface for compromised identities by limiting available actions
Why It Matters
As AI agents increasingly rely on MCP servers to connect to tools and data sources, the cumulative token cost of transmitting full tool catalogs with every model call becomes a significant and often overlooked expense at scale. This approach reframes cost control as an identity governance problem rather than a post-hoc metering challenge, offering a dual benefit of reduced spend and improved security posture for enterprise AI deployments.
Technical Details
- Tool Tax Problem: Every MCP model call includes schemas, names, descriptions, and parameters for all tools exposed by a server, consuming tokens even for tools the agent will never use — and this cost is incurred before any authorization check occurs
- Identity-Scoped Filtering: Okta maps MCP server tools to OAuth scopes, then filters the tool catalog per identity using assigned permissions, returning only the scoped tool set to the agent rather than the full server catalogue
- Two-Layer Scope Check: The first filter occurs during tool list assembly for the agent prompt; a second check runs at runtime before tool execution, enforcing least-privilege at both stages
- Internal Modeling Methodology: Okta modeled a single MCP client against enterprise tool catalogs, mapping tools to OAuth scopes and defining representative user segments (helpdesk read-only, operators, app admins, super admins) weighted by assumed monthly traffic share
- Cost Reduction Claims: Some permission scenarios reduced visible tools by over 90%, with tool-schema token costs falling proportionally due to the near-linear relationship between tool count and schema token consumption per prompt
Industry Insight
- Enterprises should treat MCP tool visibility as both a cost and security concern — unscoped tool catalogs create unnecessary token spend and expand the blast radius of compromised agent identities, making identity governance a critical layer in agentic architecture
- Gateway-based spending controls alone are insufficient for cost optimization; combining them with identity-level tool scoping addresses the root cause (excessive tool exposure) rather than merely capping downstream consumption
- As MCP adoption grows, tool-level granularity in access control will likely become a standard expectation, pushing vendors to expose per-tool permission metadata and prompting the emergence of identity-aware MCP middleware
Disclaimer: The above content is generated by AI and is for reference only.