mcp-meilisearch 1.2.4 → 1.2.5

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.
Files changed (2) hide show
  1. package/README.md +46 -83
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,33 +1,19 @@
1
1
  # MCP Meilisearch API Server
2
2
 
3
- A Model Context Protocol (MCP) server implementation that provides a bridge between AI models and the Meilisearch search engine using the StreamableHTTP transport. This project enables seamless integration of Meilisearch's powerful search capabilities within AI workflows.
3
+ A Model Context Protocol (MCP) server implementation that provides a bridge between AI models and the Meilisearch search engine.
4
4
 
5
- ## Updated Overview
6
-
7
- This project provides a MCP server that enables AI models to interact directly with Meilisearch functionalities. The architecture includes:
5
+ ## Overview
8
6
 
9
7
  - **MCP Server**: Exposes Meilisearch APIs as tools using the Model Context Protocol.
10
8
  - **Web Client Demo**: A demo interface showcasing search functionalities.
11
9
 
12
10
  ## Key Features
13
11
 
14
- - **StreamableHTTP Transport**: Real-time communication between clients and the server.
12
+ - **Multiple Transport Options**: Supports both STDIO and StreamableHTTP transports.
13
+ - **Real-time Communication**: Enables seamless interaction between clients and the server.
15
14
  - **Meilisearch API Support**: Full access to Meilisearch functionalities.
16
- - **Enhanced Error Handling**: Improved error management for API requests.
17
15
  - **Web Client Demo**: Updated interface for demonstrating search capabilities.
18
16
 
19
- ## Tool Categories
20
-
21
- The MCP server organizes Meilisearch APIs into these categories:
22
-
23
- 1. **System Tools**: Health checks, version info, server stats.
24
- 2. **Index Tools**: Manage indexes (create, update, delete, list).
25
- 3. **Document Tools**: Add, update, delete, and retrieve documents.
26
- 4. **Search Tools**: Advanced search, including vector search.
27
- 5. **Settings Tools**: Configure index settings.
28
- 6. **Task Tools**: Manage asynchronous tasks.
29
- 7. **Vector Tools**: Experimental vector search capabilities.
30
-
31
17
  ## Getting Started
32
18
 
33
19
  ### Prerequisites
@@ -36,57 +22,68 @@ The MCP server organizes Meilisearch APIs into these categories:
36
22
  - A running Meilisearch instance (local or remote).
37
23
  - API key for Meilisearch (if required).
38
24
 
39
- ### Setup Instructions
25
+ ### Installation
40
26
 
41
- 1. Clone the repository:
27
+ Install the package:
42
28
 
43
29
  ```bash
44
- git clone https://github.com/falcosan/mcp
45
- ```
30
+ # Using npm
31
+ npm install mcp-meilisearch
46
32
 
47
- 2. Install dependencies:
33
+ # Using yarn
34
+ yarn add mcp-meilisearch
48
35
 
49
- ```bash
50
- npm install
36
+ # Using pnpm
37
+ pnpm add mcp-meilisearch
51
38
  ```
52
39
 
53
- 3. Configure the environment:
40
+ ### Options
54
41
 
55
- Create a `.env` file with the following content:
42
+ #### Meilisearch Connection Options
56
43
 
57
- ```
58
- MEILISEARCH_HOST=http://localhost:7700
59
- MEILISEARCH_API_KEY=your_master_key_here
60
- ```
44
+ - `meilisearchHost`: URL of the Meilisearch instance (Default: "http://localhost:7700")
45
+ - `meilisearchApiKey`: API key for authenticating with Meilisearch (Default: "")
46
+
47
+ #### MCP Server Options
61
48
 
62
- ### Running the Server
49
+ - `transport`: Transport type for MCP server ("http" | "stdio") (Default: "http")
50
+ - `httpPort`: HTTP port for MCP server (Default: 4995)
51
+ - `mcpEndpoint`: MCP endpoint path (Default: "/mcp")
63
52
 
64
- To start the server:
53
+ #### Session Options
65
54
 
