Skip to main content
Glama
azure-mcp-pilot

azure-mcp-pilot

by josimarh

IdenGraph

Identity & Access intelligence powered by Microsoft Graph and MCP.

A read-only MCP server that turns natural-language questions into audited answers about Microsoft Entra ID and Azure RBAC — answered by your own Copilot, inside VS Code.

VS Code Marketplace PyPI License: MIT

It never writes. Every create, update, delete, grant, or privilege-activation operation is blocked before routing.

What you can ask

  • Who has Owner on Azure? And who holds Global Administrator in Entra?

  • Which applications were created in my tenant, and which are Microsoft first-party?

  • Which users have no MFA, or rely on weak methods?

  • Which application secrets expire in the next 30 days?

  • Which objects have no owner assigned?

  • What is the blast radius of a given identity?

  • Are we paying for security features we don't use?

66 tools across users, groups, applications, service principals, managed identities, PIM, RBAC, authentication, conditional access, ownership, privilege timeline, licensing posture, and toxic combinations (SoD).

Related MCP server: Microsoft MCP Server for Enterprise

Design principles

These three rules define the behavior, and they matter more than the feature list.

Source separation

Microsoft Graph answers for identity and directory. Azure APIs answer for RBAC and resources. Graph is never treated as a source of truth for Azure RBAC.

No false zero

If a permission is missing, the answer is PERMISSION_DENIED with NOT_EVALUATED coverage — never 0.

"I could not evaluate this" and "this does not exist" are different answers. Conflating them in an audit is worse than not answering at all, because a false zero looks like a clean result.

This applies to licensing too: zero conditional access policies means something entirely different when the feature isn't licensed versus when it's licensed and unused.

Read-only by construction

Only GET, LIST, QUERY, ASSESS, and CORRELATE. The graph_query tool can receive read-only KQL generated from a user request, but it does not accept arbitrary endpoints: the capability registry selects the data source, and the executor blocks mutation operators and external-access constructs before sending the query.

Architecture

flowchart TB
    User(["You"]) -->|natural language| Copilot["Copilot Chat<br/><i>your own model</i>"]
    Copilot <-->|MCP / stdio| Server

    subgraph Server["IdenGraph MCP Server · 66 read-only tools"]
        direction TB
        Router["Capability router<br/><i>intent → capability</i>"]
        Guard{{"Write guard<br/><i>blocks mutations</i>"}}
        Registry[("Capability registry<br/>43 capabilities · 29 domains")]
        Executor["Read-only executor<br/><i>allowlist + validation</i>"]

        Router --> Guard --> Registry --> Executor
    end

    Executor -->|identity & directory| Graph["Microsoft Graph"]
    Executor -->|RBAC & resources| Azure["Azure Management<br/>+ Resource Graph"]

    Graph --> Normalizer["Normalizer & correlation<br/><i>preserves evidence and coverage</i>"]
    Azure --> Normalizer
    Normalizer -->|answer + provenance| Copilot

    style Guard fill:#c62828,color:#fff
    style Server fill:#0B1F3A,color:#fff
    style Normalizer fill:#1565c0,color:#fff

Two details worth highlighting:

The write guard sits before routing, not after. A mutation request is rejected before it can be interpreted as a query.

The normalizer preserves coverage, not just data. Every answer carries where it came from and whether the source could actually be evaluated — which is what makes the no-false-zero rule enforceable rather than aspirational.

How the pieces are distributed

Layer

Artifact

Role

Discovery

VS Code extension

One-click install, prerequisite checks, settings UI

Engine

idengraph on PyPI

The MCP server itself

Model

Your Copilot subscription

No LLM cost to this project or to you

The extension does not replace the Python package — it registers it. The engine runs the same way whether launched by the extension or configured by hand.

Install

Install IdenGraph from the Marketplace, then sign in to Azure:

az login

Open Copilot Chat in agent mode and ask. The extension verifies prerequisites and guides you if anything is missing.

Alternative: manual MCP configuration

Create .vscode/mcp.json:

