@caravo/mcp 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -8,7 +8,7 @@ Local stdio MCP server for [Caravo](https://caravo.ai) with built-in x402 wallet
8
8
  # Claude Code
9
9
  claude mcp add caravo -- npx -y @caravo/mcp@latest
10
10
 
11
- # Optional: with API key for balance auth + favorites
11
+ # Optional: with API key for balance auth (favorites work either way)
12
12
  claude mcp add caravo -e CARAVO_API_KEY=am_xxx -- npx -y @caravo/mcp@latest
13
13
  ```
14
14
 
@@ -30,9 +30,9 @@ claude mcp add caravo -e CARAVO_API_KEY=am_xxx -- npx -y @caravo/mcp@latest
30
30
  | `list_tags` | List all categories |
31
31
  | `list_providers` | List all providers |
32
32
  | `get_wallet_info` | Get wallet address and USDC balance |
33
- | `favorite_tool` | Bookmark a tool (requires API key) |
34
- | `unfavorite_tool` | Remove bookmark (requires API key) |
35
- | `list_favorites` | List bookmarked tools (requires API key) |
33
+ | `favorite_tool` | Bookmark a tool (server with API key, local without) |
34
+ | `unfavorite_tool` | Remove bookmark (server with API key, local without) |
35
+ | `list_favorites` | List bookmarked tools (server with API key, local without) |
36
36
  | `list_tool_requests` | Browse tool requests |
37
37
  | `request_tool` | Request a new tool |
38
38
  | `upvote_tool_request` | Upvote a tool request |
package/dist/index.js CHANGED
@@ -315,8 +315,15 @@ function registerAllTools(server) {
315
315
  per_page: z.number().optional().describe("Results per page (default 10)"),
316
316
  },
317
317
  }, async ({ query, tag, provider, page = 1, per_page = 10 }) => {
318
- page = Math.max(1, Math.floor(page));
319
- per_page = Math.max(1, Math.min(100, Math.floor(per_page)));
318
+ if (!Number.isInteger(page) || page < 1) {
319
+ return { content: [{ type: "text", text: "Error: page must be a positive integer" }], isError: true };
320
+ }
321
+ if (!Number.isInteger(per_page) || per_page < 1) {
322
+ return { content: [{ type: "text", text: "Error: per_page must be a positive integer" }], isError: true };
323
+ }
324
+ if (per_page > 100) {
325
+ return { content: [{ type: "text", text: "Error: per_page must be at most 100" }], isError: true };
326
+ }
320
327
  const params = new URLSearchParams();
321
328
  if (query)
322
329
  params.set("query", query);
@@ -537,6 +544,15 @@ function registerAllTools(server) {
537
544
  per_page: z.number().optional().describe("Results per page (default 20)"),
538
545
  },
539
546
  }, async ({ status = "open", page = 1, per_page = 20 }) => {
547
+ if (!Number.isInteger(page) || page < 1) {
548
+ return { content: [{ type: "text", text: "Error: page must be a positive integer" }], isError: true };
549
+ }
550
+ if (!Number.isInteger(per_page) || per_page < 1) {
551
+ return { content: [{ type: "text", text: "Error: per_page must be a positive integer" }], isError: true };
552
+ }
553
+ if (per_page > 100) {
554
+ return { content: [{ type: "text", text: "Error: per_page must be at most 100" }], isError: true };
555
+ }
540
556
  const params = new URLSearchParams();
541
557
  params.set("status", status);
542
558
  params.set("page", String(page));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caravo/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Local stdio MCP server for Caravo with built-in x402 wallet",
5
5
  "type": "module",
6
6
  "bin": {