mcp-dv360-server

marekzabrodsky/mcp-dv360-server

3.1

If you are the rightful owner of mcp-dv360-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project is a sample implementation of a Model-Context-Protocol (MCP) server for interacting with the Google Display & Video 360 API.

MCP Server for Google Display & Video 360 API

This project is a sample implementation of a Model-Context-Protocol (MCP) server that acts as a bridge to the Google Display & Video 360 (DV360) API.

It uses Python and FastAPI to create a server that can be used by AI applications to interact with the DV360 API in a standardized way.

Note: This is a prototype. The DV360 tool currently returns mock data.

Setup

  1. Clone the repository:

    git clone <your-repo-url>
    cd mcp-dv360-server
    
  2. Create a virtual environment and activate it:

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install the dependencies:

    pip install -r requirements.txt
    
  4. Configure your credentials:

    • Rename the .env.example file to .env.
    • Follow the instructions in the Google Cloud documentation to create OAuth 2.0 credentials (client ID and client secret).
    • Place your credentials in the .env file. You will also need your DV360 partner ID and advertiser ID.

Running the Server

uvicorn main:app --reload

The server will be available at http://127.0.0.1:8000.

Testing

You can test the server by sending a POST request to the /tools/dv360 endpoint.

Example: List Advertisers (mock data)

curl -X POST http://127.0.0.1:8000/tools/dv360 \
-H "Content-Type: application/json" \
-d '{
    "method": "list_advertisers",
    "parameters": {
        "partner_id": "12345"
    }
}'