d365fo-client
A comprehensive Python client library and MCP server for Microsoft Dynamics 365 Finance & Operations (D365 F&O) that provides easy access to OData endpoints, metadata operations, label management, and AI assistant integration.
claude mcp add --transport stdio mafzaal-d365fo-client uvx --from d365fo-client@latest d365fo-fastmcp-server \ --env D365FO_CLIENT_ID="YOUR_CLIENT_ID" \ --env D365FO_LOG_LEVEL="INFO" \ --env D365FO_TENANT_ID="YOUR_TENANT_ID" \ --env D365FO_CLIENT_SECRET="YOUR_CLIENT_SECRET"
How to use
This MCP server exposes the full capabilities of Microsoft Dynamics 365 Finance & Operations (D365 F&O) to AI assistants and other MCP-compatible tools via the FastMCP framework. You can interact with D365 F&O resources, metadata, labels, and OData endpoints through standardized MCP commands and schema operations provided by the d365fo-fastmcp-server integration. To get started, deploy or connect to the MCP server using the UVX-based configuration (as shown in the mcp_config example) or via Docker, then use your MCP client to execute model context protocol requests against D365 F&O. The included Python client library supplies convenient bindings for performing common tasks like metadata fetch, label management, and OData operations programmatically, enabling streamlined AI-assisted workflows.
How to install
Prerequisites:
- Python 3.8+ (if using the Python-based deployment path) or an environment with UVX installed for MCP configuration
- Access to a D365 F&O tenant and valid client credentials (Client ID, Client Secret, Tenant ID)
- Optional: Docker if you prefer containerized deployment
Option A: Install and run via UVX (recommended for VS Code users)
- Ensure you have UVX installed. If not, install via the VS Code extension or via the command line as described in the README.
- Install the MCP server using the provided UVX configuration: uvx --from d365fo-client@latest d365fo-fastmcp-server
- Set required environment variables (replace placeholders with real values): export D365FO_CLIENT_ID="your-client-id" export D365FO_CLIENT_SECRET="your-client-secret" export D365FO_TENANT_ID="your-tenant-id"
- Start the MCP server through UVX (the exact command may vary by your setup). Ensure the server is reachable by your MCP clients.
Option B: Run via Docker (Docker Installation for VS Code or CLI)
- Pull and run the container, injecting credentials:
docker run --rm -i
-e D365FO_CLIENT_ID="your-client-id"
-e D365FO_CLIENT_SECRET="your-client-secret"
-e D365FO_TENANT_ID="your-tenant-id"
-e D365FO_LOG_LEVEL=DEBUG
ghcr.io/mafzaal/d365fo-client:latest - Ensure the container exposes the MCP endpoint and that your MCP clients can reach it.
Option C: Deploy to Azure Container Apps (as described in the README)
- Prepare authentication (OAuth or API Key) as described in the deployment instructions.
- Use the provided deploy-aca.sh script or ARM template to provision the service in Azure Container Apps.
- Configure environment variables as needed in Azure to point to your D365 F&O tenant and credentials.
Additional notes
Tips and common considerations:
- Ensure your D365FO credentials (Client ID, Client Secret, Tenant ID) are kept secure and not committed to version control.
- If you use Docker, consider mounting a configuration file or using environment variables to manage different tenants or clients.
- The MCP server relies on the FastMCP framework; keep the server and dependencies updated to benefit from features and security patches.
- For production deployments, prefer OAuth-based authentication with proper token handling and rotate secrets regularly.
- The included Python client library can be used to script common D365 F&O interactions, metadata operations, and label management from your MCP-enabled agents.
- When using the UVX one-click install, follow the prompts to supply tenant and client credentials; the tooling will generate the necessary MCP configuration on the fly.
- If you encounter connectivity issues, verify network egress rules from your hosting environment to the D365 F&O endpoints and ensure correct tenant region alignment.
Related MCP Servers
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
mcp-yfinance
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp
servicenow-api
ServiceNow MCP Server and API Wrapper
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools