Skip to content
Download

Skill Setup

msgraph follows the Agent Skills specification. This page explains how to install it for different AI agents.

The skill is contained in the skills/msgraph/ directory of the repository. When installed, the msgraph/ directory is placed in your agent’s skill folder:

msgraph/
├── SKILL.md # Skill definition (required)
├── scripts/
│ ├── run.sh # macOS/Linux launcher
│ ├── run.ps1 # Windows launcher
│ └── bin/ # Binary cache (auto-populated)
└── references/
├── REFERENCE.md # API reference for agents
├── graph-api-index.db # Pre-processed OpenAPI index (SQLite FTS5)
├── samples-index.db # Samples index (SQLite FTS5)
└── api-docs-index.db # API docs index (SQLite FTS5)

No monorepo files (docs, CI, source code) are included in the installed skill.

Terminal window
npx skills add merill/msgraph

This automatically discovers the skill and installs it into your agent’s skill directory.

Download msgraph.zip from the latest release and extract it:

Terminal window
curl -fsSL -o msgraph.zip https://github.com/merill/msgraph/releases/latest/download/msgraph.zip
unzip msgraph.zip -d ~/.agent/skills/
Section titled “Option 3: Manual Symlink (for contributors)”

If you’ve cloned the repo for development:

Terminal window
ln -s /path/to/msgraph/skills/msgraph ~/.agent/skills/msgraph
  1. Discovery: The agent reads the SKILL.md frontmatter (name + description) at startup
  2. Activation: When the user asks about Microsoft 365 data, the agent loads the full SKILL.md
  3. Execution: The agent runs CLI commands via the launcher scripts
  4. Reference: If needed, the agent reads references/REFERENCE.md for API details

The launcher scripts (run.sh / run.ps1) handle platform management:

  • Detect the platform (OS + architecture)
  • Download the correct build for your platform
  • Cache locally in scripts/bin/
  • Forward all arguments
Terminal window
# Via launcher script
./msgraph/scripts/run.sh auth status
# Or directly with the CLI
msgraph auth status

If your organization requires a specific Entra ID app registration, set the environment variable before the agent runs:

Terminal window
export MSGRAPH_CLIENT_ID="your-custom-app-id"

The agent skill automatically picks this up.