Work IQ and M365 Agents Toolkit: Developing Microsoft 365 Copilot Agents from the Terminal
Microsoft has released Work IQ, a CLI and MCP Server that connects AI assistants to Microsoft 365 Copilot data. Alongside it, the M365 Agents Toolkit plugin enables scaffolding declarative agents, authoring JSON manifests, wiring up MCP servers, and deploying — all through natural language via GitHub Copilot CLI and Claude Code. With MCP Apps and OpenAI Apps SDK support, interactive UI widgets can be added to declarative agents. Three skills, one install, zero context-switching — the fastest path from idea to deployed agent.
The Vision: Agent Development from the Terminal
Developing agents within the Microsoft 365 Copilot ecosystem traditionally required multiple tools, portals, and configuration steps. Developers constantly context-switched between creating projects in VS Code, editing JSON manifests, configuring API plugins, testing, and deploying.
Microsoft solves this problem with the combination of Work IQ and the Microsoft 365 Agents Toolkit plugin. Work IQ provides a CLI and MCP Server that connects your AI assistants to your Microsoft 365 data. The M365 Agents Toolkit plugin enables declarative agent development, configuration, and deployment through natural language via GitHub Copilot CLI and Claude Code.
The result: three skills, one install, zero context-switching — the fastest path from idea to deployed agent.
What Is Work IQ?
Microsoft Work IQ is a command-line interface (CLI) and Model Context Protocol (MCP) server that connects AI assistants to your Microsoft 365 Copilot data. It enables natural language queries across your emails, meetings, documents, Teams messages, people information, and workplace insights.
Supported Data Types
| Data Type | Example Queries | |
|---|---|---|
| Emails | "What did John say about the project deadline?" | |
| Meetings | "What's on my calendar tomorrow?" | |
| Documents | "Find my recent PowerPoint presentations" | |
| Teams messages | "Summarize today's messages in the Engineering channel" | |
| People | "Who is working on Project Alpha?" |
How It Works
Work IQ operates in two modes:
CLI Mode: Run queries directly from your terminal using theworkiq ask command. Interactive mode supports follow-up questions for deeper investigation.
MCP Server Mode: Integrates with GitHub Copilot (VS Code or CLI) and other AI assistants, allowing your coding assistant to contextually access your Microsoft 365 data. For example, when implementing a feature discussed in a recent meeting, your AI assistant can access meeting notes to provide more relevant suggestions and even begin the implementation.
Work IQ Plugins
Work IQ provides three main plugins through the GitHub Copilot CLI plugin marketplace:
| Plugin | Description | |
|---|---|---|
| workiq | ask_work_iq MCP tool for querying Microsoft 365 data | |
| microsoft-365-agents-toolkit | Toolkit for scaffolding declarative agents, authoring manifests, configuring capabilities, and deploying | |
| workiq-productivity | Read-only workplace insights: action item extraction, email analytics, meeting cost calculation, channel auditing |
M365 Agents Toolkit Plugin
The M365 Agents Toolkit plugin is particularly noteworthy among the Work IQ plugins. It is designed for developing, configuring, and deploying Microsoft 365 Copilot declarative agents through natural language via GitHub Copilot CLI and Claude Code.
Three Skills
Declarative Agent Developer: Project scaffolding, JSON manifest authoring, API plugin addition, MCP server wiring, capability configuration, and deployment — all accomplished through natural language commands. Commands like "Scaffold a new declarative agent for HR FAQ", "Add web search to my agent", or "Deploy my agent" are all it takes. UI Widget Developer: Builds MCP servers with rich interactive widgets that render directly in Copilot Chat using MCP Apps and the OpenAI Apps SDK. Interactive components such as dashboards, forms, visualizations, and multi-step workflows can be used directly within the conversation. Install ATK: Sets up the Agents Toolkit CLI and VS Code extension in seconds. Quickly prepares the development environment.Natural Language Agent Development Workflow
In the traditional agent development process, developers manually edited JSON files, followed configuration steps by referencing documentation, and entered test cycles for each change. The M365 Agents Toolkit plugin completely transforms this process:
1. Tell Copilot CLI what you want for your agent 2. The plugin automatically creates the project structure and required files 3. Manage MCP server connections, API plugin configuration, and capability additions through natural language 4. When ready, say "Deploy my agent" to initiate deployment
MCP Apps and UI Widgets
MCP Apps is an extension to the Model Context Protocol that enables interactive user interface capabilities. Developed in partnership with OpenAI and MCP-UI, this open standard is supported in multiple clients including ChatGPT, Claude, Goose, and Visual Studio Code.
What Can MCP Apps Do?
Tools can return interactive UI components that render directly within conversations:
- Dashboards: Real-time data visualizations
- Forms: Collecting data from users
- Visualizations: Chart and graph displays
- Multi-step workflows: Guided processes within the conversation
Architecturally, tools include UI metadata that point to UI resources served via the ui:// scheme. Communication occurs bidirectionally via JSON-RPC over postMessage in sandboxed iframes.
Adding Widgets to Declarative Agents
Microsoft 365 Copilot supports UI widgets created using two methods:
MCP Apps: An extension to MCP that enables MCP servers to deliver interactive user interfaces. New MCP Apps can be built with the@modelcontextprotocol/ext-apps npm package.
OpenAI Apps SDK: Tools built on the MCP Apps standard with additional ChatGPT functionality. The window.openai.* APIs support tool calling, message sending, fullscreen mode, and more.
Supported Capabilities
| Capability | MCP Apps | OpenAI Apps SDK | M365 Copilot Support | |
|---|---|---|---|---|
| Tool input/output | Yes | Yes | Yes | |
| Widget state management | Alternative mechanism | Yes | Yes | |
| Tool calling (callTool) | Yes | Yes | Yes | |
| Follow-up message sending | Yes | Yes | Yes | |
| Fullscreen mode | Yes | Yes | Yes | |
| Opening external links | Yes | Yes | Yes | |
| Theme and locale info | Yes | Yes | Yes | |
| File upload | No | Yes | No | |
| Modal window | No | Yes | No |
Installation and Getting Started
Prerequisites
- Node.js 18+ (including NPM/NPX)
- Microsoft 365 subscription with Copilot license
- Administrative consent for the Work IQ application in your Microsoft Entra tenant
- GitHub Copilot CLI (optional)
Installing Work IQ
Via GitHub Copilot CLI (fastest path):Open Copilot CLI and run the following commands:
1. Add the plugin marketplace: /plugin marketplace add microsoft/work-iq
2. Install Work IQ: /plugin install workiq@work-iq
3. Restart Copilot CLI and start querying
Install globally with npm install -g @microsoft/workiq.
Start directly in MCP server mode with npx -y @microsoft/workiq mcp.
Add the following configuration to your .vscode/mcp.json file:
``json
{
"workiq": {
"command": "npx",
"args": ["-y", "@microsoft/workiq", "mcp"],
"tools": ["*"]
}
}
`
Installing M365 Agents Toolkit Plugin
To install the M365 Agents Toolkit plugin via GitHub Copilot CLI:
1. Add the plugin marketplace: /plugin marketplace add microsoft/work-iq
2. Install the toolkit: /plugin install microsoft-365-agents-toolkit@work-iq
3. Restart Copilot CLI
After installation, you can start developing agents through natural language commands.
EULA Acceptance
Before using Work IQ for the first time, you must accept the End User License Agreement:
workiq accept-eula
Use Cases
Finding Project Context While Coding
When implementing a feature discussed in meetings or emails, Work IQ helps your AI assistant understand the business context behind the code you're writing.
CLI usage:
workiq ask -q "What requirements did Sarah share about the customer portal authentication feature?"
GitHub Copilot in VS Code: "Find the authentication requirements my team discussed for the customer portal. Check my meetings and emails."
Your AI assistant retrieves meeting notes, emails with technical requirements, shared specification documents, and team decisions. This context enables your AI assistant to provide more relevant code suggestions aligned with your team's decisions.
Starting Feature Implementation from Spec Documents
You begin work on a new feature based on a specification document stored in SharePoint. Work IQ summarizes key features and requirements, enabling your AI coding assistant to create baseline implementations.
CLI usage:
workiq ask -q "Summarize the key requirements and features outlined in the specification document for the user portal testing sandbox."`
Client Feedback Analysis
Use Work IQ to quickly organize issues raised during a client meeting and get recommended fixes. Work IQ searches through Facilitator-generated meeting notes to identify specific issues and flag critical or blocking items.
Agent Scaffolding and Deployment
Creating an agent from scratch with the M365 Agents Toolkit plugin is straightforward:
- "Scaffold a new declarative agent for HR FAQ"
- "Add web search to my agent"
- "Deploy my agent"
These commands manage the entire process from creating the project structure to writing JSON manifests, wiring MCP server connections, and deploying.
Security and Privacy
Work IQ inherits all data protections provided by Microsoft 365 Copilot:
- Enterprise-grade security: All data access follows your organization's security policies.
- Permission system: Work IQ can only access data you already have permission to view.
- Admin visibility: Enterprise administrators have visibility into and control over Work IQ usage within their organization.
- No data storage: Work IQ does not store your Microsoft 365 data. It retrieves information on-demand when you make queries.
Limitations and Considerations
- Public preview status: Work IQ is currently in public preview. Features and APIs may change.
- Administrative consent required: Accessing Microsoft 365 organization data requires administrative consent in the Microsoft Entra tenant. If you are not an administrator, contact your organization admin for access.
- Copilot license required: Full Work IQ functionality requires a Microsoft 365 Copilot license.
- Platform support: Windows (x64, ARM64), Linux (x64, ARM64), macOS (x64, ARM64), and WSL are supported.
- MCP Apps limitations: Some capabilities such as file upload and modal windows are not yet supported in M365 Copilot declarative agent UI widgets.
Frequently Asked Questions
What data can I access with Work IQ?
Work IQ accesses your Microsoft 365 Copilot data: emails, meetings, documents, Teams messages, people information, and workplace insights. Access is limited by your existing Microsoft 365 permissions; you can only reach data you already have permission to view.
Can the M365 Agents Toolkit plugin be used in production?
Work IQ and the M365 Agents Toolkit plugin are currently in public preview. They can be used for development and testing purposes; however, since APIs and features may change, exercise caution for production environments. Declarative agents themselves are generally available and can be distributed through the Agent Store.
Does it work with AI assistants other than GitHub Copilot CLI?
Yes. Work IQ can work with any AI assistant that supports the MCP protocol. Work IQ plugins are directly available for GitHub Copilot CLI and Claude Code. It also integrates with GitHub Copilot Chat (Agent Mode) in VS Code. Additionally, it can be started as a standalone MCP server using the npx command.
Which platforms support UI widgets?
UI widgets created with MCP Apps and OpenAI Apps SDK are supported in Microsoft 365 Copilot (web), ChatGPT, Claude, and VS Code. Supported capabilities may vary by platform; always check API availability and provide fallback UI for unsupported cases.
Does Work IQ store my data?
No. Work IQ does not store your Microsoft 365 data. All information is retrieved on-demand at query time and inherits the enterprise-grade security and compliance protections of Microsoft 365 Copilot.
References
- Microsoft Work IQ CLI (preview) – Microsoft Learn
- microsoft/work-iq – GitHub
- Add Interactive UI Widgets to Declarative Agents – Microsoft Learn
- Build Plugins from an MCP Server for M365 Copilot – Microsoft Learn
- Build Smarter with the M365 Agents Toolkit MCP Server – DevBlog
- MCP Apps Overview
- OpenAI Apps SDK