GraphMind
API-aware MCP server for Microsoft Graph — always fresh, never hallucinated.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
API-aware MCP server for Microsoft Graph. Grounds AI assistants (Cursor, VS Code Copilot, Claude) in a local, always-fresh index of the entire Graph API via a 3-tier search funnel - so endpoints are never hallucinated.
GraphMind solves the core problem with AI + Microsoft Graph: LLMs have a training cutoff and will hallucinate endpoint paths for APIs released after training. GraphMind maintains a local, always-fresh index of the entire Graph API and uses a 3-tier funnel to find the correct endpoint for any natural language query.
GraphMind sits between your AI client and Microsoft Graph. The AI never guesses endpoint paths — it searches a local, always-fresh index first, then executes the exact endpoint it found.
flowchart TD
user["Natural language prompt"] --> client["AI client (Cursor / VS Code Copilot)"]
client -->|"search_graph_api"| funnel["3-tier search funnel"]
funnel --> schemas["Ranked endpoint schemas injected into AI context"]
schemas --> pick["AI picks the exact endpoint"]
pick -->|"call_graph_api"| writeCheck{"Write method?"}
writeCheck -->|"GET"| exec["Execute against Microsoft Graph / Azure RM"]
writeCheck -->|"POST / PATCH / PUT / DELETE"| preview["Return preview (confirmed=false)"]
preview --> approve["User approves in chat"]
approve -->|"confirmed=true"| exec
exec --> result["Response (with pagination / aggregate)"]
flowchart TD
query["Natural language query"] --> tier1["Tier 1: Structural filter"]
tier1 -->|"~45k endpoints to <= 500, ~1ms"| tier2["Tier 2: Cross-encoder rerank"]
tier2 -->|"top 20, ~100ms, local 80MB model"| tier3["Tier 3: Full schemas injected into AI context"]
tier3 --> pick["AI picks the exact endpoint"]
Search also applies domain hints (e.g. Cloud PC / snapshot queries auto-select
api_version=beta and narrow tags). Write calls require user confirmation
before execution.
sentence-transformers (often 1 GB or more), the first run clones msgraph-metadata, and the first search downloads an ~80MB reranker model.git clone https://github.com/askaresh/graphmind.git
cd graphmind
python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# Windows cmd
.venv\Scripts\activate.bat
# macOS / Linux
source .venv/bin/activate
pip install -e ".[dev]"
# Configure — copy the example env, then fill in TENANT_ID, CLIENT_ID, AUTH_MODE
copy .env.example .env # Windows (PowerShell / cmd)
cp .env.example .env # macOS / Linux
# Verify (auto-clones msgraph-metadata on first run)
python -m graphmind.cli stats
# Start MCP server
python -m graphmind.cli serve
Use that activated virtual environment for every later command. After activation, graphmind stats works as well. If PowerShell blocks the activate script, call the venv interpreter directly: .venv\Scripts\python.exe -m graphmind.cli stats (macOS / Linux: .venv/bin/python -m graphmind.cli stats).
AUTH_MODE and credentials are read from .env. See docs/entra_setup.md for app registration and permissions.
The spec repo is cloned to ./msgraph-metadata automatically when missing.
See docs/spec_lifecycle.md for the full lifecycle and
recommended CI workflow.
search_graph_api call, then is cached locally.Realistic time-to-first-query: GraphMind itself is clone-and-go in ~3 minutes. Because the one-time Entra app registration + admin consent and the cold-start parse are unavoidable, plan for ~10–15 minutes before your first live Graph call.
This repo includes .cursor/mcp.json. Credentials and AUTH_MODE stay in .env (not in MCP config):
{
"mcpServers": {
"graphmind": {
"command": "python",
"args": ["-m", "graphmind.mcp.server"],
"cwd": "${workspaceFolder}",
"env": {
"SPEC_REPO_PATH": "./msgraph-metadata",
"DEFAULT_API_VERSION": "v1.0",
"RERANKER_TOP_K": "20"
}
}
}
}
command must be the same interpreter you installed into. With the Quick Start venv, set it to ${workspaceFolder}/.venv/Scripts/python.exe on Windows, or ${workspaceFolder}/.venv/bin/python on macOS / Linux. A bare python only works when that python on PATH is the one that received pip install -e ".[dev]".
Keys in the MCP env block override the same keys in .env. Leave AUTH_MODE, TENANT_ID, CLIENT_ID, and secrets out of this block.
Enable GraphMind under Cursor Settings → MCP. The index loads in the background on the first tool call (~4–6 minutes cold; instant once warm). See docs/spec_lifecycle.md.
Agent behaviour for Graph queries is defined in .cursor/rules/graphmind-mcp.mdc.
This repo includes .vscode/mcp.json, which VS Code picks up automatically when you
open the folder. It uses VS Code's MCP schema (servers + "type": "stdio").
Credentials and AUTH_MODE stay in .env (not in the MCP config):
{
"servers": {
"graphmind": {
"type": "stdio",
"command": "python",
"args": ["-m", "graphmind.mcp.server"],
"cwd": "${workspaceFolder}",
"env": {
"SPEC_REPO_PATH": "./msgraph-metadata",
"DEFAULT_API_VERSION": "v1.0",
"RERANKER_TOP_K": "20"
}
}
}
}
Use the same venv interpreter for command as in the Cursor section above. MCP env values override .env.
Requires GitHub Copilot agent mode (Chat: Agent view). Open the Chat view, switch
to Agent, then Start the graphmind server from the MCP tools picker. As with
Cursor, the index loads in the background on the first tool call (~4–6 minutes cold).
Any other MCP-capable client works too. From the repo root, run
python -m graphmind.mcp.server with the venv interpreter.
Always use this workflow for tenant / Graph questions:
search_graph_api — natural language query; returns ranked endpoint schemasget_endpoint_schema — full parameters for a chosen path (optional)call_graph_api — execute the call against Graph or Azure RMAdditional tool:
get_changelog — recently decommissioned endpoints from the spec diff pipelinecall_graph_api optionsWrite confirmation: POST, PATCH, PUT, and DELETE calls return a preview on the
first call (confirmed: false). Re-call with the same parameters and
confirmed: true only after the user explicitly approves. Set
GRAPHMIND_REQUIRE_WRITE_CONFIRMATION=false to skip (e.g. automation scripts).
404 handling: Failed calls suggest related endpoints from the local index when possible.
Many Windows 365 / Cloud PC APIs are beta-only. GraphMind auto-selects beta for Cloud PC and snapshot queries.
Optional dev helpers under scripts/ bypass MCP (no write confirmation gate).
See scripts/README.md for details.
Tenant-specific scripts belong in scripts/local/ (gitignored, not on GitHub).
Run from repo root, with the venv activated: python scripts/count_users.py. These scripts force AUTH_MODE=client_secret and need CLIENT_SECRET in .env. Interactive mode is enough for the MCP server and is not enough for these scripts.
See .env.example for the full list. Key variables:
After changing Entra permissions, delete the token cache and retry.
For a quick non-MCP sanity check, run python -m graphmind.cli stats (loads the index) and
python -m graphmind.cli search "list all users" (exercises the funnel) from the repo root.
.github/workflows/test.yml — runs on push/PR: compileall + pytest.github/workflows/refresh.yml — daily at 02:00 AEST, pulls latest
msgraph-metadata, diffs against the stored manifest, and commits changes.
No auth secrets required for the spec refresh job.From the activated Quick Start virtual environment:
pip install -e ".[dev]"
python -m pytest tests/ -v
python -m compileall graphmind
Contributions are welcome. Please read:
Use the issue templates for bug reports and feature requests, and the pull request template when opening a PR.
GraphMind is released under the MIT License.
API-aware MCP server for Microsoft Graph. Grounds AI assistants (Cursor, VS Code Copilot, Claude) in a local, always-fresh index of the entire Graph API via a 3-tier search funnel - so endpoints are n
ภาพรวม
API-aware MCP server for Microsoft Graph. Grounds AI assistants (Cursor, VS Code Copilot, Claude) in a local, always-fresh index of the entire Graph API via a 3-tier search funnel - so endpoints are never hallucinated.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Graphmind ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 API-aware MCP server for Microsoft Graph. Grounds AI assistants (Cursor, VS Code Copilot, Claude) in a local, always-fresh index of the entire Graph API via a 3-tier search funnel - so endpoints are never hallucinated.