itglue-mcp
itglue-mcp
基于 Example Corp / examplecorp IT Glue 租户(your-company.itglue.com)的只读 MCP 服务器。可从聊天中回答“我们对这个客户了解什么”,并回答“X 的凭据是什么”,返回的是 IT Glue 链接 而非机密信息。
基于内部远程 MCP 标准构建:fastmcp 资源服务器 + Entra ID 认证,部署在 Portainer 上的 Nginx Proxy Manager 之后。参见 ~/.claude/context/mcp-server-playbook.md。
影响此设计的 API 与内容审计结论见 FEASIBILITY.md。在修改任何内容之前,请先阅读 §0 和 §1。
两大保证
1. 绝不向 IT Glue 写入任何内容
当前使用的 API 密钥具有 完整的写入和删除权限。这是经过验证的,而非假设:
PATCH /configurations/999999999 -> 404 "Record not found"
PATCH /passwords/999999999 -> 404 "Record not found"
DELETE /configurations/999999999 -> 404没有写入权限的密钥会在记录查找 之前 就返回 401/403 失败。404 意味着该变更操作已获授权,只是没有可操作的对象。IT Glue 不签发只读范围的经典 API 密钥,因此 服务器端没有可依赖的权限机制 —— 这一保证完全依赖本代码库:
client.py仅暴露一个请求方法get(),其内部硬编码了method="GET"。不存在
post/patch/put/delete辅助方法。添加这些方法属于安全回归,而非功能增强。一旦构造出非 GET 请求,
WriteAttemptError绊线即会触发。tests/smoke_local.py同时断言了缺失的方法和缺失的动词。
如果将来要实现写回功能(FEASIBILITY.md 中的选项 C),必须放在 使用独立密钥的独立进程 中。这种隔离是整个安全论证的核心,因为 IT Glue 文档是客户撰写的文本,由模型进行总结 —— 即不可信输入。
2. 绝不返回任何凭据值
itglue_find_credential 返回的是一个 指针:凭据的名称、类别、所属设备、最近轮换时间、是否启用 OTP,以及一个 IT Glue 深链接。用户点击链接并登录 IT Glue 才能查看机密信息。
字段 | 是否返回 | 原因 |
| 绝不 | 不可配置。IT Glue 也拒绝为该键提供值( |
| 绝不 | 不可配置。在此租户中,抽样的 25 条记录中有 15 条包含备注,而密码备注正是 PIN 和恢复码所在之处。 |
| 绝不 | TOTP 种子 / 选择器材料。 |
| 默认关闭 | 半个凭据。设置 |
| 返回 | 这才是交付物。 |
脱敏发生在数据 进入 镜像的过程中(redact.py),因此任何下游工具都无法因忘记剥离字段而导致泄露。IT Glue 标记为 restricted 的记录会被完全丢弃。
Related MCP server: invgate-mcp
为什么需要本地镜像
IT Glue 的 filter[name] 仅支持精确匹配, 且部分过滤器会被静默忽略而非拒绝:
查询 | 结果 |
| 1 |
| 0 |
| 0 |
| 全部 318 个联系人(过滤器被忽略) |
因此,服务端搜索要么需要模型并不掌握的精确字符串,要么会静默地给出错误结果。因此,所有数据都被镜像到内存中并在本地搜索(search.py、index.py)。
实测同步成本:约 ~10 个请求 用于约 ~7,000 条结构化记录;约 ~400 个请求 用于 300 个文档正文(95 个组织列表 + 逐文档获取),上限为每 5 分钟 3,000 个请求。核心数据在数秒内即可预热;文档在后台数分钟内完成预热,文档工具会报告 status: indexing 而不是挂起。
不会持久化到磁盘 —— 语料量很小,因此重启只需重新同步,不存在缓存过期失效模式。
搜索刻意设计得较为宽松,因为真实查询往往形如 “EF Vista Del Mar Unified Controller”:一个缩写、一个全名,以及一个在数据中拼写为 Unifi 的产品。通过缩写匹配(EF → Example Foundation)、逐词模糊匹配(unified ≈ unifi,比率 0.83)、组织令牌剔除以及原子标识符处理(确保 192.0.2.51 不会被拆成 ['10','105','251'])来应对。
工具
工具 | 功能 |
| 将名称/缩写/片段解析为组织。有歧义时优先使用第一个。 |
| 哪些 凭据属于某设备/服务 + IT Glue 链接。绝不返回值。 |
| 跨文档正文的全文搜索。返回摘要 + 最后更新日期 + 链接。 |
| 单个文档的完整文本,HTML → 纯文本。 |
| 按名称、主机名、IP、序列号或 MAC 查找设备。同时搜索配置 和 灵活资产。 |
| 一次调用获取整个客户信息:站点、联系人、设备数量、文档、域名、到期情况。 |
| 街道地址、邮政编码、电话。租户中最干净的数据(完整度 79%)。 |
| 电子邮件、电话、职位;支持 |
| 保修、SSL、域名 —— 即将到期或已过期。 |
| 差距报告,按严重程度排序:缺失字段、无站点地址、无技术概览表、凭据超过 3 年未轮换。 |
| 连接性、镜像新鲜度、安全态势。当出现异常时,首先运行此工具。 |
所有工具均标注 readOnlyHint: true。
此工具所针对的典型查询
“Example Foundation UniFi 控制器的凭据是什么?”
itglue_find_credential 从句子中推断组织,剔除其名称中的词语,在 460 条 EF 凭据记录中模糊匹配 unified→unifi,并返回五个指针 —— 两个位于当前 Unifi Controller (New Staging) 上,三个是较旧的 VDM_Cloudwifi 登录 —— 每个都带有可点击的链接、设备 URL 和最后轮换日期。任何机密信息都不会离开服务器。
本地开发
python -m venv .venv && .venv/Scripts/activate # Windows
pip install -r requirements.txt
cp .env.example .env # fill in ITGLUE_API_KEY; set MCP_AUTH_ENABLED=false
python -m itglue_mcp切勿暴露未启用认证的服务器。MCP_AUTH_ENABLED=false 仅用于 localhost 上的 MCP Inspector。
冒烟测试(实时、只读)
python tests/smoke_local.py针对实时租户的 47 条断言。如果环境中未设置 ITGLUE_API_KEY,则读取 ~/.claude/credentials/itglue.env,且无需安装 fastmcp。凭据断言是最重要的 —— 如果任何一条失败,请先停止并修复,然后再部署。
部署
Entra 应用 + 组 + 令牌生命周期 ——
scripts/setup_entra_app.ps1(默认试运行;使用-Apply执行)。配置应用、包含五名初始成员的ITGlue-MCP-Users安全组、分配强制策略,以及 23 小时 59 分钟访问令牌生命周期策略。参见 docs/ENTRA_SETUP_CHECKLIST.md。Portainer 堆栈 + NPM —— PORTAINER_DEPLOY.md。主机端口 8111(2026-07-29 在
10.0.0.10上探测为空闲 —— 8100 和 8110 已被占用)。公共主机itglue-mcp.example.com。
日常维护
轮换 IT Glue 密钥 —— 仍未完成。 该密钥现在位于
~/.claude/credentials/itglue.env,采用内部KEY=VALUE格式(2026-07-30 从明文.itglueapicreds.txt迁移),但 这只是格式变更,并非轮换 —— 密钥值未变。 该密钥具有写入和删除权限,且曾在明文.txt文件中存放了未知时长。轮换步骤:在 IT Glue → 账户 → 设置 → API 密钥中创建新密钥,更新itglue.env和 Portainer 栈中的ITGLUE_API_KEY,然后撤销旧密钥。IT Glue 会 自动撤销超过 90 天未使用的 API 密钥。 镜像刷新可保持该密钥活跃;如果服务器长期停用,唤醒时预计会收到 401 错误。
通过
ITGlue-MCP-Users组(而非代码)来添加和移除访问权限。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceAn MCP server that enables LLMs to interact with IT Glue documentation, including organizations, configurations, passwords, and flexible assets. It provides tools for listing, creating, and updating managed service provider (MSP) data through the IT Glue API.31
- AlicenseAqualityCmaintenanceA read-only MCP server for InvGate Asset Management, enabling natural language queries for assets, people, computers, servers, software, and API health.12121MIT
- AlicenseAqualityCmaintenanceA read-only MCP server that enables AI assistants to query ServiceNow instances—incidents, changes, users, CMDB—with malformed query linting and injection protection.7MIT
- FlicenseNot gradedqualityCmaintenanceProvides read-only, citation-backed semantic search and retrieval-augmented generation over enterprise documents via standardized MCP tools, with local embeddings for privacy.
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JohnGilligan2/itglue-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server