PubMatic MCP server for Claude, Codex and API clients
PubMatic hosts the upstream MCP server. Agent Planners lets an external client use that connection through the workspace’s MCP endpoint, with its account selection, Forbidden Rules, write approvals and call logs.
Choose the correct endpoint and credentials
| Connection | Endpoint | Credential |
|---|---|---|
| Agent Planners to PubMatic | https://mcp.pubmatic.com/mcp | PubMatic OAuth or the access token for the resource ID and type. |
| Your client to Agent Planners | https://www.agentplanners.com/api/mcp | Agent Planners OAuth or a workspace key with the required tools permissions. |
Make a first read
- 1Run list_connector_tools and find the exact connection alias and tool name. A Publisher resource may expose publisher_reporting and deal_management. If the connection exposes sites_and_adtags, describe that tool to see the supported inventory actions and required inputs. With a Publisher API access token, search for list_publisher_sites, create_publisher_site, create_publisher_adtag and get_publisher_adtag_code under that same connection alias. Inspect each schema before calling it.
- 2Use call_connector_tool with mcp:<alias>::publisher_reporting when listed. Pass query with a metric and date range, and source set to mcp. Check the provider status and the report period before using its figures.
Retrieve an existing tag or OpenWrap code
- 1Find the site and tag with list_publisher_sites and list_publisher_adtags. Pass its ID to get_publisher_adtag_code. If PubMatic omits the script, the tool reports that fact.
- 2For OpenWrap, list_openwrap_profile_tags reads the selected profile. generate_openwrap_version_code takes a profile, version and display version. The code-generation request follows workspace approvals. Deploying code is a separate operation.
Build a Prebid bidder entry for an existing tag
On a Publisher connection call build_prebid_bidder_config with adSlot set to the exact tag ID or name from PubMatic. Agent Planners fills in the publisher ID from that connection. Place the returned object in the bids array of the matching Prebid ad unit. Creating the tag, retrieving a vendor script and receiving site approval are separate operations.
Use raw JSON-RPC from REST
POST /api/v1/tools/pubmatic__raw_request with an Agent Planners credential that permits raw and connector access. For discovery use the body below. For tools/call, pass params.name and params.arguments. A write follows the same permission and approval checks as calling the named tool directly.
{"connection":"YOUR_CONNECTION_ALIAS","method":"tools/list","params":{}}Why is the catalog empty?
Confirm the resource ID, resource type, login and MCP entitlements. Successfully signing in can still leave the resource with no tools. PubMatic integration · Publisher yield review with an AI agent