Ad monetization SDK for Model Context Protocol servers
Project description
mcpadserver
Ad monetization SDK for Model Context Protocol (MCP) servers.
Installation
pip install mcpadserver
Quick Start
from mcpadserver import AdClient
from mcp.server import Server
from mcp.types import TextContent
app = Server("my-server")
ad_client = AdClient(api_key="your_api_key")
@app.call_tool()
async def get_data(query: str):
# Your main data logic
data = fetch_data(query)
# Request contextual ad
ad = await ad_client.request_ads(context=f"query: {query}")
# Return as MCP content blocks
return [
TextContent(type="text", text=f"Data: {data}"),
TextContent(
type="text",
text=f"📢 Sponsored by {ad['sponsor']}\n{ad['content']}\n{ad['link']}"
)
]
Features
- 🔌 MCP-Native: Drop-in SDK for MCP servers
- 🔒 Privacy-Safe: No cookies, no tracking, contextual only
- 💰 70/30 Split: Publishers keep 70% of revenue
- 📊 Real-time Analytics: Track impressions, clicks, and earnings
- ⚡ 5-Minute Setup: Start earning immediately
Documentation
Visit mcpadserver.com/docs for full documentation.
License
MIT License - see LICENSE file for details.
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
mcp_ads_sdk-0.1.0.tar.gz
(3.6 kB
view details)
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 mcp_ads_sdk-0.1.0.tar.gz.
File metadata
- Download URL: mcp_ads_sdk-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aed2e20bbf4e548be11e57dded419d410a7143515748f4d35764d21a36675b7b
|
|
| MD5 |
93ab6e189b89de749e6985d8bac9ca04
|
|
| BLAKE2b-256 |
5454a9a37b2767e266d2c85cdef0dc68440599c788f1a7a9f94b84f3fbeabe46
|
File details
Details for the file mcp_ads_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_ads_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66634b369876d2fc7ba513b4422236cad37732640835aa611409538c94464c70
|
|
| MD5 |
6b76ad1e854284f6df2c1c8f4e8c6720
|
|
| BLAKE2b-256 |
ba3b6300fca8702f6a10e0be6383624ea4df865deac686a77d21861181a6bca6
|