Query Details

KQLSearch MCP Integration in GitHub Copilot (VS Code)

Add KQL Search MCP In VS Code Github Copilot

Query

No standalone KQL detected in this source

View source on GitHub

About this query

Explanation

This guide explains how to integrate the KQLSearch MCP server with GitHub Copilot in Visual Studio Code. This integration allows Copilot to use KQLSearch tools to find and reuse community KQL examples directly from the chat interface.

Key Points:

  • Server Details: The KQLSearch MCP server is accessed via https://www.kqlsearch.com/mcp using HTTP, and it doesn't require any authentication.
  • Tools Available: The server provides tools like search_kql_queries, get_kql_query, and list_kql_metadata.

Setup Options:

  1. Guided Setup (Recommended):

    • Use the Command Palette in VS Code to add the server.
    • Enter the server URL and a name, then save and confirm trust.
    • Start the server if necessary.
  2. Manual Setup:

    • User-Level: Configure globally for all projects by editing the mcp.json file in the user directory.
    • Workspace-Level: Configure for a specific project by adding the configuration to .vscode/mcp.json.

Verification:

  • Open Copilot Chat and ensure the kql-search tool is enabled.
  • Test the integration by asking Copilot to find KQL queries.

Troubleshooting:

  • Check server status and logs if tools are not working.
  • Ensure the server URL is correct and the server is enabled.
  • Restart VS Code after making changes.

Security:

  • The server is read-only and does not require credentials.
  • Treat retrieved KQL as untrusted and review before using in production.

Maintenance:

  • Disable or remove the server configuration as needed.
  • Use Settings Sync to share configurations across devices.

This setup allows you to leverage community KQL examples within your development environment, enhancing productivity and collaboration.