Skip to main content

Interactive apps

In hosts that support MCP Apps (like Claude Desktop and VS Code with GitHub Copilot), Lokka ships six interactive apps that render right inside the chat. In hosts without MCP Apps support everything still works β€” you just get text results instead of the visual tools.

tip

Type lokka help in the chat for a visual tour of everything below, with one-click launchers and sample prompts.

Say…Opens
lokka helpA visual tour of all of Lokka's tools
open lokkaThe Graph explorer
lokka settingsThe Settings app for Connections + Guardrails
lokka sign in (or lokka auth)The connections manager
lokka permissionsThe permissions manager
lokka guardrailsThe Guardrails policy editor

Graph explorer β€” open lokka​

The explorer opens automatically whenever the AI runs a Graph query, showing exactly what was called β€” and it's a full query workbench you can drive yourself:

  • Endpoint IntelliSense β€” type a path and autocomplete over 28,000+ Graph endpoints (v1.0 and beta), generated from the official OpenAPI spec. Paste a full Graph URL and it splits into path + query parameters automatically.
  • Resource-aware query IntelliSense β€” inside $filter, $select, $orderby and $expand values, Lokka knows which entity your path returns and suggests its actual properties (with types), then valid operators for each property, then value templates. Operators that need Entra advanced queries are marked ⚑ β€” picking one automatically enables ConsistencyLevel: eventual and adds $count=true for you.
  • Built-in parameter help β€” every OData parameter row has an β“˜ button with condensed reference content (operators, syntax, examples you can apply with one click) and links to the full Microsoft Learn pages.
  • Results your way β€” a sortable, filterable table (virtualized for huge result sets), a collapsible color-coded JSON tree, or raw JSON. Click any row to drill into the full record.
  • Fetch all pages β€” pagination with live progress; cancelling keeps everything fetched so far.
  • Code snippets β€” turn the current request into PowerShell (Invoke-MgGraphRequest), raw HTTP, C#, Go, Java, JavaScript, PHP, Python or Graph CLI.
  • Export & share β€” download results as JSON or CSV, copy to clipboard, or open the request in Microsoft Graph Explorer. Results stay private to the explorer until you click Add to context or Ask β€” you decide what the AI sees.
  • Permissions tab β€” shows the permissions required for the current endpoint vs. what your token has, with one-click consent. When a query fails with 403, a Fix permissions banner takes you straight there.
  • Samples & history β€” a library of common queries (users, groups, sign-in logs, Conditional Access…) and a session history to replay earlier requests.
  • When several tenants are signed in, a small indicator under the method shows which tenant domain the result ran against.

Settings β€” lokka settings​

Use this when you want the two most common configuration surfaces in one place:

  • Connections for sign-in, tenant switching, and connection edits.
  • Guardrails for policy changes, tenant-scoped rules, and blocked-request recovery.

Guardrails are off by default, so Lokka runs what the model asks unless you turn enforcement on. During testing, you can turn Guardrails on to constrain model tool calls by HTTP method, allowed/blocked API path, or specific resource id such as groups, users, sites, applications, and devices. Direct Graph Explorer runs are user-driven and are not blocked by guardrails.

Permissions stays in its dedicated app and inside the connection editor, so the Settings app stays focused on the two surfaces people revisit most often.

Connections β€” lokka sign in​

Work across multiple tenants without restarting anything:

  • Sign in as a user (browser sign-in with device-code fallback) or as a service principal β€” with a client secret or a PEM certificate. SP secrets and certificate passwords are stored encrypted in your OS keychain when you save the connection (never in a file), or held in memory only if you don't.
  • Guided app creation β€” don't have an app registration? A built-in step-by-step guide shows how to create one in the Entra portal, or click ✨ Create it for me to open a wizard. Name the app (default Lokka), choose a client secret or a certificate, and pick the Microsoft Graph application permissions to grant (defaulting to User.Read.All, with autocomplete from your tenant's permission catalog). Lokka then creates the registration with your signed-in account (requesting Application.ReadWrite.All + AppRoleAssignment.ReadWrite.All consent the first time β€” an admin or Application Developer role is required), grants admin consent for the chosen permissions, attaches the credential, and shows live progress while it polls until the new app has replicated through the directory and signs in. The secret is stored in your OS keychain; certificates are saved under ~/.lokka/certs with owner-only permissions. Any permissions that couldn't be granted (e.g. without admin rights) are still added to the app so you can consent to them later in the Entra portal.
  • Choose the sign-in app β€” user sign-in uses the Microsoft Graph PowerShell public client (14d82eec-…, already present in most tenants) by default. Under Advanced you can switch to the Lokka app or your own custom public-client app id (inline setup steps included). If a sign-in doesn't complete, Lokka offers a one-click retry with the other built-in app. This applies to user (delegated) sign-in only β€” service principals always use their own app.
  • Stay signed in β€” user sign-ins are remembered across restarts by default: tokens are cached in your OS credential store (macOS Keychain, Windows DPAPI, Linux libsecret) and Lokka reconnects silently at launch, so there's no login prompt every time. Uncheck Stay signed in when connecting for a session-only sign-in; removing a connection forgets it. Set LOKKA_DISABLE_TOKEN_CACHE=true to turn persistence off entirely.
  • Environments: Global and US Government clouds.
  • Connections are grouped by tenant, so multiple connections to the same tenant (e.g. your user sign-in plus an app you created there) appear together under a tenant heading. See every connection's tenant name, domain, account and permission count β€” including the connection Lokka started with β€” and switch the active connection with one click. Each row shows a status dot (green when a live token is held, gray when not), and for service principals the app registration's name (cached across restarts), its client ID, a key or certificate icon showing how it authenticates, and a click on the name opens the app registration in the Entra portal. All Graph and Azure calls route through the active connection.
  • Reconnect any connection to refresh its token β€” re-signing in a user connection to pick up newly consented delegated scopes, or refreshing a service principal so newly granted application roles take effect. The Edit (pencil) button on every connection opens a tabbed editor: set a friendly display name, swap an app-only connection's credential (new client secret or certificate, verified before saving), and manage permissions β€” for user connections search the Graph permission catalog, add scopes, and consent to them right there; for app-only connections search application permissions and Grant them β€” Lokka adds them to the app registration and admin-consents them using a signed-in admin in the same tenant (no fragile consent URLs), plus a deep link to the app's API permissions in Entra.
  • The app-creation wizard shows which tenant the new app will be created in, so there's no ambiguity about where it lands.
  • The AI can switch too: say "switch lokka to my dev tenant" and the switch-lokka-connection tool fuzzy-matches the tenant by name, domain, ID or username. When connections change, Lokka tells the model so it re-runs queries instead of reusing results from the previous tenant (every result is also stamped with the connection it ran against).

Saved connections persist until you remove them; removing a connection also clears its keychain entries.

Permissions β€” lokka permissions​

See what Lokka can access and grant more when needed:

  • Currently consented permissions, read live from your token.
  • Search 1,100+ Graph permissions (delegated and application) with plain-English descriptions and admin-consent flags, sourced from the same catalog Graph Explorer uses.
  • Pick and consent in one flow β€” the consent screen is always shown (prompt=consent), and Lokka then refreshes with a brand-new token so the new permissions apply immediately. App-only connections get the tenant admin-consent link instead.
  • The AI can pre-select for you: after a 403 it opens this app with the missing permission already ticked β€” you just approve.

Guardrails β€” lokka guardrails (Experimental)​

Put optional hard limits on model tool calls. The AI can read the guardrails but can never change them β€” only you can, here. Guardrails are off by default; when you enable enforcement, rules are checked server-side on model-originated Lokka calls before any request leaves your machine. Direct user clicks in Graph Explorer intentionally bypass guardrails.

A two-pane editor: scopes on the left (a Global policy plus optional per-tenant rules, picked from your connections), the policy on the right with three sections:

  • Enable guardrails enforcement β€” a top-level checkbox. When unchecked, Lokka runs everything the model requests without method, API path, or resource limits. You can still edit and save rules while enforcement is off.
  • HTTP methods β€” toggle which verbs are allowed. When guardrails are enabled, the default policy is GET only (POST/PUT/PATCH/DELETE off), so model tool calls are read-only until you opt into writes.
  • API allow/deny β€” either allow all APIs except a deny list, or block all except an allow list, with editable path patterns (/users, /groups/*) and Graph path autocomplete.
  • Resource scoping β€” for any collection (groups, users, sites, …), limit item access to specific ids. An allowed group id permits /groups/{id} and child paths such as /groups/{id}/members; other group ids are blocked. Add ids by searching the directory by name (the friendly name is shown next to the id) or by pasting a GUID/UPN.

When enforcement is on, Global and per-tenant rules combine, most-restrictive-wins β€” a model tool call must pass both. When something is blocked, Lokka tells the AI exactly which rule stopped it (e.g. "POST is disabled by the Global method policy") and prompts it to open this app so you can adjust the rule, then re-run. Rules are stored in ~/.lokka/guardrails.json.

Guardrails also remembers the latest blocked request for the current Lokka session. Opening the app after a block takes you to the relevant Global or tenant rule and shows a summary of every rule that contributed. Focused fixes let you allow the blocked method, add an exact or broader API path, remove a matching deny rule, add an attempted resource id when it is not yet allowed, or remove that collection's resource scoping. The retained context contains only the method, normalized path, tenant, and blocking rules β€” never request bodies or query values.

Help β€” lokka help​

A visual tour of all of the above: capability cards with "Open it now" launchers, copyable sample prompts, and pro tips (fixing 403s, fetch-all, ConsistencyLevel).

Tools reference​

Tools the AI can call directly:

ToolPurpose
Lokka-MicrosoftRun any Microsoft Graph or Azure Resource Management request
open-graph-explorerOpen the Graph explorer (optionally pre-filled with a path)
open-lokka-connectionsOpen the connections manager
open-lokka-settingsOpen the settings app
open-lokka-permissionsOpen the permissions manager (optionally with permissions pre-selected for consent)
open-lokka-helpOpen the help tour
lokka-list-connectionsList signed-in tenant connections and which is active
switch-lokka-connectionSwitch the active tenant connection (fuzzy-matched)
get-auth-status / set-access-token / add-graph-permissionAuthentication status and token management

A further set of internal tools (prefixed lokka-) powers the app UIs and is hidden from the AI in MCP Apps hosts.