Lokka
Lokka is a model-context-protocol server for the Microsoft Graph and Azure RM APIs that allows you to query and manage your Azure and Microsoft 365 tenants with AI.
接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y @merill/[email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
claude mcp add merill-lokka -- npx -y @merill/lokka@2.1.2在終端機中執行。
{ "mcpServers": { "merill-lokka": { "command": "npx", "args": [ "-y", "@merill/[email protected]" ] } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
Please see Lokka.dev for how to use Lokka with your favorite AI model and chat client.
Lokka lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things in your Azure and Microsoft 365 tenant through the Microsoft APIs.
e.g.:
Create a new security group called 'Sales and HR' with a dynamic rule based on the department attribute.Find all the conditional access policies that haven't excluded the emergency access accountShow me all the Intune device configuration policies assigned to the 'Call center' groupWhat was the most expensive service in Azure last month?
Lokka now supports multiple authentication methods to accommodate different deployment scenarios:
For user-based authentication with interactive login, you can use the following configuration:
This is the simplest config and uses the default Lokka app.
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"]
}
}
}
If you wish to use a custom Microsoft Entra app, you can create a new app registration in Microsoft Entra and configure it with the following environment variables:
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"],
"env": {
"TENANT_ID": "<tenant-id>",
"CLIENT_ID": "<client-id>",
"USE_INTERACTIVE": "true"
}
}
}
}
Traditional app-only authentication. You can use either certificate (recommended) or client secret authentication with the following configuration.
See Install Guide for more details on how to create an Entra app.
App only authentication using a PEM-encoded client certificate:
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"],
"env": {
"TENANT_ID": "<tenant-id>",
"CLIENT_ID": "<client-id>",
"CERTIFICATE_PATH": "/path/to/certificate.pem",
"CERTIFICATE_PASSWORD": "<optional-certificate-password>",
"USE_CERTIFICATE": "true"
}
}
}
}
For comfort, in order to convert a PFX client certificate to a PEM-encoded certificate:
openssl pkcs12 -in /path/to/cert.pfx -out /path/to/cert.pem -nodes -clcerts
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"],
"env": {
"TENANT_ID": "<tenant-id>",
"CLIENT_ID": "<client-id>",
"CLIENT_SECRET": "<client-secret>"
}
}
}
}
Token-based authentication where the MCP Client provides access tokens:
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"],
"env": {
"USE_CLIENT_TOKEN": "true"
}
}
}
}
When using client-provided token mode:
USE_CLIENT_TOKEN=trueset-access-token tool to provide a valid Microsoft Graph access tokenget-auth-status tool to verify authentication statusset-access-tokenset-access-token: Set or update access tokens for Microsoft Graph authenticationget-auth-status: Check current authentication status and capabilitiesadd-graph-permission: Request additional Microsoft Graph permission scopes interactivelyLokka now supports controlling the default Microsoft Graph API version used for all requests:
beta version for access to latest featuresUSE_GRAPH_BETA=false to force all requests to use v1.0 versiongraphApiVersion parameter in individual requests (unless USE_GRAPH_BETA=false)When USE_GRAPH_BETA=false, all Graph API calls will use the stable v1.0 version, even if beta is explicitly requested in the graphApiVersion parameter.
See the docs for more information on how to install and configure Lokka.
Lokka-Microsoft
apiType (string): Type of Microsoft API to query. Options: 'graph' for Microsoft Graph (Entra) or 'azure' for Azure Resource Management.path (string): The Azure or Graph API URL path to call (e.g. '/users', '/groups', '/subscriptions').method (string): HTTP method to use (e.g., get, post, put, patch, delete)apiVersion (string): Azure Resource Management API version (required for apiType Azure)subscriptionId (string): Azure Subscription ID (for Azure Resource Management).queryParams (string): Array of query parameters like $filter, $select, etc. All parameters are strings.body (JSON): The request body (for POST, PUT, PATCH)set-access-token (New in v0.2.0)
accessToken (string): The access token obtained from Microsoft Graph authenticationexpiresOn (string, optional): Token expiration time in ISO formatget-auth-status (New in v0.2.0)
The configuration of the server is done using environment variables. The following environment variables are supported:
Lokka is free and ad-free, with no investors behind it. If it saves you time, please consider sponsoring me on GitHub. 💙
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your
claude_desktop_config.json:
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"]
}
}
}
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"],
"env": {
"TENANT_ID": "<tenant-id>",
"CLIENT_ID": "<client-id>",
"CLIENT_SECRET": "<client-secret>"
}
}
}
}
Make sure to replace <tenant-id>, <client-id>, and <client-secret> with the actual values from your Microsoft Entra application. (See Install Guide for more details on how to create an Entra app and configure the agent.)
Lokka is a Model Context Protocol (MCP) server for Microsoft Graph.
{ "mcpServers": { "merill-lokka": { "command": "npx", "args": [ "-y", "@merill/[email protected]" ] } }}工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
@merill/lokka 透過 stdio 在本機執行。
上次檢查時間:2026-11-17。 Lokka is a Model Context Protocol (MCP) server for Microsoft Graph.