MCP server for RTB House API
Node.js server implementing Model Context Protocol (MCP) for RTB House API.
This server provides the following tools:
* get_rtb_house_data: Fetch reporting data from RTB House API for a specific date range.
* Input Parameters:
* dateFrom (string, required): Start date for the report in YYYY-MM-DD format.
* dateTo (string, required): End date for the report in YYYY-MM-DD format.
* app (string, optional): Optional app/advertiser name to filter results. If not provided, returns data for all advertisers.
* maxRetries (integer, optional): Maximum number of retry attempts (default: 3).
* Output: Returns a mapping of app/advertiser name to data array as JSON. Each data item includes fields such as day, subcampaign, impsCount, clicksCount, campaignCost, etc.
1. Environment Variables: Before running the server, you need to set the following environment variables:
``bash`
export RTB_HOUSE_USER='your_rtbhouse_username'
export RTB_HOUSE_PASSWORD='your_rtbhouse_password'
Required Environment Variables:
* RTB_HOUSE_USER: RTB House API usernameRTB_HOUSE_PASSWORD
* : RTB House API password
1. Start the server after setting the required environment variables:
`bash`
node dist/index.js
2. The server exposes the following tool:
* get_rtb_house_data
* dateFrom (string, required): Start date in YYYY-MM-DD formatdateTo
* (string, required): End date in YYYY-MM-DD formatapp
* (string, optional): App/advertiser name (case-insensitive)maxRetries
* (integer, optional): Maximum retry attempts (default: 3){ [appName]: [ { day, subcampaign, impsCount, clicksCount, campaignCost, ... } ] }
* Returns:
Example request:
`json`
{
"dateFrom": "2025-06-10",
"dateTo": "2025-06-15"
}
Example response:
`json`
{
"US_ZipRecruiter_App": [
{
"subcampaign": "campaign_name",
"day": "2025-06-14",
"impsCount": 138733,
"clicksCount": 4946,
"campaignCost": 378.49
},
...
]
}
1. Clone the repository.
2. Navigate to the src/rtb-house-reporting directory.npm install
3. Install dependencies: RTB_HOUSE_USER
4. Set the required environment variables (, RTB_HOUSE_PASSWORD).npm run build
5. Build the project: node dist/index.js`
6. Run the server directly:
MIT