@maviapi/mcp 0.1.0 → 0.1.2

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
@@ -12,17 +12,28 @@ Agents are bad at the web. Browsing is slow, burns tokens on raw HTML, and stall
12
12
 
13
13
  **Works with no setup.** Out of the box it uses maviapi's shared demo key: 30 requests a minute and 300 a day per network, plus 3 free API builds per 30 days. [Create a free key](https://maviapi.com/sign-up?utm_source=github&utm_medium=readme&utm_campaign=mcp) for more.
14
14
 
15
- **Missing a site? Your agent can have it built.** `create_api` hands maviapi's build agent a URL and a description of the data you want; about half an hour later the new API is live and callable from the same session.
15
+ **Missing a site? Your agent can start a draft.** `create_api` hands maviapi's build agent a URL and a description of the data you want. Follow progress with `get_build_status`, then review and publish the draft from your account before calling the public API. Build duration depends on the site and requested endpoints.
16
16
 
17
17
  ## Install
18
18
 
19
19
  ### Claude Code
20
20
 
21
+ Install it as a plugin from this repo's marketplace:
22
+
23
+ ```
24
+ /plugin marketplace add kuzenlabs/maviapi-mcp
25
+ /plugin install maviapi@maviapi
26
+ ```
27
+
28
+ The plugin reads `MAVIAPI_API_KEY` (and `MAVIAPI_TOOLS`) from your environment, so export your key before starting Claude Code to use it instead of the demo key.
29
+
30
+ Or add the server directly. Quote the package name so zsh doesn't offer to "correct" the `@` scope away:
31
+
21
32
  ```bash
22
- claude mcp add maviapi -- npx -y @maviapi/mcp
33
+ claude mcp add maviapi -- npx -y '@maviapi/mcp'
23
34
 
24
35
  # with your own key
25
- claude mcp add maviapi -e MAVIAPI_API_KEY=mvk_live_... -- npx -y @maviapi/mcp
36
+ claude mcp add maviapi -e MAVIAPI_API_KEY=mvk_live_... -- npx -y '@maviapi/mcp'
26
37
  ```
27
38
 
28
39
  ### Claude Desktop, Cursor, Windsurf, and others
@@ -68,12 +79,12 @@ Leave out `env` to try it with the demo key.
68
79
  | `get_api` | An API's endpoints, their parameters, and the fields each one returns. |
69
80
  | `call_api` | Call an endpoint and get live JSON back. List endpoints return 10 results unless you pass `limit`. |
70
81
  | `create_api` | No API for the site you need? Starts a build from a URL and a plain-language description, and returns a `request_id`. |
71
- | `get_build_status` | Follows a build to `published` (then `get_api` and `call_api` work on it) or `failed`. Builds take about half an hour. |
82
+ | `get_build_status` | Follows build progress and checks public catalog visibility separately. A `published` build status means completion; the owner still reviews and publishes the draft. |
72
83
 
73
84
  A handful of generic tools keeps the agent's context small however large the catalog grows. If you rely on a few APIs, `MAVIAPI_TOOLS` also exposes each of their endpoints as its own typed tool, with a full input schema:
74
85
 
75
86
  ```bash
76
- claude mcp add maviapi -e MAVIAPI_TOOLS=booking,airbnb,kiwi -- npx -y @maviapi/mcp
87
+ claude mcp add maviapi -e MAVIAPI_TOOLS=booking,airbnb,kiwi -- npx -y '@maviapi/mcp'
77
88
  # adds booking_search, booking_explore, airbnb_listing_by_id, kiwi_search, …
78
89
  ```
79
90
 
@@ -88,7 +99,9 @@ claude mcp add maviapi -e MAVIAPI_TOOLS=booking,airbnb,kiwi -- npx -y @maviapi/m
88
99
 
89
100
  `search_apis` with no query lists everything currently in the catalog. And for a site that is not there yet:
90
101
 
