@maviapi/mcp 0.2.1 → 0.2.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
@@ -1,6 +1,8 @@
1
1
  # maviapi MCP server
2
2
 
3
- Give Claude, Cursor, or any MCP client **live, structured JSON from websites that have no API**: Booking.com, Airbnb, Tripadvisor, Kiwi.com, Trainline, Hepsiburada, Yemeksepeti and more, plus any site you ask for.
3
+ [![npm](https://img.shields.io/npm/v/@maviapi/mcp)](https://www.npmjs.com/package/@maviapi/mcp) [![kuzenlabs/maviapi-mcp MCP server](https://glama.ai/mcp/servers/kuzenlabs/maviapi-mcp/badges/score.svg)](https://glama.ai/mcp/servers/kuzenlabs/maviapi-mcp)
4
+
5
+ **The unofficial API for any website, as MCP tools.** Give Claude, Cursor, or any MCP client live, structured JSON from websites that have no official API: Booking.com, Airbnb, Tripadvisor, Kiwi.com, Trainline, Hepsiburada, Yemeksepeti and more, plus any site you ask for. These are independent integrations, not affiliated with the sites.
4
6
 
5
7
  ```
6
8
  You: Find me a 3-night Airbnb in Lisbon next month under €120 a night.
@@ -28,6 +30,14 @@ To try it without an account, connect to `https://mcp.maviapi.com/demo` (search
28
30
 
29
31
  The rest of this section runs the server locally from npm.
30
32
 
33
+ ### Gemini CLI
34
+
35
+ ```bash
36
+ gemini extensions install https://github.com/kuzenlabs/maviapi-mcp
37
+ ```
38
+
39
+ The extension connects to the hosted server and signs you in to maviapi the first time a tool runs.
40
+
31
41
  ### Claude Code
32
42
 
33
43
  Install it as a plugin from this repo's marketplace:
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = "0.2.1";
1
+ export const VERSION = "0.2.3";
2
2
  export const DEFAULT_BASE_URL = "https://api.maviapi.com";
3
3
  export const SITE_URL = "https://maviapi.com";
4
4
  /**
package/dist/server.js CHANGED
@@ -3,12 +3,19 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprot
3
3
  import { MaviapiClient } from "./client.js";
4
4
  import { VERSION } from "./config.js";
5
5
  import { Toolset } from "./tools.js";
6
- const INSTRUCTIONS = `maviapi gives you live, structured JSON from websites that have no official API (travel, e-commerce, news, events, finance and more).
6
+ const INSTRUCTIONS = `maviapi is the unofficial API for any website: live, structured JSON from websites that have no official API (travel, e-commerce, news, events, finance and more).
7
7
  Workflow: search_apis to find an API for a site or topic, get_api to read its endpoints and parameters, then call_api to fetch data.
8
8
  If no API covers the site you need, create_api builds one (about half an hour; follow it with get_build_status).
9
9
  If an API exists but lacks an endpoint, or you need one to behave differently, request_endpoint adds one: preview it, let the user agree, start it with confirm: true, follow it with get_build_status (wait_seconds), try it with call_draft, and publish_request when the user wants it live.
10
10
  If an endpoint is simply broken (it fails, comes back empty, or repeats the same page), report_endpoint_issue with the params of the failing call: maviapi replays it and checks the endpoint itself. A fault its own check confirms is repaired in place; the rest are read by a person.
11
11
  Starting a build and publishing change things for the user: do them when the user asked, not on your own.`;
12
+ /**
13
+ * App directories (Claude's among them) read a tool's display name from
14
+ * annotations.title, so each tool carries its title there too.
15
+ */
16
+ export function withAnnotationTitles(tools) {
17
+ return tools.map((tool) => tool.title && !tool.annotations?.title ? { ...tool, annotations: { title: tool.title, ...tool.annotations } } : tool);
18
+ }
12
19
  /**
13
20
  * The tool list is computed at request time (MAVIAPI_TOOLS adds one typed tool
14
21
  * per endpoint, read from the live catalog), so the handlers are registered on
@@ -18,7 +25,7 @@ Starting a build and publishing change things for the user: do them when the use
18
25
  export function createServer(config, fetchImpl) {
19
26
  const toolset = new Toolset(new MaviapiClient(config, fetchImpl));
20
27
  const mcp = new McpServer({ name: "maviapi", title: "maviapi", version: VERSION, websiteUrl: "https://maviapi.com" }, { capabilities: { tools: {} }, instructions: INSTRUCTIONS });
21
- mcp.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: await toolset.list() }));
28
+ mcp.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: withAnnotationTitles(await toolset.list()) }));
22
29
  mcp.server.setRequestHandler(CallToolRequestSchema, (request) => toolset.call(request.params.name, request.params.arguments ?? {}));
23
30
  return mcp;
24
31
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maviapi/mcp",
3
- "version": "0.2.1",
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.",
3
+ "version": "0.2.3",
4
+ "description": "MCP server for maviapi, the unofficial API for any website: hosted, documented JSON APIs for sites with no official API, kept working when the site changes.",
5
5
  "mcpName": "io.github.kuzenlabs/maviapi-mcp",
6
6
  "type": "module",
7
7
  "bin": {