Install Lokka
This quick start guide will help you set up Lokka with the minimum configuration needed to get started.
If you want to learn more about the advanced configuration options, see the Advanced Install Guide.
Pre-requisites
- Install Node.js
- If you already have Node v22.10 or higher installed you can skip this step.
- Check by running
node -v
at the command prompt.
Configure the agent
You can use the Lokka agent tool with any compatible MCP client and LLM combo.
Claude is the simplest way to get started and provides the best experience. You can use the free version of Claude Desktop to test Lokka (there are daily limits on the free version).
GitHub Copilot Agent in VS Code is another great option.
- Claude
- VS Code
Install Claude Desktop
- Download the latest version of Claude Desktop from https://claude.ai/download
- Install the application by following the instructions on the website.
- Open the application and sign in with your account (you can register for a free account).
Add Lokka to Claude Desktop
- In Claude Desktop, open Settings by clicking on the hamburger icon in the top left corner.
- Select File > Settings (or press
Ctrl + ,
)- On Mac, you can find the settings in the top menu bar under Claude > Settings (or press
Cmd + ,
).
- On Mac, you can find the settings in the top menu bar under Claude > Settings (or press
- In the Developer tab, click Edit Config
- Note: If you don't see the Developer tab, you need to enable it first from
Help
>Enable Developer Mode
.
- Note: If you don't see the Developer tab, you need to enable it first from
- This opens explorer, edit
claude_desktop_config.json
in your favorite text editor. - Add the following configuration to the file.
{
"mcpServers": {
"Lokka-Microsoft": {
"command": "npx",
"args": ["-y", "@merill/lokka"]
}
}
}
- Exit Claude Desktop and restart it.
- Every time you make changes to the code or configuration, you need to restart Claude desktop for the changes to take effect.
- Note: In Windows, Claude doesn't exit when you close the window, it runs in the background. You can find it in the system tray. Right-click on the icon and select Quit to exit the application completely.
Testing the agent
- Open the Claude Desktop application.
- You should see new browser window open and prompt you to sign into your Microsoft tenant.
- Now you can start quering your Microsoft tenant using the Lokka agent tool.
- Some sample queries you can try are:
Get all users in my tenant
Show me the details for John Doe
Change John's department to IT
- Needs User.ReadWrite.All permission to be grantedHow many VMs do I have in my subscription?
- Needs Reader permission to be granted to the Azure subscription
Pre-requisites
- Install the latest version of VS Code
Add Lokka to GitHub Copilot
- One Click Install
- Manual Install
- Start VS Code and then click the button below to install Lokka in VS Code.
- If your browser prompts you to open VS Code, click Open.
- In the VS Code Lokka-Microsoft install page
- Click Install.
- Click the widget icon next to the button and select Start Server.
- This will open a browser window and prompt you to sign into your Microsoft tenant.
Platform | VS Code | VS Code Insiders |
---|---|---|
Windows | ||
macOS/Linux |
If VS Code was not running when you clicked the button, you might need to click the button on this page again to install Lokka.
- In VS Code, open the Command Palette by pressing
Ctrl + Shift +P
(orCmd + Shift + P
on Mac). - Type
MCP: Add
and selectMCP: Add Server...
- Select
Command (stdio)
- Command:
- Windows:
cmd /c npx -y @merill/lokka
- macOS/Linux:
npx -y @merill/lokka
- Windows:
- Name:
Lokka-Microsoft
- Where to install:
Global
- This will open the
settings.json
file in VS Code. File
>Save
to save the file.- Once you hit save, you should see a browser window open and prompt you to sign into your Microsoft tenant.
Starting the MCP server manually
Typically VSCode will automatically start the MCP server when needed, but you can also stop and start the MCP server manually.
- Open the Command Palette again (
Ctrl + Shift +P
) and typeMCP
and selectMCP: List Servers
- Select
Lokka-Microsoft
from the list of servers. - Selet
Start Server
- This will start the Lokka server
- Each time you hit Start you will see a browser window open and prompt you to sign into your Microsoft tenant.
- If you want to stay connected to the same tenant, you can use AppApp-only authentication.
Testing the agent
-
Start a new instance of VS Code (File > New Window)
-
Open
Chat
fromView
→Chat
-
At the bottom of the Chat panel (below the chat box)
- Select
Agent
(if it is showingAsk
orEdit
) - Select
Claude Sonnet 4
or above (if it is showingGPT-40
)
- Select
-
Now you can start querying your Microsoft tenant using the Lokka agent tool.
-
Some sample queries you can try are:
Get all users in my tenant
Show me the details for John Doe
Change John's department to IT
- Needs User.ReadWrite.All permission to be grantedHow many VMs do I have in my subscription?
- Needs Reader permission to be granted to the Azure subscription
If the chat prompts you to install VS GitHub Copilot for Azure, click the rerun without link to continue using Lokka.