All resources
E-book or guide

Build Your First AI Agent for Dynamics 365 with MCP

A hands-on guide to building a governed AI agent on Dynamics 365 F&O with the ERP MCP server, Copilot Studio and VS Code, with a worked example and checklists.

Free

Free 33-page e-book. A hands-on guide to building a governed AI agent on Dynamics 365 finance and operations apps with the Dynamics 365 ERP MCP server, Microsoft Copilot Studio and Visual Studio Code. Worked example, copy-ready agent instructions, checklists, a quick-reference sheet, a 30-day plan and a glossary.

The Model Context Protocol (MCP) gives AI agents one standard way to work with Dynamics 365 data, forms and business logic, under the same security roles your users already have. This e-book takes you from the concepts to a working agent: what the dynamic Dynamics 365 ERP MCP server offers (data, form and action tools), environment prerequisites and Allowed MCP clients, building and testing an agent in Copilot Studio, exploring the tools from VS Code, extending the server with your own X++ actions, and the security, licensing, testing and rollout decisions that turn a demo into production. The running example is a Purchase Order Follow-up Assistant for the Contoso demo company USMF: read-only first, then one controlled write with human approval. Preview features are clearly marked, and every fact is linked to Microsoft Learn.

What's inside

  1. Chapter 1: Why MCP Changes ERP Integration
  2. Chapter 2: Inside the Dynamics 365 ERP MCP Server
  3. Chapter 3: Plan Your First Agent
  4. Chapter 4: Prepare the Environment
  5. Chapter 5: Build the Agent in Copilot Studio
  6. Chapter 6: Instructions and Prompts That Work
  7. Chapter 7: Explore the Tools from Visual Studio Code
  8. Chapter 8: Extend the Server with Your Own Actions
  9. Chapter 9: Security, Governance and Cost
  10. Chapter 10: Test, Pilot and Go Live
  11. Chapter 11: Beyond Your First Agent

Plus a one-page Quick Reference, a 30-day plan, a glossary of key terms and a list of Microsoft Learn sources.

Who it's for

Functional consultants, business analysts, solution architects and developers working on Microsoft Dynamics 365 Finance & Operations, plus IT and business leaders who want a realistic picture of effort, risk and cost before approving an agent pilot.

How to get the most from it

  1. Read Chapters 1 and 2 first; the vocabulary is used everywhere else
  2. Follow Chapters 3 to 6 with a Tier 2 sandbox or Unified Developer Environment open
  3. Use the checklists and the 30-day plan to run your own pilot

Key ideas from this e-book

  • Read first, write narrowly, approve every write. The security role is the real boundary; agent instructions are the second fence.
  • Prefer data tools for create, read, update and delete; use form tools for actions behind buttons, and action tools for logic that is not exposed anywhere else.
  • Cost and quality both follow tool calls. Measure them in the activity trace instead of guessing.

Read a sample from Chapter 2

Every tool response carries context that is recalculated for the authenticated identity. If the agent runs with a Purchasing agent role, it sees only the menu items, entities and actions that role can access, and any explicit call to an object outside the role is rejected.

This has two benefits. It is the security boundary, and it also improves accuracy, because the model has fewer irrelevant forms and entities to choose from. A narrow role is not just safer; it makes the agent smarter.

Let's connect

I'm Pranshu Shubham, a Microsoft Dynamics 365 F&O Solution Architect and PMP-certified program lead with 8+ years of ERP and AI transformation across the USA, Europe and APAC. I created this resource to give consultants and architects a clear, honest starting point for building agents on Dynamics 365, and I'd love to hear how you use it.

  1. Connect with me on LinkedIn and tell me what you're working on
  2. Have a question or a project in mind? Send me a message. I reply within 24 hours
  3. Explore more free e-books, templates and videos and the latest articles