MCP KQL Server 是一个微软云平台(MCP)服务器,可通过 Azure CLI 认证针对 Azure Data Explorer 执行 KQL 查询,为数据查询提供便捷途径。
uv:pip install uv
uvx venv
source .venv/bin/activate # 在 Windows 上使用:.venv\Scripts\activate
uvx pip install .
使用以下命令启动服务器:
uvx run start
服务器将在 http://0.0.0.0:5000 上可用。
curl -X POST http://localhost:5000/auth
curl -X POST http://localhost:5000/execute \
-H "Content-Type: application/json" \
-d '{"query": "cluster('\''mycluster'\'').database('\''mydb'\'').MyTable | take 10"}'
在 claude_desktop_config.json 中配置服务器,以在 Claude Desktop 中启用 kql_execute 工具。工具详细信息请参阅 mcp_config.yaml。
az)az login