
Entrapulse Polyarchy
io.github.darrenjrobinson由 GitHub 账号 darrenjrobinson 发布v0.3.1更新于 Oct 29, 2026
Interactive Entra ID identity relationship visualization — the 2003 polyarchy, live as an MCP App
概览
在支持 MCP Apps 的客户端中渲染 Microsoft Entra ID 身份关系的交互式 D3 力导向图,并可输出 JSON 关系报告。
- 可以做什么
- 以某人为焦点、按姓名搜索或按用户 ID 打开交互式关系图
- 按姓名或 UPN 搜索人员,并展开某个节点的组织、群组、访问权限与属性关系
- 按共享属性(含嵌套目录属性路径)对人员做分组透视
- 返回包含经理链、直接下属、群组成员、目录角色与应用分配的 JSON 结构化报告
- 传入 Graph 访问令牌并查询认证状态
- 适用场景
- 适合需要查看或解释 Microsoft Entra ID 租户中人员、经理、群组、角色与应用之间关系时使用,既可在兼容的 MCP 客户端中可视化浏览,也可获取结构化 JSON 供助手分析。
- 运行要求
- 通过 npx 在本地 Node.js 上运行,可视化界面需要支持 MCP Apps 的宿主。需要 Microsoft Entra ID 租户并登录;默认使用微软第一方 Graph Command Line Tools 公共客户端,也可通过 TENANT_ID 与 CLIENT_ID 使用自有应用注册,另可选 CLIENT_SECRET、USE_DEVICE_CODE、USE_CLIENT_TOKEN 或 ACCESS_TOKEN。需要委托权限 User.Read.All、Group.Read.All、RoleManagement.Read.Directory 与 Application.Read.All。
安装
在 SourceWeft 中
- 打开 控制台中的 Entrapulse Polyarchy,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
EntraPulse Polyarchy
An interactive Microsoft Entra ID identity relationship visualization, served as an MCP App.
[npm] [npm downloads] [License: MIT]
[EntraPulse Polyarchy — live identity relationship graph rendered inside an MCP client]
In 2003 Microsoft demoed PolyArchy Server — a web visual over identity data showing intersecting relationship hierarchies, where clicking a datapoint flipped the whole view to that context. It never shipped. This is it, finally real: a live D3 force-graph over your Entra ID tenant that renders inside your MCP client (Claude Desktop, VS Code Copilot, M365 Copilot, ChatGPT, Cursor, Goose, Postman — anything that supports the MCP Apps extension).
Ask your assistant "show me the identity polyarchy around Rebecca" and explore:
- Org — manager chains and direct reports
- Groups — memberships, and group fan-out to members
- Attributes — pivot hubs linking everyone who shares a value: pick from the
common defaults (department, office, city…) or type ahead into the full Graph
attribute catalog, including nested paths like
onPremisesExtensionAttributes/extensionAttribute9 - Access — directory roles and app assignments
Prefer data over pictures? polyarchy-report returns the same relationships as
structured JSON — manager chain, group memberships with type and assigned/dynamic,
roles, app assignments — for the assistant to reason over, no UI required.
Exploring
- Click a node to open its profile panel (photo, attributes, manager chain link).
- Double-click any node — or use the panel's Set as focus button — to flip the whole context to it: hop distances re-anchor, the view glides to center, and its relationships load. The original PolyArchy interaction.
- Reset (toolbar) clears the canvas for a fresh lineage without losing anything: everything fetched this session stays cached, so re-exploring the same people, groups or cohorts rebuilds instantly with zero extra Graph calls. The status bar shows when a neighbourhood was served from cache.
- Expand / Minimise (toolbar) toggles the app between fullscreen and its inline card. The automatic fullscreen claim happens only when a polyarchy opens, so this is the way back to full canvas after minimising in the host. Hidden on hosts without fullscreen support.
- Legend checkboxes filter relationship kinds and object types in place.
The graph accumulates across dimensions: one intersecting polyarchy, not four separate charts. People are shaded by degrees of separation from the focus (blue ramp); groups, roles, apps and attribute hubs wear the colour of the relationship that connects them — matching their edges — faded with distance so the hop cue survives. Light and dark theme follow your MCP client.
Install (Claude Desktop example)
That's it for most tenants — no app registration needed. Be aware of what that
means: with no configuration the server signs you in through Microsoft's first-party
"Microsoft Graph Command Line Tools" public client
(client ID 14d82eec-204b-4c2f-b7e8-296a70dab67e) — the same well-known app the Graph
PowerShell/CLI tooling uses. It exists in every tenant and already has broad delegated
consent in many. Hardened environments commonly block or restrict this app (Conditional
Access, consent policies, or app management restrictions) — if that's your tenant, use
your own app registration instead;
everything else works identically.
Sign-in happens on the first tool call — and then never again:
- Tokens persist in your OS keychain (DPAPI/Keychain/libsecret).
- The signed-in account is remembered in
~/.entrapulse-polyarchy/auth-record.json, so freshly spawned server processes sign in silently — MCP clients respawn stdio servers freely, and none of those spawns re-prompt. - Token acquisition is single-flighted and cached in-process: a focus flip fires a dozen-plus concurrent Graph calls (expansion + photos), and they all share one token request instead of racing the MSAL cache.
- Every auth event is mirrored to
~/.entrapulse-polyarchy/auth.logwith timings (silent acquisitions are milliseconds; anything interactive is obvious) — the first place to look if you ever see a prompt you didn't expect.
Auth modes
Other env vars: POLYARCHY_DISABLE_TOKEN_CACHE=true disables OS-keychain token
persistence; POLYARCHY_AUTH_RECORD=<path> relocates the persisted sign-in record
(delete the file to force a fresh sign-in).
Permissions (delegated)
The default first-party client typically has broad delegated consent already. Missing
consent shows up as a clear 403 message naming the scope — ask your assistant to run
get-auth-status to see exactly which app registration, scopes and account your token
contains.
Scopes and directory roles are separate gates: the token must always carry the scopes above (an admin role can't substitute for them), while on the user side plain member default permissions cover everything this app reads — no admin role required. Only tenants that restrict default user read access (or guest users) need a role that includes directory read, for which Directory Readers is the least-privileged fit.
Hardened tenants: bring your own app registration
If the Graph Command Line Tools app is blocked, unconsented, or you simply want an app you control (own Conditional Access targeting, own consent trail), point the server at your own registration — supported in both interactive and device-code modes:
- Entra admin center → App registrations → New registration — single tenant is fine.
- Authentication → Add a platform → Mobile and desktop applications — add redirect
URI
http://localhost(no port!), and enable Allow public client flows if you want device-code sign-in. The port matters: interactive sign-in listens on a random loopback port each time (e.g.http://localhost:51106), and Entra only ignores the port when the registered redirect is the portlesshttp://localhost. Registering a fixed port like:3000, or reusing an app that only has web redirects (Graph Explorer, for instance), fails with a reply-URL mismatch. - API permissions → Microsoft Graph → Delegated — add the four scopes from the table above, then Grant admin consent.
- Configure the server with your IDs:
Setting TENANT_ID alone (without CLIENT_ID) is also useful on its own: it pins
sign-in to your tenant instead of the common endpoint, which multi-tenant users and
guest accounts often want regardless of which client app is used.
Attribute pivots
The Attributes view groups people around shared values. The toolbar picker offers the
everyday pivots (Department, Job title, Company, Office, City, State, Employee type),
plus Other attributes… which opens a type-ahead over the full Graph user-attribute
catalog — all fifteen onPremisesExtensionAttributes, employeeOrgData/costCenter,
onPremisesSamAccountName, employeeId and ~50 more. Matching is forgiving (ext9
finds extensionAttribute9), free text is accepted for anything uncatalogued, and
attributes you pick join the dropdown for the rest of the session. Nested paths are
resolved server-side: the needed property is $selected on demand and cohort filters
use Graph advanced queries, with attribute paths validated before they reach an OData
filter.
Tools
(get-photo, get-app-logo and get-manager also exist but are visible only to the app UI, not the model. They give user and Microsoft 365 group nodes their photos and application nodes their logos.)
Development
Test interactively with the MCPJam inspector or any
MCP Apps-capable host pointed at node build/server/index.js. The UI is one
self-contained HTML file (D3 inlined) satisfying the MCP Apps default CSP — the iframe
makes zero network calls; all Graph traffic flows through the server via tools/call.
Releasing
The tag triggers .github/workflows/release.yml, which publishes to npm (Trusted
Publishing — OIDC, provenance attested, no tokens) and then to the MCP registry
(mcp-publisher login github-oidc). No secrets are stored in the repo or in Actions.
Origin story
Microsoft demoed PolyArchy Server at TechEd 2003 and never shipped it. In 2017 Darren approximated it with MIM + Power BI + Journey Chart (blog post). In 2026, MCP Apps made the real thing possible — an identity polyarchy living inside whatever AI client you already use, part of the EntraPulse family.
MIT licensed.
来源:README.md,提交 9bb703e
工具
0版本历史
3- v0.3.1最新Oct 29, 2026
- v0.3.0Oct 21, 2026
- v0.2.1Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分