{
  "servers": {
    "idengraph": {
      "type": "stdio",
      "command": "uvx",
      "args": ["idengraph"],
      "env": { "MOCK_MODE": "false" }
    }
  }
}

Prerequisites

  • Python 3.10+

  • uv

  • Azure CLI with an active session (az login)

Authentication uses DefaultAzureCredential, which reuses your Azure CLI session. There is no API key to manage, and no credential is stored by this project.

Configuration

Setting

Env var

Default

Purpose

idengraph.useMockData

MOCK_MODE

false (extension)

Query fictional data instead of your tenant

idengraph.sanitizeOutput

SANITIZE_FOR_LLM

true

Mask resource names, subscription IDs, and IPs before they reach the model

idengraph.subscriptions

AZURE_SUBSCRIPTIONS

all accessible

Restrict queries to specific subscriptions

The Python package defaults to MOCK_MODE=true so that nothing touches a real tenant without explicit intent. The extension sets it to false, since installing it is already that intent.

Permissions

On Azure: Reader on the subscriptions you want to audit.

On Microsoft Graph, delegated permissions vary by question:

Area

Permission

Users, groups, applications, service principals

Directory.Read.All

Directory roles and directory PIM

RoleManagement.Read.All

Authentication methods and MFA

UserAuthenticationMethod.Read.All

Conditional access

Policy.Read.All

License posture

Organization.Read.All

Missing a permission only marks the matching area as not evaluated. Everything else keeps working — and the affected area reports why it could not be evaluated.

Privacy

Queried data belongs to your tenant and travels between your machine, Microsoft APIs, and the Copilot model you already use. This project sends nothing to third-party servers and collects no telemetry.

By default, SANITIZE_FOR_LLM=true masks resource names, resource groups, subscription IDs, and IP addresses before content reaches the model.

Development

python -m venv .venv
.venv\Scripts\activate        # Windows
# source .venv/bin/activate   # Linux/macOS
pip install -r requirements.txt
cp .env.example .env
python test_smoke.py

All tests run in mock mode and never touch a tenant:

python test_smoke.py
python test_capability_layer.py
python test_tool_annotations.py
python test_tool_catalog_smoke.py

Repository layout

mcp_server.py                       MCP server and tool registration
services/azure_auth.py              credentials, tokens, caching
services/graph_capabilities.py      capability registry
services/capability_router.py       natural language → capability
services/capability_executor.py     validated read-only execution
services/azure_role_definitions.py  authoritative Azure role name resolution
services/azure_pim.py               resource PIM with confirmed coverage
services/entra_licenses.py          tenant licensing and feature availability
services/data/                      mock data used when MOCK_MODE=true
extension/                          VS Code extension (TypeScript)

The published package's surface is the MCP server only — there is no bundled UI or chat orchestrator; the model comes from your own Copilot/MCP client.

Known limitations

  • Agent Identity detection is heuristic where the directory exposes no dedicated type. Results are labeled as such, never presented as fact.

  • Public IP indicates a public address, which does not prove workload exposure.

  • Without RoleManagement.Read.All, directory PIM reports as not evaluated rather than empty.

  • License posture currently cross-references PIM and Conditional Access. Capabilities still marked not_integrated in the registry are not probed, and deliberately return no verdict.

License

MIT — see LICENSE.

Available Tools

66 tools
agent_natural_language_queryC
Read-onlyIdempotent

Interpreta perguntas sobre Agent Identities em linguagem natural.

Inputs: question (required), limit.

assess_privileged_mfaB
Read-onlyIdempotent

Assessment de MFA para usuários privilegiados (sem MFA ou métodos fracos).

Inputs: no named parameters.

compute_identity_blast_radiusB
Read-onlyIdempotent

Estima o blast radius (alcance) de uma identidade (subscriptions, management groups, capacidade de conceder acesso).

Inputs: identity_identifier (required).

detect_toxic_combinationsB
Read-onlyIdempotent

Detecta toxic combinations / violações de Separation of Duties com evidência.

Inputs: limit.

