Lokka MCP
MCP server for Microsoft Graph and Azure: run a Microsoft 365 tenant in plain language, from Entra groups to Azure costs
- 310 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- With write permissions the agent creates, changes and deletes Microsoft 365 objects and Azure resources.
- The app secret or certificate in the MCP configuration opens access to the tenant.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/lokkaDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- With write permissions the agent creates, changes and deletes Microsoft 365 objects and Azure resources.
- The app secret or certificate in the MCP configuration opens access to the tenant.
This is third-party code. Review the repository files before installing.
What it does
Lokka gives an agent one tool, `Lokka-Microsoft`, that calls Microsoft Graph and Azure Resource Manager. The agent builds a request from a path, a method and parameters, and the server runs it and returns the response. In an ordinary chat this finds conditional access policies, creates a security group with a dynamic rule, or shows which Azure service cost the most last month. Sign-in has four modes: interactive with the default Lokka app, your own Microsoft Entra app, app-only with a certificate or a secret, and a token supplied by the client through `set-access-token`.
Who it is for. Microsoft 365 and Azure administrators who search and change tenant settings by asking an agent.
Good fit when
- Conditional access policies are checked for exclusions, such as a missing emergency access account.
- A security group with a department-based dynamic rule is created without opening the portal.
- You need to see which Intune policies are assigned to the call center group.
- Finance asks which Azure service cost the most last month.
Not a fit when
- The tenant is production and the app has broad permissions: `post`, `patch` and `delete` change real data.
- Company policy forbids sending tenant data to an external model.
- You need a scheduled report with no human involved.
Example request
Find conditional access policies that do not exclude the emergency access account and list their names.MCP
- Transport
- stdio
- Authentication
- OAuth
Environment variables
`TENANT_ID`- Microsoft Entra tenant ID; required everywhere except client token mode.
`CLIENT_ID`- Microsoft Entra application ID; required everywhere except client token mode.
`CLIENT_SECRET`secret- Application secret; needed only for the client secret mode.
`USE_INTERACTIVE`- The value `true` enables interactive sign-in.
`USE_CLIENT_TOKEN`- The value `true` enables the client-provided token mode.
`USE_CERTIFICATE`- The value `true` enables certificate sign-in.
`CERTIFICATE_PATH`- Path to the PEM certificate; needed for certificate mode.
`CERTIFICATE_PASSWORD`secret- Certificate password, if it is encrypted.
`USE_GRAPH_BETA`- The value `false` moves every Graph call to `v1.0`.
Limitations
The server calls the APIs with the rights of the chosen sign-in, so writes and deletes are possible when the app holds such permissions. Graph requests use the `beta` version by default; set `USE_GRAPH_BETA=false` to keep only `v1.0`. App-only modes need `TENANT_ID`, `CLIENT_ID` and an Entra app certificate or secret. In client token mode the token has to be refreshed by hand through `set-access-token`. Installation docs live at lokka.dev.
How to disable. Remove the `Lokka-Microsoft` entry from the MCP configuration and restart the client. Revoke the Entra app and its granted permissions separately in the Microsoft Entra portal.
FAQ
Which sign-in should I start with?
Interactive: a configuration without variables uses the default Lokka app and asks you to sign in. Your own Entra app is connected through `TENANT_ID`, `CLIENT_ID` and `USE_INTERACTIVE=true`.
How do I keep the server read-only?
Grant the Entra app read permissions only. Changes are possible only with permissions the app does not hold.
Which tools does the server have?
`Lokka-Microsoft` calls the Graph or Azure API, `set-access-token` supplies a token, `get-auth-status` shows the sign-in mode and readiness, and `add-graph-permission` requests extra permissions interactively.
How do I turn off the Graph beta version?
Set `USE_GRAPH_BETA=false`: every request goes to `v1.0`, even if the agent asks for `beta`.
How do I connect Lokka to VS Code?
The README has one-click install buttons for VS Code and VS Code Insiders: separate ones for Windows (through `cmd /c npx`) and for macOS and Linux (through `npx`).
Discussion
No questions or reviews yet.
Related
MCP serversA skill with a local index of 27,700 Microsoft Graph endpoints: endpoint search, permissions and API calls from the command line
Microsoft's official MCP server for Azure: the agent sees subscription resources and works with Azure services on your behalf
A self-hosted gateway routes internal MCP tools, authenticates users and records requests for later review.
MCP Gateway
mcp-gateway
A reverse proxy and lifecycle management for MCP servers on Kubernetes and Azure from Microsoft: routing, authorization, roles. For platform teams
A community MCP server for Azure DevOps work items, code and builds, with PAT authentication for on-premises Azure DevOps Server
An agent searches AWS CloudWatch logs, summarizes activity and correlates events across services.
README in short
The server starts through `npx`, and the Microsoft sign-in mode is chosen through environment variables. VS Code has a one-click install, and Claude Desktop needs only an `mcpServers` block.