Login CLI and MCP server for the Data Platform API.
Project description
Marketing Data Platform
Python package for local agents and MCP clients that need to access the Data Platform API.
It provides two commands:
data-platform-login: login with Google and save a local Data Platform API session.data-platform-mcp: start the MCP server that exposes mart access tools.
The MCP server does not connect to BigQuery directly. It calls the Data Platform API, and the API owns BigQuery credentials, authorization, and tenant access control.
Install
For local development:
uv run --package marketing-data-platform data-platform-login --help
uv run --package marketing-data-platform data-platform-mcp
After publishing to PyPI:
uvx --from marketing-data-platform data-platform-login --help
uvx --from marketing-data-platform data-platform-mcp
Login
The Data Platform API must be running and configured with Google OAuth.
uvx --from marketing-data-platform data-platform-login \
--api-base-url https://data-platform-api.example.com
By default, the command writes the MCP session file to:
~/.config/data-platform/mcp.env
The session token is saved locally with file mode 600 and is not printed.
MCP Config
For a published package:
[mcp_servers.data-platform-mart]
command = "uvx"
args = ["--from", "marketing-data-platform", "data-platform-mcp"]
startup_timeout_sec = 120
For this monorepo during development:
[mcp_servers.data-platform-mart]
command = "uv"
args = [
"run",
"--directory",
"/path/to/data-platform",
"--package",
"marketing-data-platform",
"data-platform-mcp",
]
startup_timeout_sec = 120
MCP Tools
get_daily_ad_performance
Environment Variables
| Name | Required | Description |
|---|---|---|
DATA_PLATFORM_API_BASE_URL |
optional | Data Platform API base URL. Default: http://127.0.0.1:8002 |
DATA_PLATFORM_API_SESSION_TOKEN |
optional | Session JWT issued by login. Usually read from the session file. |
DATA_PLATFORM_MCP_SESSION_FILE |
optional | Session env file. Default: ~/.config/data-platform/mcp.env |
DATA_PLATFORM_MCP_DEFAULT_LIMIT |
optional | Default row limit. Default: 100 |
DATA_PLATFORM_MCP_MAX_LIMIT |
optional | Max row limit. Default: 1000 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marketing_data_platform-0.1.0.tar.gz.
File metadata
- Download URL: marketing_data_platform-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8611e5d4c7940ab2a43453b04b38752d45e8fdc2e3e9a07ea88887af1eebde07
|
|
| MD5 |
350295963c383ccf8f835733bc9be665
|
|
| BLAKE2b-256 |
cf16e33dc1985265105b365ce51cf89c0ba985fb10b26b8b6d1c79314b7f3477
|
File details
Details for the file marketing_data_platform-0.1.0-py3-none-any.whl.
File metadata
- Download URL: marketing_data_platform-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
380367083938613a873515c3d8e43181ad9cdbfc8b1ad6dc4a8eb9e1d538caee
|
|
| MD5 |
4b9cbd604216ac3557568936948accd7
|
|
| BLAKE2b-256 |
0ec0c7222fcaabc282ee5dff006d331bae1f6862941333386847bcc1904426f1
|