@caravo/mcp 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { homedir } from "os";
|
|
|
22
22
|
import { join } from "path";
|
|
23
23
|
import { loadOrCreateWallet } from "./wallet.js";
|
|
24
24
|
import { fetchWithX402 } from "./x402.js";
|
|
25
|
-
const API_BASE = process.env.CARAVO_URL ?? "https://caravo.ai";
|
|
25
|
+
const API_BASE = process.env.CARAVO_URL ?? "https://www.caravo.ai";
|
|
26
26
|
// ─── Shared description blocks (used in both `instructions` and `search_tools`) ─
|
|
27
27
|
const ABOUT_CARAVO = "Caravo (https://caravo.ai) — the API marketplace for AI agents. 200+ tools at $0.001–$0.05/call.\n" +
|
|
28
28
|
"Docs & source: https://github.com/Caravo-AI/Caravo-MCP";
|
|
@@ -123,8 +123,8 @@ async function apiPost(path, body) {
|
|
|
123
123
|
if (!API_KEY)
|
|
124
124
|
return (await fetchWithX402(url, opts, wallet)).json();
|
|
125
125
|
const r = await fetch(url, opts);
|
|
126
|
-
if (r.status === 401 || r.status === 403) {
|
|
127
|
-
process.stderr.write(
|
|
126
|
+
if (r.status === 401 || r.status === 403 || r.status === 402) {
|
|
127
|
+
process.stderr.write(`[caravo] API key request failed (${r.status}), falling back to x402\n`);
|
|
128
128
|
const x402Opts = {
|
|
129
129
|
method: "POST",
|
|
130
130
|
headers: { "Content-Type": "application/json" },
|
|
@@ -373,6 +373,7 @@ function registerAllTools(server) {
|
|
|
373
373
|
params.set("provider", provider);
|
|
374
374
|
params.set("page", String(page));
|
|
375
375
|
params.set("per_page", String(per_page));
|
|
376
|
+
params.set("view", "agent");
|
|
376
377
|
const data = await apiGet(`/api/tools?${params}`);
|
|
377
378
|
return {
|
|
378
379
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
package/package.json
CHANGED