lokka

MCP.Pizza Chef: merill

Lokka is an MCP server that integrates Microsoft Graph and Azure Resource Manager APIs, enabling AI models to query and manage Microsoft 365 and Azure tenants using natural language commands. It supports seamless interaction with Microsoft services, allowing users to automate tenant management tasks such as creating security groups, querying policies, and managing device configurations through AI-powered workflows.

Use This MCP server To

Query Microsoft 365 tenant data using natural language Manage Azure resources via AI-driven commands Create and modify security groups dynamically Retrieve and analyze conditional access policies List and manage Intune device configuration policies Integrate Microsoft Graph data into AI chat clients Automate tenant management tasks with AI Enable natural language control over Microsoft 365 and Azure environments

README

Lokka

npm version

Lokka is a model-context-protocol server for the Microsoft Graph and Azure RM APIs that allows you to query and managing your Azure and Microsoft 365 tenants with AI.

Lokka Demo - user create demo

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 account
  • Show me all the Intune device configuration policies assigned to the 'Call center' group
  • What was the most expensive service in Azure last month?

How does Lokka work?

Getting started

See the docs for more information on how to install and configure Lokka.

Components

Tools

  1. Lokka-Microsoft
    • Call Microsoft Graph & Azure APIs. Supports querying Azure and Microsoft 365 tenants. Updates are also supported if permissions are provided.
    • Input:
      • 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)
    • Returns: Results from the Azure or Graph API call.

Environment Variables

The configuration of the server is done using environment variables. The following environment variables are required:

Name Description
TENANT_ID The ID of the Microsoft Entra tenant.
CLIENT_ID The ID of the application registered in Microsoft Entra.
CLIENT_SECRET The client secret of the application registered in Microsoft Entra.

Installation

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"],
      "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 FAQ

How do I connect Lokka to my Microsoft 365 tenant?
You authenticate Lokka using Azure AD credentials and grant it permissions to access Microsoft Graph and Azure RM APIs for your tenant.
Can Lokka work with any AI model or chat client?
Yes, Lokka is compatible with any MCP client or AI model that supports the Model Context Protocol, including Claude Desktop and others.
What kind of Microsoft services does Lokka support?
Lokka supports Microsoft Graph APIs and Azure Resource Manager APIs, covering services like security groups, conditional access policies, and Intune device configurations.
Is Lokka secure for managing sensitive tenant data?
Yes, Lokka follows secure authentication and authorization practices via Azure AD and scopes access according to granted permissions.
Can I automate complex workflows with Lokka?
Yes, Lokka enables multi-step natural language commands to automate tenant management workflows.
Where can I find documentation and examples for using Lokka?
Visit https://lokka.dev for detailed guides, API references, and usage examples.
Does Lokka support dynamic queries and rule creation?
Yes, you can create dynamic security groups and query policies using natural language commands.
How does Lokka handle updates to Microsoft APIs?
Lokka is maintained to stay compatible with Microsoft Graph and Azure RM API changes, ensuring continuous functionality.