Obtain a bearer token from Azure AD using the OAuth 2.0 client credentials or auth code flow with the Dynamics 365 resource URI as the scope
Construct a GET request to https://{org}.crm.dynamics.com/api/data/vX.X/{entitySetName} with OData query parameters: $select for fields, $filter for conditions, $orderby, and $top for page size
Add the Prefer: odata.maxpagesize={n} request header to control server-side paging; the response will include an @odata.nextLink value when more records exist
Fetch subsequent pages by issuing a GET to the @odata.nextLink URL exactly as returned — do not modify it
Use $expand to include related entity data in the same response (e.g., $expand=primarycontactid($select=fullname))
Known gotchas
The entity set name differs from the entity logical name — use the plural collection name (e.g., accounts, contacts, leads) and verify via $metadata if unsure
OData filter string values must be enclosed in single quotes and certain characters (like apostrophes in names) must be escaped by doubling them
The access token must be scoped to the specific Dynamics org URL — a token obtained for one org is not valid for another
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp