Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Dynamics 365 ERP Analytics MCP server enables AI agents to access and analyze Business performance analytics data through natural language. This article provides guidance and best practices for building an agent with the ERP Analytics MCP server in Microsoft Copilot Studio.
Important
This feature is a preview feature. It's subject to the preview supplemental terms of use. Preview features aren't meant for production use and might have restricted functionality. These features are available before an official release, so that customers can get early access and provide feedback.
Prerequisites
Before building an agent, ensure you have:
- Microsoft Copilot Studio access: License and permissions to create agents
For complete environment and system prerequisites, see ERP Analytics MCP Technical Details.
Adding the MCP server to your agent
When you add the MCP server to your agent, you give the agent access to the analytical tools available on the server. This access includes Business performance analytics data that matches the user's security role and permissions. To add the MCP server to your agent in Microsoft Copilot Studio, follow these steps:
Go to Microsoft Copilot Studio and create a new agent or open an existing agent.
On the Tools tab of the agent, select Add a tool.
Select the Model Context Protocol filter.
Search for and select the Dynamics 365 ERP Analytics MCP server.
Create a connection to the server using your Power Platform environment credentials.
Select Add to agent.
After you add the Dynamics 365 ERP Analytics MCP server, the agent can access the analytical tools on the server and use them to answer data questions and generate insights from your Business performance analytics data.
Learn more about configuration options for MCP tools in Add tools and resources from a Model Context Protocol (MCP) server to your agent.
Selecting a model
On the Overview tab, you can view and change the agent's model. This model is the primary model the agent uses for reasoning, orchestration, and responding to prompts and instructions. The model you select for your agent has a significant impact on the quality of analytical responses.
The recommended model for agents using the Dynamics 365 ERP Analytics MCP server is Claude Sonnet 4.5. If Claude Sonnet 4.5 isn't available in your environment, use GPT-5 (Chat) as an alternative.
Note
Claude models are external models not hosted in Azure. Tenant administrators must approve them for use on the tenant. For more information, see Choose an external model as the primary AI model.
Providing agent instructions
On the Overview tab of the agent are instructions that are the core directives or guidance on how the agent should function. They tell the agent what to do and how to do it, in natural language statements. Instructions provide important context for improving the agent's orchestration in selecting the right tool, interpreting analytical requests, and generating responses.
For more information about writing instructions for agents in Copilot Studio, see Write agent instructions.
Principles for effective instructions
Providing instructions to an agent with the Dynamics 365 ERP Analytics MCP server helps the agent understand when and how to use the analytical tools. The following principles can help you write effective agent instructions:
Define the purpose:
- Clearly state the agent's role. For example, "Provide analytical insights from Business performance analytics data.
- Include tone and restrictions. For example, "Provide data-driven insights in plain language.
Include skills and actions:
- List what the agent can do. For example, "Use ERP Analytics MCP tools to analyze financial, vendor, and customer data.
Add workflow details:
- Provide step-by-step guidance for common analytical tasks.
Sample agent instructions
The following instructions provide context on using the tools in the Dynamics 365 ERP Analytics MCP server. You can copy and paste these instructions into your agent as a starting point:
# Role
Act as a business analyst assistant that provides data-driven insights from Business performance analytics data.
# Objective
Your objective is to answer analytical questions about ERP data using natural language. Use the ERP Analytics MCP tools to retrieve and analyze data from the Business performance analytics environment.
# Available Tools
You have access to two analytical tools:
- get-bpa-dataset-schema: Retrieves the schema of analytical data models, including tables, columns, measures, and relationships.
- execute-dax-query: Executes DAX queries against Business performance analytics data with automatic security enforcement.
# Tool Usage Instructions
- Always start by using get-bpa-dataset-schema to understand the available data model before answering analytical questions.
- Generate appropriate DAX queries based on the user's question and the data model schema.
- Use the execute-dax-query tool to retrieve data and calculate insights.
- Present results in a clear, business-friendly format.
# Query Best Practices
- For time-based analyses, use explicit date ranges rather than relative terms.
- When requesting aggregations, specify the grouping dimensions clearly.
- For top/bottom analyses, include appropriate sorting and filtering.
- Keep queries focused and avoid requesting excessive detail when aggregates suffice.
# Response Guidelines
- Present insights in plain language without technical jargon.
- Include relevant context about the data (time periods, filters applied, etc.).
- If data is limited by security permissions, explain what the user has access to.
- When data is not available, explain what Business performance analytics coverage exists.
# Reasoning Instructions
- Before generating DAX queries, plan what data and calculations are needed
- Check if the schema contains the required tables, columns, and measures
- Validate that the query addresses the user's question
- If a query fails or returns unexpected results, adjust and retry
Tips for analytical agent design
Focus on business questions
Design your agent to handle common business analytical scenarios:
- Financial performance analysis (P&L trends, budget variance)
- Vendor performance tracking (OTIF, payment cycles)
- Customer analytics (revenue by segment, DSO)
- Operational insights (inventory turnover, product profitability)
Handle conversational context
Enable follow-up questions by maintaining context:
- "Show me top vendors by spend" → "Now show me their on-time delivery rates".
- "What's our revenue trend?" → "Break that down by region".
Provide actionable insights
Structure responses to include:
- Clear answer to the question.
- Supporting data and metrics.
- Context about time periods and filters.
- Recommendations or observations when appropriate.
Set expectations
In your agent instructions, clarify:
- Data refresh frequency (twice daily).
- Available data scope (Record-to-Report, Procure-to-Pay, Order-to-Cash).
- Security-based limitations on data access.
Testing your agent
When testing your agent:
- Start with simple queries: Test basic aggregations and summaries first.
- Progress to complex analyses: Try multi-metric analyses with grouping and filtering.
- Test different time periods: Verify handling of various date ranges and granularities.
- Validate security: Test with users having different Business performance analytics permissions.
- Check error handling: Verify appropriate responses when data isn't available.
Example analytical queries
Use these example queries to test your agent:
Financial analysis:
- "What is our profit and loss trend over the last 12 months?"
- "Show me budget variance for this fiscal year by department."
- "What are our top 5 expense categories this quarter?"
Vendor analysis:
- "Which vendors have the best on-time delivery performance?"
- "Calculate average payment cycle time by vendor."
- "Show me vendor spend concentration risk."
Customer analysis:
- "Who are our top 10 customers by revenue?"
- "Calculate average days sales outstanding."
- "Identify customers with declining purchase trends."
Product analysis:
- "What are our most profitable product lines?"
- "Show me inventory turnover by category."
- "Identify products with declining sales."
Troubleshooting
Agent not finding the MCP server
- Verify Business performance analytics v2.4.3224 or higher is installed.
- Ensure you have appropriate permissions in your Power Platform environment.
- Check that the ERP Analytics MCP server is enabled.
Poor query results
- Review your agent instructions for clarity.
- Ensure you're using Claude Sonnet 4.5 or GPT-5 (Chat).
- Add more specific guidance about your Business performance analytics data model in instructions.
Timeout issues
- Add instructions to focus queries on aggregated data.
- Guide the agent to limit time ranges for large datasets.
- Instruct the agent to break complex analyses into multiple steps.