export_privilege_timeline_reportC
Read-onlyIdempotent

Gera relatório de timeline com top grants/revokes por identidade, role e escopo.

Inputs: top, days.

get_agent_relationshipsC
Read-onlyIdempotent

Resolve Agent → Owners → Identity → Blueprint → Graph Permissions → Azure RBAC.

Inputs: agent_identifier (required).

get_agents_by_ownerA
Read-onlyIdempotent

Lista Agents sob responsabilidade de um owner (UPN, nome ou objectId).

Inputs: owner_identifier (required), limit.

get_authentication_methods_summaryB
Read-onlyIdempotent

Resumo de registro de MFA e capacidade passwordless do tenant.

Inputs: no named parameters.

get_authentication_strength_summaryB
Read-onlyIdempotent

Resumo enterprise de força de autenticação (forte/misto/fraco) e adoção de passkey/FIDO2.

Inputs: no named parameters.

get_environment_summaryB
Read-onlyIdempotent

Get a read-only high-level snapshot of the accessible Azure environment.

Inputs: no named parameters.

get_identity_access_summaryA
Read-onlyIdempotent

Retorna resumo de identidade e RBAC:

  • total de usuários

  • usuários habilitados/desabilitados

  • usuários com permissões diretas

  • usuários desabilitados com roles ativas

Inputs: no named parameters.

get_identity_privilege_timelineC
Read-onlyIdempotent

Retorna timeline de privilégios para uma identidade específica (UPN, nome ou objectId).

Inputs: identity_identifier (required), days, limit.

get_license_postureA
Read-onlyIdempotent

Cruza as licenças assinadas do tenant com o uso real dos recursos de segurança que elas habilitam.

Use para perguntas como:

  • Estamos pagando por recursos que não usamos?

  • Temos Entra ID P2? O PIM está sendo usado?

  • Quantas licenças estão ociosas?

Distingue explicitamente 'não licenciado', 'licenciado e não configurado' e 'licenciado mas não avaliado', porque as três levam a ações diferentes.

Inputs: no named parameters.

get_management_group_inventoryC
Read-onlyIdempotent

Retorna inventário de Management Groups visíveis para auditoria de governança.

Inputs: limit.

get_owned_objectsC
Read-onlyIdempotent

Ownership 360: objetos (Groups, Applications, Service Principals, Agents, Blueprints) sob responsabilidade de um usuário.

Inputs: user_identifier (required), limit.

get_pim_state_summaryB
Read-onlyIdempotent

Retorna comparativo de estados PIM (Active vs Eligible vs Permanent).

Inputs: no named parameters.

get_resource_groups_countA
Read-onlyIdempotent

Retorna a quantidade de Resource Groups visíveis no escopo autenticado.

Inputs: no named parameters.

get_role_risk_scoreC
Read-onlyIdempotent

Calcula score de risco (0-100) para uma role privilegiada de Entra ID ou Azure RBAC.

Inputs: role (required), provider (required), scope, state.

get_subscription_direct_access_summaryC
Read-onlyIdempotent

Resumo de role assignments diretos em escopo de subscription (inclui privilegiados).

Inputs: limit.

get_subscriptions_countA
Read-onlyIdempotent

Retorna exclusivamente a quantidade de subscriptions Azure visíveis para a identidade autenticada.

Use esta ferramenta para perguntas como:

  • Quantas subscriptions existem?

  • Quantas assinaturas Azure eu tenho?

  • Quantas subscriptions consigo visualizar?

NÃO use search_official_guidance para descobrir quantidade de subscriptions.

Inputs: no named parameters.

get_tenant_licensesB
Read-onlyIdempotent

Lista os SKUs licenciados do tenant, com unidades habilitadas, consumidas e ociosas, além dos planos de serviço ativos.

Inputs: no named parameters.

get_user_authentication_methodsB
Read-onlyIdempotent

Retorna métodos de autenticação e status de MFA/passwordless de um usuário.

Inputs: user_identifier (required).

get_user_effective_azure_accessB
Read-onlyIdempotent

