mcp-server
Discover and pay for APIs with USDC credits. No wallet, no gas, MCP-native marketplace.
我该使用它吗
质量与安全性
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"mcp-server": {
"url": "https://mcp.apihub.io/mcp"
}
}
}远程端点
https://mcp.apihub.io/mcpstreamable-http它能做什么
工具清单
工具(9)
🟢apihub_search(query, category, max_price_microdollars, type)
Read-only. Searches onboarded APIHub services by free-text query, with optional category, price, and type filters. Returns up to 10 matches ranked by uptime and endpoint count, each with slug, description, endpoints array, min price in microdollars, provider name, and quality score. No authentication required. Use this when you need to find an API by capability; use apihub_list_services to browse without a query, apihub_search_external to include the external x402 catalog, or apihub_get_service when you already know a slug. Does not call any upstream API or debit credits.
输入模式
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required free-text query matched against service name and description (case-insensitive substring match). Use 1-3 keywords describing the capability you want, e.g. 'weather' or 'stock price'."
},
"category": {
"type": "string",
"description": "Optional exact-match filter. Valid values: ai, data, search, finance, media, infra, communication, content, travel."
},
"max_price_microdollars": {
"type": "number",
"description": "Optional upper bound on price per request in microdollars (1 USD = 1,000,000 microdollars, so 10000 = $0.01). Services whose cheapest endpoint exceeds this are excluded."
},
"type": {
"type": "string",
"enum": [
"api",
"content"
],
"description": "Optional filter. 'api' = standard REST APIs, 'content' = content gateways that proxy a fixed upstream URL."
}
},
"required": [
"query"
]
}🟢apihub_list_services(limit)
Read-only. Lists onboarded APIHub services alphabetically, returning each service's slug, name, description, category, provider, endpoint count, and lowest per-endpoint price in microdollars. No authentication required. Use this to browse the full onboarded catalog when you don't have a specific capability in mind; prefer apihub_search when filtering by query, category, or price. Does not include external x402 APIs (use apihub_search_external for those) and does not return endpoint-level details (use apihub_get_service for that).
输入模式
{
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Optional max number of services to return. Default 20, minimum 1, hard cap 100. Values above 100 are clamped."
}
}
}🟢apihub_get_service(service_slug)
Get full details for a specific API service including all endpoints, schemas, and pricing.
输入模式
{
"type": "object",
"properties": {
"service_slug": {
"type": "string",
"description": "The service slug (e.g., 'exchange-rates')"
}
},
"required": [
"service_slug"
]
}🟡apihub_call(service_slug, endpoint_path, method, body)
Sends payment. Calls a paid endpoint on an onboarded APIHub service. Debits the endpoint's price from your credit balance and forwards the request to the upstream provider. Returns an object with the upstream response body, HTTP status, and credits_charged_microdollars. Requires a valid API key and sufficient credit balance; if balance is insufficient the call returns a 402 with payment requirements (use apihub_topup to add credits, apihub_balance to check). Use this for services already onboarded to APIHub (find slugs via apihub_search or apihub_list_services); use apihub_call_external for arbitrary x402 URLs not onboarded here, or apihub_read_content for content gateways.
输入模式
{
"type": "object",
"properties": {
"service_slug": {
"type": "string",
"description": "Required. The service slug as returned by apihub_search or apihub_list_services, e.g. 'exchange-rates' or 'weather'."
},
"endpoint_path": {
"type": "string",
"description": "Required. The endpoint path including any leading slash, e.g. '/latest/USD' or '/v1/forecast'. Get valid paths from apihub_get_service."
},
"method": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
],
"description": "Optional HTTP method, default GET. Must match the method declared on the endpoint or the request will fail."
},
"body": {
"type": "string",
"description": "Optional. Request body as a JSON string for POST/PUT. Ignored for GET/DELETE. The proxy forwards this verbatim with Content-Type: application/json."
}
},
"required": [
"service_slug",
"endpoint_path"
]
}🟢apihub_search_external(query, category, limit)
Search external x402-protected APIs (not operated by APIHub, but callable via credits). Returns listings with endpoint counts, prices, and on-chain activity.
输入模式
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search text matched against name/description"
},
"category": {
"type": "string",
"description": "Filter by category (ai, search, finance, media, other)"
},
"limit": {
"type": "number",
"description": "Max results (default 10, max 50)"
}
}
}⚪apihub_call_external(url, method, body, headers)
Call an external x402-protected URL (any provider in the marketplace or any x402 API). APIHub pays the provider on your behalf using the platform wallet and debits your credit balance for the exact amount. No wallet or gas required.
输入模式
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The full URL to call (e.g. https://hub.atxp.ai/...)"
},
"method": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
],
"description": "HTTP method (default POST)"
},
"body": {
"description": "Request body (object or string). Omit for GET."
},
"headers": {
"type": "object",
"description": "Additional request headers. Do not set Authorization or X-PAYMENT - handled automatically."
}
},
"required": [
"url"
]
}🟢apihub_read_content(service_slug, url)
Read web content through a paid content gateway. Returns clean, structured text extracted from the URL. Use this for content services (service_type = 'content').
输入模式
{
"type": "object",
"properties": {
"service_slug": {
"type": "string",
"description": "The content service slug"
},
"url": {
"type": "string",
"description": "The full URL to read (must match a verified domain on the service)"
}
},
"required": [
"service_slug",
"url"
]
}⚪apihub_topup(amount_dollars)
Purchase APIHub credits via x402 (USDC on Base). Returns payment instructions including a web URL for browser-based payment, a CLI command, and raw x402 requirements for agents with wallet support. Credits are added to your account instantly once payment confirms on-chain.
输入模式
{
"type": "object",
"properties": {
"amount_dollars": {
"type": "number",
"description": "Amount to top up in USD. Minimum $5.00, maximum $10,000 per call. Example: 10 for $10."
}
},
"required": [
"amount_dollars"
]
}🟡apihub_balance
Read-only. Returns your current APIHub credit balance (in microdollars and USD), total lifetime spending (microdollars and USD), and total completed request count. Requires a valid API key. Use before apihub_call or apihub_call_external to confirm sufficient funds for a paid request, or periodically to audit usage. Does not modify state, send payments, or call upstream APIs; for top-ups use apihub_topup.
输入模式
{
"type": "object",
"properties": {}
}社区
证据