Skip to content

[BUG] kusto_query takes 6–8 seconds for trivial queries due to per-request token acquisition #3865

Open

Description

@milope

Describe the bug

kusto_query takes approximately 6-8 seconds end-to-end for a trivial query whose Kusto-reported execution duration is under one second.

An additional independent run took 8.139 seconds. Every response succeeded and reported duration: 0:

{"status":200,"message":"Success","results":{"items":[{"value":"long"},[1]]},"duration":0}

Suggested investigation

Please measure these stages independently:

  1. TokenCredential.GetTokenAsync
  2. Kusto HTTP request execution
  3. Kusto response parsing/transformation
  4. MCP response serialization

Potential fixes include caching the Kusto access token by tenant/scope until shortly before expiration or using an Azure Core bearer-token authentication pipeline that handles token caching.

Expected behavior

For a trivial query with a known cluster URI, Azure MCP overhead should be small relative to direct Kusto REST execution.

Actual behavior

Timings

Attempt End-to-end time
1 7.590 s
2 6.390 s
3 6.924 s
Average 6.968 s

An additional independent run took 8.139 seconds. Every response succeeded and reported duration: 0:

{"status":200,"message":"Success","results":{"items":[{"value":"long"},[1]]},"duration":0}

Reproduction Steps

  • Azure MCP Server: @azure/mcp@2.0.5
  • Cluster URI: <doesn't matter>
  • Database: <doesn't matter>
  • Query: print value=1
  • Transport: stdio
  • Namespace: kusto

Environment

  • OS: Windows
  • Client: GitHub Copilot CLI 1.0.92
  • MCP server: Azure MCP Server @azure/mcp@2.0.5
  • Tool: kusto_query
  • Transport: stdio
  • Namespace: kusto
  • Authentication: Azure credential chain / Azure CLI
  • Runtime: Node.js v24.18.0
  • Cluster: <any cluster url>
  • Database: <any DB>

Activity

  1. added
    needs-team-attentionWorkflow: This issue needs attention from Azure service team or MCP team.
    questionFurther information is requested
    and removed
    needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.
    on Oct 6, 2026
  2. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc Daniel Dror (@danield137) paul1904 (@prvavill).

  3. added this to the 2026-11 milestone on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions