

You want to... |
Use |
Why |
Pull the rows of a table you already built in Data Builder, on a schedule |
MCP server |
It reads your existing datasets and tables directly, so there is no rebuilding. |
Blend across sources and hand the result to your own code or a BI tool |
MCP server |
Your blend logic already lives in the table. |
Query raw connector data and shape it yourself in code |
API |
Gives you per-connector reports, fields, and date ranges. |
The API and the MCP server read the same warehoused data; neither one is newer or better. They are different doors to the same rooms.
The MCP server has a headless mode, which means your server sends your API key as a Bearer token and there is no browser sign-in step. That is what you want for a job that runs on a schedule.
https://pma-mcp.web.app/mcp and send the header Authorization: Bearer YOUR_API_KEY.pma_list_datasets to find your dataset and see the data tables inside it.pma_get_data_table_data with that table. This returns the table whole, including a blended table that combines several sources.pma_get_dataset_data with the dataset and a date range.Full walkthrough with working Node.js code: Headless/Server-to-Server Integration with PMA MCP Server.
pma_get_dataset: the structure of one dataset and the fields each table pulls.pma_add_data_table: adds a data table to an existing dataset.pma_create_dataset: creates a dataset, blank or from a template.pma_list_dataset_templates: the pre-built dataset recipes.Anything you create this way is the same dataset you see in the Hub under Data Builder. You can edit it in either place.
The API key you generate under Tools > API does not expire on its own. Rotate it from the Hub whenever you would rotate any production secret (when someone leaves, when you suspect it has leaked, or when your policy calls for it), then update it in your secret store and restart your service. (Keys minted by the browser sign-in flow are different; those expire one year after they are issued.)
If you would rather work against the connector layer, you rebuild what your table does. It takes four calls:
GET /http-organizations/{organizationId}/accounts/{providerType}. Your organization ID is in your Hub URL: hub.powermyanalytics.com/organizations/[organization ID]/overview. The provider type is a string such as facebook_ads; GET /http-connectors lists them all.GET /connectors-{connectorType}-config. Use dashes, not underscores, in connectorType (for example, facebook-ads).GET /connectors-{connectorType}-schemaGET /connectors-{connectorType}-report with your config, start, end, fields, and aggregate.Send the config payload as URI-encoded JSON. Full reference: SwaggerHub PMA-V4 2.0.0.
These three connectors have not moved to the current protocol yet. Structure those calls against the legacy API documentation instead.
In Data Builder, add the Account ID field to your report and run it. The values it returns are what you pass to the API.
The MCP path returns the same rows you see when you preview the table in Data Builder: same fields, same order, same date-range logic. pma_get_data_table_data returns one data table whole, including a blended table that combines several sources. pma_get_dataset_data returns the combined result across every table in a dataset.
The API path returns raw connector rows. If your table blended several sources, you will get one response per connector and you do the joining in your own code (or let Data Builder do the blending and read the finished table through the MCP path instead).
Submit a ticket with your organization ID and the name of the data table you are trying to reach, and we will send you the exact call.