Resolve acesso efetivo Azure RBAC de um usuário (direto + herdado via grupos transitive).

Inputs: user_identifier (required), limit.

graph_answer_identity_questionA
Read-onlyIdempotent

Interpreta uma pergunta de identidade em linguagem natural, escolhe a capability correta e executa a consulta de forma validada.

Use para perguntas abertas como:

  • "Quais usuários possuem Global Administrator?"

  • "Quais aplicações possuem Directory.ReadWrite.All?"

  • "Quem pode ativar Owner via PIM?"

Respeita a separação de fontes: Microsoft Graph para identidade/diretório e APIs Azure para Azure RBAC/recursos. Retorna erro explícito quando a capability não existe ou quando falta permissão. Nunca inventa chamadas Graph.

Inputs: question (required), limit.

graph_assessmentB
Read-onlyIdempotent

Executa assessment de identidade baseado no capability registry, declarando explicitamente cobertura EVALUATED / PARTIAL / NOT_EVALUATED por domínio.

'scope' aceita: identity, directory, privileged, workload, azure. Nunca reporta NOT_EVALUATED como zero.

Inputs: limit, scope.

graph_directory_objectsC
Read-onlyIdempotent

Coleta objetos de diretório de um ou mais domínios e correlaciona a mesma identidade entre eles, preservando a fonte de cada evidência.

'domains' aceita lista separada por vírgula (ex.: "users,service_principals,directory_roles"). Se vazio, os domínios são inferidos da pergunta.

Inputs: limit, domains, question.

graph_discover_capabilitiesA
Read-onlyIdempotent

Capability discovery de identidade.

Use ANTES de consultar quando não souber qual domínio/endpoint atende a pergunta.

  • Se 'question' for informado, retorna o roteamento sugerido (domínio, capability, fonte, permissões necessárias) SEM executar nada.

  • Se 'domain'/'source' forem informados, lista as capacidades catalogadas.

Fontes possíveis: microsoft_graph (identidade/diretório), azure_resource_graph / azure_management / azure_authorization (recursos e Azure RBAC).

Inputs: domain, source, question, include_gaps.

graph_getC
Read-onlyIdempotent

Obtém um objeto específico de uma capability catalogada (operação 'get').

'id' deve ser um GUID ou identificador simples; valores fora desse padrão são rejeitados.

Inputs: id (required), capability_id (required), select.

graph_listB
Read-onlyIdempotent

Lista objetos de uma capability catalogada (operação 'list').

'capability_id' precisa existir no registry (use graph_discover_capabilities). 'filter' aceita apenas campos declarados como suportados pela capability. Endpoints arbitrários são rejeitados.

Inputs: capability_id (required), limit, filter, select.

graph_permissionsB
Read-onlyIdempotent

Retorna as permissões Microsoft Graph / Azure necessárias para uma consulta, incluindo suporte a delegated e application permission e requisito de licença.

Não executa consulta: serve para validar viabilidade antes de consultar.

Inputs: question, capability_id.

graph_queryB
Read-onlyIdempotent

Executa consulta parametrizada em fontes que aceitam query (ex.: Azure Resource Graph).

Somente leitura: operadores KQL de escrita ou de acesso externo são bloqueados. 'scope' é validado contra o formato de escopo Azure.

Inputs: capability_id (required), limit, query, scope.

graph_relationshipB
Read-onlyIdempotent

Consulta relacionamentos de um objeto de diretório (membros, owners, membership transitiva, app role assignments de um principal).

Exemplos de capability_id:

  • graph.groups.members

  • graph.groups.transitive_membership

  • graph.applications.owners

  • graph.service_principals.owners

  • graph.app_role_assignments.assigned_to

Inputs: id (required), capability_id (required), limit.

graph_role_assignmentsA
Read-onlyIdempotent

Consulta atribuições de privilégio mantendo as fontes separadas:

  • Directory roles e PIM de diretório via Microsoft Graph

  • Azure RBAC via Azure Resource Graph

Não assume que Microsoft Graph cobre Azure RBAC.