66
- ```bash
67
- npm run server # Start the MCP server
68
- npm run demo # Start the Web client demo
69
- ```
55
+ - `sessionTimeout`: Session timeout in milliseconds (Default: 3600000)
56
+ - `sessionCleanupInterval`: Session cleanup interval in milliseconds (Default: 60000)
70
57
 
71
- ### Accessing the Web Interface
58
+ ### Using the MCPClient
72
59
 
73
- Visit the following URL in your browser:
60
+ The package also exports the MCPClient class for client-side integration:
74
61
 
75
- ```
76
- http://localhost:8080
77
- ```
62
+ ```typescript
63
+ import { MCPClient } from "mcp-meilisearch/client";
64
+
65
+ const client = new MCPClient("mcp-meilisearch-client");
66
+ await client.connectToServer("http://localhost:4995/mcp");
78
67
 
79
- ## Development
68
+ // Call a tool
69
+ const result = await client.callTool("search-across-all-indexes", {
70
+ q: "search kiosco antonio",
71
+ });
72
+ ```
80
73
 
81
- This project uses:
74
+ ## Tools
82
75
 
83
- - **TypeScript**: Ensures type safety.
84
- - **Express**: Powers the web server.
85
- - **Model Context Protocol SDK**: Facilitates AI integration.
76
+ The MCP server exposes various tools that allow you to interact with Meilisearch functionalities. Each tool corresponds to a specific Meilisearch API endpoint, enabling you to perform operations such as searching, indexing, and managing documents.
86
77
 
87
- ## Available Tools
78
+ ### Tool Categories
88
79
 
89
- This section details all the available tools, their descriptions, and parameters.
80
+ 1. **System Tools**: Health checks, version info, server stats.
81
+ 2. **Index Tools**: Manage indexes (create, update, delete, list).
82
+ 3. **Document Tools**: Add, update, delete, and retrieve documents.
83
+ 4. **Search Tools**: Advanced search, including vector search.
84
+ 5. **Settings Tools**: Configure index settings.
85
+ 6. **Task Tools**: Manage asynchronous tasks.
86
+ 7. **Vector Tools**: Experimental vector search capabilities.
90
87
 
91
88
  ### System Tools
92
89
 
@@ -386,37 +383,3 @@ This section details all the available tools, their descriptions, and parameters
386
383
  - `query` (string, optional): Text query to search for (if using 'embedder' instead of 'vector').
387
384
  - `hybrid` (boolean, optional): Whether to perform a hybrid search (combining vector and text search).
388
385
  - `hybridRatio` (number, optional): Ratio of vector vs text search in hybrid search (0-1, default: 0.5).
389
-
390
- ### Options
391
-
392
- #### Meilisearch Connection Options
393
-
394
- - `meilisearchHost`: URL of the Meilisearch instance (Default: "http://localhost:7700")
395
- - `meilisearchApiKey`: API key for authenticating with Meilisearch (Default: "")
396
-
397
- #### MCP Server Options
398
-
399
- - `transport`: Transport type for MCP server ("http" | "stdio") (Default: "http")
400
- - `httpPort`: HTTP port for MCP server (Default: 4995)
401
- - `mcpEndpoint`: MCP endpoint path (Default: "/mcp")
402
-
403
- #### Session Options
404
-
405
- - `sessionTimeout`: Session timeout in milliseconds (Default: 3600000)
406
- - `sessionCleanupInterval`: Session cleanup interval in milliseconds (Default: 60000)
407
-
408
- ### Using the MCPClient
409
-
410
- The package also exports the MCPClient class for client-side integration:
411
-
412
- ```typescript
413
- import { MCPClient } from "mcp-meilisearch/client";
414
-
415
- const client = new MCPClient("mcp-meilisearch-client");
416
- await client.connectToServer("http://localhost:4995/mcp");
417
-
418
- // Call a tool
419
- const result = await client.callTool("search-across-all-indexes", {
420
- q: "search kiosco antonio",
421
- });
422
- ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-meilisearch",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Model Context Protocol (MCP) implementation for Meilisearch",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",