91
- - "Build me an API for news.ycombinator.com with the front page stories, points and comment counts, then show me today's top 5."
102
+ - "Start an API build for news.ycombinator.com with front-page stories, points and comment counts."
103
+
104
+ Use your own account and API key when you need to review and publish a build from the [dashboard](https://maviapi.com/dashboard/requests). The shared demo key can start builds, but does not provide an owner dashboard session for them. If an API is already public, `get_api` and `call_api` use its current public build; a newly completed candidate may still await publication.
92
105
 
93
106
  ## Configuration
94
107
 
package/dist/client.js CHANGED
@@ -40,7 +40,7 @@ export class MaviapiClient {
40
40
  value.catch(() => this.endpoints.delete(slug));
41
41
  return value;
42
42
  }
43
- /** Drop the cached catalog, e.g. once a build has published a new API. */
43
+ /** Drop the cached catalog before checking whether an API is public. */
44
44
  invalidateCatalog() {
45
45
  this.catalog = null;
46
46
  }
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = "0.1.0";
1
+ export const VERSION = "0.1.2";
2
2
  export const DEFAULT_BASE_URL = "https://api.maviapi.com";
3
3
  export const SITE_URL = "https://maviapi.com";
4
4
  /**
package/dist/tools.js CHANGED
@@ -57,9 +57,9 @@ const GENERIC_TOOLS = [
57
57
  {
58
58
  name: "create_api",
59
59
  title: "Build a new maviapi API",
60
- description: "Get an API built for a website that no catalog API covers. maviapi's build agent studies the site and deploys a hosted, " +
61
- "self-repairing JSON API from a plain-language description of the data you want. A build takes about half an hour: this " +
62
- "returns a request_id at once, then follow it with get_build_status. " +
60
+ description: "Start an API draft for a website that no catalog API covers. maviapi's build agent studies the site and builds " +
61
+ "a JSON API from a plain-language description. This returns a request_id at once; follow it with get_build_status. " +
62
+ "Build completion does not publish the API. Use your own account and key to review and publish the draft in the dashboard. " +
63
63
  `With the shared demo key each network gets ${PLAYGROUND_FREE_BUILDS} free builds per 30 days.`,
64
64
  inputSchema: {
65
65
  type: "object",
@@ -83,8 +83,9 @@ const GENERIC_TOOLS = [
83
83
  name: "get_build_status",
84
84
  title: "Check a maviapi build",
85
85
  description: "Progress of a build started with create_api: queued, building, deploying, published, or failed. " +
86
- "Once published it names the new API's slug, ready for get_api and call_api. Builds take about half an hour, " +
87
- "so check back every few minutes rather than in a tight loop.",
86
+ "The build status published means the build completed, not that the API is publicly available. " +
87
+ "Checks catalog visibility separately; the owner reviews and publishes drafts in the dashboard. " +
88
+ "Check back every few minutes rather than in a tight loop.",
88
89
  inputSchema: {
89
90
  type: "object",
90
91
  properties: {
@@ -326,8 +327,8 @@ export class Toolset {
326
327
  `request_id: ${payload.id}`,
327
328
  `status: ${payload.status ?? "queued"}`,
328
329
  "",
329
- "A build usually takes about half an hour. Check it with get_build_status (every few minutes is plenty); " +
330
- "once it is published, get_api and call_api can use the new API.",
330
+ "Check progress with get_build_status every few minutes. Build completion does not make the API public.",
331
+ this.publicationGuidance(),
331
332
  ];
332
333
  if (this.config.usingPlaygroundKey) {
333
334
  out.push("", `(Built with the shared demo key: each network gets ${PLAYGROUND_FREE_BUILDS} free builds per 30 days. ` +
@@ -359,10 +360,23 @@ export class Toolset {
359
360
  const recent = (build.progress ?? []).slice(-3).map((p) => `- ${p.message}`);
360
361
  if (recent.length)
361
362
  out.push("Latest progress:", ...recent);
362
- if (build.status === "published" && build.slug) {
363
- // The new API is in the catalog now; make search_apis and get_api see it.
364
- this.client.invalidateCatalog();
365
- out.push("", `The API is live as "${build.slug}". Call get_api with "${build.slug}" to see its endpoints.`);
363
+ if (build.status === "published") {
364
+ out.push("", 'Build completed. The build status "published" does not confirm that this build is public.');
365
+ if (build.slug) {
366
+ // A first build stays private until owner publication. An existing
367
+ // public API can also have a new candidate that is not released yet.
368
+ this.client.invalidateCatalog();
369
+ try {
370
+ const listed = (await this.client.listApis()).some((api) => api.slug === build.slug);
371
+ out.push(listed
372
+ ? `API "${build.slug}" is in the public catalog. get_api and call_api use its current public build; this completed build may still await owner publication.`
373
+ : `API "${build.slug}" is not in the public catalog yet. Review and publish the draft before using get_api or call_api.`);
374
+ }
375
+ catch {
376
+ out.push(`Could not verify public catalog visibility for "${build.slug}". Do not assume the completed build is callable; check again later.`);
377
+ }
378
+ }
379
+ out.push(this.publicationGuidance());
366
380
  }
367
381
  else if (build.status === "failed") {
368
382
  out.push("", `It failed: ${build.error ?? "no reason given"}. A narrower description, or a different page of the site, may build where this did not.`);
@@ -372,6 +386,13 @@ export class Toolset {
372
386
  }
373
387
  return text(out.join("\n"));
374
388
  }
389
+ publicationGuidance() {
390
+ return this.config.usingPlaygroundKey
391
+ ? "The shared demo key does not give you an owner dashboard session for this draft. " +
392
+ `To review and publish your own build, create an account at ${siteLink("/sign-up", "build_publication")} ` +
393
+ "and start the build with your personal MAVIAPI_API_KEY."
394
+ : `The owner can review and publish the draft at ${siteLink("/dashboard/requests", "build_publication")}.`;
395
+ }
375
396
  /** Typed per-endpoint tools for the APIs named in MAVIAPI_TOOLS. */
376
397
  dedicatedTools() {
377
398
  const wanted = this.config.dedicatedApis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maviapi/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server that gives AI agents live, structured JSON from websites with no official API (Booking.com, Airbnb, Tripadvisor, Kiwi.com, Hepsiburada and more), through self-repairing maviapi endpoints.",
5
5
  "mcpName": "io.github.kuzenlabs/maviapi-mcp",
6
6
  "type": "module",