Inputs: limit, include_pim, include_azure_rbac, include_directory_roles.

iam_natural_language_queryC
Read-onlyIdempotent

Interpreta uma pergunta de IAM em linguagem natural e responde com correlação Entra + Azure. Sempre retorna resumo e detalhes compreensíveis, sem depender de frase exata.

Inputs: question (required), limit.

identity_360A
Read-onlyIdempotent

Identity 360: visão completa de uma identidade — quem é, a que possui acesso (Entra + Azure, direto/grupo/PIM), como recebeu, ownership e risco (blast radius, findings). Aceita UPN, displayName ou objectId.

Inputs: user_identifier (required).

list_agent_identitiesB
Read-onlyIdempotent

Lista inventário de Agent Identities com owner, blueprint, permissões e risco.

Inputs: limit, status.

list_application_provenanceA
Read-onlyIdempotent

Diferencia app registrations criadas por usuários no seu tenant das aplicações nativas da Microsoft (first-party) e de apps de terceiros consentidos.

Classificação baseada em appOwnerOrganizationId (sinal autoritativo do diretório), não em heurística de nome.

'provenance' aceita: all, tenant (criadas no seu tenant), microsoft (nativas), thirdparty (terceiros), managedidentity.

Use para perguntas como:

  • "Quais aplicações foram criadas pelos usuários?"

  • "Qual a diferença entre app registrations próprias e nativas?"

  • "Quantas aplicações são nativas da Microsoft?"

Inputs: limit, provenance, include_managed_identities.

list_application_secrets_expiringB
Read-onlyIdempotent

Lista secrets expirados ou próximos da expiração em aplicações do Entra ID.

Inputs: days, limit.

list_applications_without_ownersC
Read-onlyIdempotent

Lista aplicações sem owner definido no Entra ID.

Inputs: limit.

list_azure_role_assignmentsB
Read-onlyIdempotent

Lista role assignments Azure RBAC (User, Group, Service Principal e Managed Identity).

Inputs: limit.

list_deny_assignmentsC
Read-onlyIdempotent

Lista deny assignments do Azure.

Inputs: limit.

list_disabled_users_with_active_rolesA
Read-onlyIdempotent

Lista usuários desabilitados no Entra ID que ainda possuem role assignments diretos ativos.

Inputs: limit.

list_entra_usersB
Read-onlyIdempotent

Lista usuários do Microsoft Entra ID com nome, UPN e e-mail.

Inputs: limit.

list_graph_critical_application_permissionsC
Read-onlyIdempotent

Lista aplicações/service principals com Microsoft Graph Application Permissions críticas.

Inputs: limit.

list_objects_without_ownerB
Read-onlyIdempotent

Lista objetos sem owner (Groups, Applications, Service Principals, Agents, Blueprints).

Inputs: limit.

list_orphan_azure_role_assignmentsC
Read-onlyIdempotent

Lista role assignments órfãos (principal não resolvido no tenant visível).

Inputs: limit.

list_pim_role_statesB
Read-onlyIdempotent

Lista atribuições privilegiadas classificadas por estado: Active, Eligible e Permanent.

Inputs: limit, include_permanent.

list_privileged_azure_role_assignmentsB
Read-onlyIdempotent

Lista role assignments privilegiados em Azure RBAC (Owner, User Access Administrator, Contributor).

Inputs: limit.

list_privilege_timeline_eventsC
Read-onlyIdempotent

Lista eventos de ganho/perda/ativação de privilégios no período informado.

Inputs: days, limit, action, provider.

list_public_ip_resourcesB
Read-onlyIdempotent

List Public IP resources. This does not prove that a workload is actually internet-exposed.

Inputs: limit.

list_resource_groupsC
Read-onlyIdempotent

Lista Resource Groups com filtros read-only por nome.

Inputs: limit, name_contains.

list_resourcesB
Read-onlyIdempotent

List Azure resources using controlled read-only filters. Use full Azure resource type when filtering, e.g. microsoft.compute/virtualmachines.

Inputs: limit, name_contains, resource_type.

