MCP Documentation
AgentClick MCP Server v1.0.0 — 35 Tools
AgentClick supports the Model Context Protocol (MCP). Automate program search, partnerships, and conversion tracking directly from Claude Code, Cursor, and other MCP-compatible AI agents.
1. Quick Start
Step 1: Get an API Key
After logging in, generate a key from the "API Keys" menu in your dashboard. The format is aa_ followed by 48 alphanumeric characters (51 characters total).
Step 2: Configure .mcp.json
Create .mcp.json in the root of your project:
{
"mcpServers": {
"agentclick": {
"command": "npx",
"args": ["@agentclick-ai/mcp"],
"env": {
"AIASP_API_KEY": "aa_your_api_key_here"
}
}
}
}
Step 3: Start Using
Launch your AI agent (e.g., Claude Code) and the MCP server will connect automatically. Simply instruct it to "find programs for AI chatbots" and the agent will call the publisher_programs_search tool on your behalf.
2. Authentication (API Key)
All requests (except health) require an API key.
| Format | aa_ + 48-char hex = 51 characters |
|---|---|
| Auth Method | Environment variable AIASP_API_KEY |
| Max Keys | Up to 10 keys per account |
| Roles | publisher / advertiser / agent |
API keys can be issued, revoked, or deleted at any time from the "API Keys" page in your dashboard.
3. Rate Limits
| Operation | Limit | Notes |
|---|---|---|
| Read | 200 req/min | Search, list, reports, etc. |
| Write | 30 req/min | Partnership apply, click tracking, CV recording, etc. |
When the limit is exceeded, 429 Too Many Requests is returned. Wait one minute before retrying.
4. Common Tools (5)
Available to all roles.
health
Health check. No authentication required. Verify server availability.
Parameters: None
common_categories
Retrieve the category list. Used as a filter for program search.
Parameters: None
Response: categories[] — id, name, slug, description, sort_order
common_stats
Public platform statistics. Active program count, publisher count, advertiser count, and approved conversion count.
Parameters: None
common_profile
Retrieve profile information for the authenticated user.
Parameters: None
Response: User info + role-specific profile (site info or company info)
common_api_key_info
API key usage details. Request count, allowed actions, and last used timestamp.
Parameters: None
5. Publisher Tools (19)
Available to publisher or agent roles.
publisher_programs_search
Search public programs. Filter by category, reward type, keyword, and minimum reward amount.
| Parameter | Type | Description |
|---|---|---|
category_id | integer | Category ID |
category_slug | string | Category slug (e.g., ai-chatbot) |
reward_type | string | cpa / cpc / cpi |
keyword | string | Keyword search (program name and description) |
min_reward | integer | Minimum reward amount (JPY) |
self_affiliate | boolean | Self-affiliate eligible only |
min_confirmation_rate | integer | Minimum approval rate (%) |
allow_listing | boolean | Listing ads permitted only |
has_product_link | boolean | Has product link only |
itp_supported | boolean | ITP-compatible only |
is_campaign | boolean | Currently on campaign only |
is_new | boolean | New arrivals only |
auto_approve | boolean | Instant approval only |
sort | string | newest / reward_desc / reward_asc / name / confirmation_rate_desc / epc_desc |
page | integer | Page number (default: 1) |
per_page | integer | Results per page (default: 20, max: 50) |
publisher_programs_detail
Program details. Reward conditions, cookie duration, creative list, LP URL, and current partnership status.
| Parameter | Type | Required | Description |
|---|---|---|---|
program_id | integer | Required | Program ID |
publisher_partnerships_apply
Apply for a partnership. Programs with auto_approve are approved instantly.
| Parameter | Type | Required | Description |
|---|---|---|---|
program_id | integer | Required | Program ID to partner with |
Response: partnership_id, status, tracking_code
publisher_partnerships_cancel
Cancel a pending partnership application.
| Parameter | Type | Required | Description |
|---|---|---|---|
partnership_id | integer | Required | Partnership ID to cancel |
publisher_partnerships_list
List partnerships including tracking codes. Filterable by status.
| Parameter | Type | Description |
|---|---|---|
status | string | pending / approved / rejected / suspended |
page | integer | Page number |
per_page | integer | Results per page |
publisher_links_generate
Generate tracking links. Returns three formats — URL, HTML tag, and JS tag — plus a PR disclosure template.
| Parameter | Type | Required | Description |
|---|---|---|---|
partnership_id | integer | Required | Approved partnership ID |
publisher_selfback_list
List programs eligible for self-affiliate. Sorted by reward amount.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
per_page | integer | Results per page |
publisher_selfback_apply
Submit a self-affiliate application. Handles partnership, click, and redirect URL in a single shot. One application per program.
| Parameter | Type | Required | Description |
|---|---|---|---|
program_id | integer | Required | Program ID |
publisher_report
Conversion report. Specify date range; aggregate by program or by day. Includes click statistics.
| Parameter | Type | Description |
|---|---|---|
start_date | string | YYYY-MM-DD (default: start of current month) |
end_date | string | YYYY-MM-DD (default: today) |
group_by | string | program / daily |
publisher_earnings_summary
Earnings summary. Pending balance, current month earnings, cumulative total, paid out, and 6-month monthly trend.
Parameters: None
publisher_earnings_payouts
Payout history. Includes gross reward, withholding tax, fee, and net payout amount.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
per_page | integer | Results per page |
publisher_notifications_list
List notifications. Filterable to unread only.
| Parameter | Type | Description |
|---|---|---|
unread_only | boolean | Retrieve unread notifications only |
page | integer | Page number |
per_page | integer | Results per page |
publisher_notifications_read
Mark notifications as read. Specify an ID to mark one; omit to mark all as read.
| Parameter | Type | Description |
|---|---|---|
notification_id | integer | Notification ID (omit to mark all as read) |
publisher_offers_list
List offers received from advertisers. Supports status and unread filters.
| Parameter | Type | Description |
|---|---|---|
status | string | pending / accepted / rejected / all (default: all) |
unread_only | boolean | Return unread only |
page | integer | Page number |
per_page | integer | Items per page |
publisher_offer_messages_list
Retrieve messages in an offer thread.
| Parameter | Type | Required | Description |
|---|---|---|---|
offer_id | integer | Yes | Offer ID |
publisher_offer_messages_send
Send a message in an offer thread.
| Parameter | Type | Required | Description |
|---|---|---|---|
offer_id | integer | Yes | Offer ID |
message | string | Yes | Message body (max 2000 chars) |
publisher_offer_messages_read
Mark messages in an offer thread as read.
| Parameter | Type | Required | Description |
|---|---|---|---|
offer_id | integer | Yes | Offer ID |
6. Agent Tools (6)
Exclusive to the agent role. Optimized for A2A referral and IoT device integration.
agent_recommend
Recommend matching programs based on user requirements. Ideal for A2A referral flows.
| Parameter | Type | Description |
|---|---|---|
use_case | string | Use case (e.g., code generation, image generation) |
category_slug | string | Category slug |
category_id | integer | Category ID |
reward_type | string | cpa / cpc / cpi |
limit | integer | Number of results (default: 5, max: 20) |
agent_program_detail
Retrieve public program info and creative list. Used to confirm recommendation details.
| Parameter | Type | Required | Description |
|---|---|---|---|
program_id | integer | Required | Program ID |
agent_track_click
Record a click via an agent. Use context to log the device type.
| Parameter | Type | Required | Description |
|---|---|---|---|
partnership_id | integer | Required | Partnership ID |
context | string | voice-assistant / iot-device / chatbot, etc. | |
user_agent | string | User agent string |
Response: click_id, tracking_url, lp_url
agent_record_conversion
Record a conversion. Use order_id to prevent duplicates.
| Parameter | Type | Required | Description |
|---|---|---|---|
tracking_code | string | Required | Tracking code (32-char hex) |
order_id | string | Order ID (for deduplication) | |
amount | integer | Conversion amount (JPY) |
agent_catalog
Full public program catalog (lightweight: name, category, and reward only). For initial load or caching.
Parameters: None
agent_categories
Category list with program counts.
Parameters: None
7a. Advertiser Tools (5)
Available to the advertiser role.
advertiser_plan_status
Get current advertiser plan info (plan name, offer limit, usage, remaining, cycle start date) and all available plans.
Parameters: None
advertiser_plan_subscribe
Purchase or change plan. Returns a Stripe Checkout URL. Open in browser to complete payment.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
plan | string | Yes | Plan to subscribe to (light / standard / unlimited) |
advertiser_plan_cancel
Cancel current plan and revert to Free plan.
Parameters: None
Program Boost Tools
advertiser_boost_purchase
Purchase a Program Boost (¥5,000 / 1 week). Programs appear with a "Promoted" badge at the top of publisher search results. Returns a Stripe Checkout URL.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
program_id | integer | Yes | Program ID to boost |
headline | string | No | Headline (max 100 chars) |
advertiser_boost_status
Check your program boost status (history, available slots, pricing info).
Parameters: None
Media Boost Tools
publisher_boost_purchase
Purchase a Media Boost (¥3,000 / 1 week). Displays a banner on the LP and dashboard. Returns a Stripe Checkout URL.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
site_id | integer | Yes | Site ID to boost |
headline | string | No | Headline (max 100 chars) |
description | string | No | Description (max 200 chars) |
publisher_boost_status
Check your boost status (history, available slots, pricing info).
Parameters: None
7. Roles & Access
| Role | Common (5) | Publisher (19) | Agent (6) | Advertiser (5) |
|---|---|---|---|---|
publisher | Yes | Yes | No | No |
advertiser | Yes | No | No | Yes |
agent | Yes | Yes | Yes | No |
The agent role has access to all publisher and agent tools. It is the recommended role for autonomous AI agent operations.
8. Usage Flow Examples
A. Publisher: Find and Join a Program
// 1. Fetch category list
common_categories()
// 2. Search for AI chatbot programs
publisher_programs_search({ category_slug: "ai-chatbot" })
// 3. View program details
publisher_programs_detail({ program_id: 42 })
// 4. Apply for partnership
publisher_partnerships_apply({ program_id: 42 })
// → { partnership_id: 15, status: "approved", tracking_code: "abc123..." }
// 5. Generate tracking link
publisher_links_generate({ partnership_id: 15 })
B. Agent: A2A Referral Flow
// 1. Recommend programs matching user needs
agent_recommend({ use_case: "image generation" })
// 2. Record click (e.g., from an IoT device)
agent_track_click({
partnership_id: 15,
context: "voice-assistant"
})
// → { tracking_url: "https://...", lp_url: "https://..." }
// 3. Record conversion after user signs up
agent_record_conversion({
tracking_code: "abc123...",
order_id: "ORDER-001",
amount: 9800
})
9. Error Handling
| HTTP Status | Meaning | Action |
|---|---|---|
400 | Bad Request | Check your parameters |
401 | Unauthorized | API key is invalid or not set |
403 | Forbidden | Action not permitted for your role |
404 | Not Found | Specified resource does not exist |
409 | Conflict | Duplicate (existing partnership, duplicate order_id, etc.) |
422 | Unprocessable | Missing required parameters |
429 | Too Many Requests | Rate limit exceeded. Wait one minute and retry |
Error response format:
{
"success": false,
"message": "Description of the error"
}
Start Building Today
Sign up for free and get your API key. Start integrating with AI agents right away.
Want to start affiliate marketing?
Sign Up as Publisher (Free)
For advertisers looking to promote
Advertise for Free