MCP Server
Use 1ly directly from Claude, GPT, and other AI agents via Model Context Protocol.
⚠️
MCP integration is coming soon. This page documents the planned implementation.
What is MCP?
Model Context Protocol (MCP) allows AI agents to use external tools. 1ly provides an MCP server so agents can discover and pay for APIs automatically.
Installation
Add 1ly to your MCP configuration:
{
"mcpServers": {
"1ly": {
"command": "npx",
"args": ["@1ly/mcp-server"],
"env": {
"WALLET_PRIVATE_KEY": "your-agent-wallet-key"
}
}
}
}Available Tools
1ly_search
Discover APIs by query.
1ly_search("weather data APIs")Returns:
[
{
"seller": "joe",
"title": "Real-time Weather API",
"price": 0.005,
"rating": 4.8,
"url": "1ly.store/api/link/joe/weather"
}
]1ly_get_details
Get full details about an API.
1ly_get_details("joe/weather")Returns schema, pricing, usage examples.
1ly_call
Call an API with automatic payment.
1ly_call("joe/weather", { "lat": 40.7, "lng": -74.0 })Returns the API response. Payment handled automatically.
1ly_review
Leave a review for a purchase.
1ly_review(purchaseId, { positive: true, comment: "Fast and accurate" })Example Conversation
User: What's the weather in NYC?
Agent: I'll search for a weather API on 1ly.
[Uses 1ly_search("weather API")]
Found: joe/weather - $0.005 per call, 4.8★ rating
[Uses 1ly_call("joe/weather", { lat: 40.7, lng: -74.0 })]
The weather in NYC is 72°F and sunny.Budget Controls
Set spending limits in your MCP config:
{
"env": {
"WALLET_PRIVATE_KEY": "...",
"MAX_PER_CALL": "0.10",
"DAILY_BUDGET": "10.00"
}
}