list_top_blast_radiusC
Read-onlyIdempotent

Ranking de identidades por maior blast radius.

Inputs: limit.

list_usersC
Read-onlyIdempotent

Lista usuários do Entra ID visíveis para a identidade autenticada.

Inputs: limit, disabled_only, name_contains.

list_users_with_direct_permissionsC
Read-onlyIdempotent

Lista usuários com role assignments diretos no Azure RBAC.

Inputs: limit, disabled_only.

list_users_without_mfaC
Read-onlyIdempotent

Lista usuários sem MFA registrado.

Inputs: limit.

list_users_with_passkeyC
Read-onlyIdempotent

Lista usuários com passkey/FIDO2 registrado.

Inputs: limit.

list_users_with_weak_authenticationC
Read-onlyIdempotent

Lista usuários com métodos fracos registrados (sms/voice/email/password), com evidência técnica.

Inputs: limit, include_mfa_registered.

pim_natural_language_queryC
Read-onlyIdempotent

Interpreta perguntas de PIM em linguagem natural e retorna resposta com resumo e detalhes.

Inputs: question (required), limit.

run_agent_assessmentC
Read-onlyIdempotent

Executa assessment específico de Agent Identities e retorna ranking de risco.

Inputs: top_risks.

run_enterprise_identity_auditB
Read-onlyIdempotent

Executa auditoria IAM enterprise consolidada (Entra + Azure + subscriptions + management groups).

Inputs: top_risks.

run_iam_assessmentB
Read-onlyIdempotent

Executa um IAM Assessment no ambiente e retorna riscos principais e plano de remediação.

Inputs: top_risks.

search_official_guidanceB
Read-onlyIdempotent

Return curated official Microsoft Learn references relevant to an Azure topic or best-practice question.

Inputs: topic (required), limit.

summarize_application_provenanceA
Read-onlyIdempotent

Resumo executivo da procedência das aplicações do tenant: quantas estão sob sua governança (criadas no tenant) versus pré-provisionadas pela Microsoft, com percentuais e foco de governança.

Inputs: no named parameters.

summarize_privilege_timelineB
Read-onlyIdempotent

Resumo da timeline de privilégios (ganhos, revogações, ativações e anomalias).

Inputs: days.

timeline_natural_language_queryC
Read-onlyIdempotent

Interpreta perguntas de auditoria temporal de privilégios em linguagem natural.

Inputs: question (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 66 tools

    Disambiguation2/5

    Many tools overlap heavily: list_users and list_entra_users both list Entra users; the generic graph_* tools (graph_list, graph_get, graph_query, graph_relationship) duplicate specific list_*/get_* tools; and multiple assessment/NL-query tools (run_iam_assessment, run_enterprise_identity_audit, graph_assessment, iam_natural_language_query, graph_answer_identity_question) have unclear boundaries. An agent would struggle to pick the right tool without opening descriptions.

    Naming Consistency4/5

    Nearly all tool names use lower snake_case with a verb_noun pattern (list_users, get_role_risk_score, run_iam_assessment, graph_list), so the set is predictable overall. Minor deviations like identity_360, graph_directory_objects, and the *_natural_language_query suffix are readable but break the strict verb_noun convention.

    Tool Count1/5

    66 tools is extreme for an MCP server and far exceeds the 15-tool guideline. The surface contains many redundant wrappers and overlapping assessment/query tools, so the count is not justified by distinct capabilities.

    Completeness4/5

    For a read-only Azure identity and security assessment server, the surface is broad: it covers users, RBAC, PIM, MFA, applications, agents, licenses, resources, and ownership. Minor gaps exist around remediation or write operations, but those may be intentionally out of scope.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides secure access to Microsoft Entra ID (Azure AD) resources including users, devices, and applications through Microsoft Graph API. Enables querying organizational data with comprehensive audit logging to Azure Blob Storage.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to inspect and audit Azure Landing Zones by inventorying resources, auditing tagging, evaluating policy compliance, and detecting infrastructure drift, all in read-only mode.
      -