UNPKG

slite-mcp-server

Version:

'Slite MCP server'

91 lines (67 loc) 3.03 kB
# Slite Model Context Protocol This package provides a [Model Context Protocol](https://modelcontextprotocol.com/) server for integrating Slite's OpenAPI functionality with AI models that support function calling through MCP. ## Installation & Usage You can run the Slite MCP server directly using npx: ```bash npx -y slite-mcp --api-key=YOUR_SLITE_API_KEY ``` Alternatively, you can set your API key as an environment variable: ```bash export SLITE_API_KEY=YOUR_SLITE_API_KEY npx -y slite-mcp ``` # Available Tools | Tool Name | Description | Parameters | | ------------------- | ----------------------------------------------------------- | ------------------------------------------------- | | `search-notes` | Searches notes in Slite based on a query | `query` (string): The search query to perform | | `ask-slite` | Asks a question to Slite and returns an answer with sources | `question` (string): The question to ask Slite | | `get-note` | Retrieves a specific note from Slite by its ID | `noteId` (string): The ID of the note to retrieve | | `get-note-children` | Retrieves all child notes of a specific note | `noteId` (string): The ID of the parent note | # Command Line Options | Option | Description | | ------------ | --------------------------------------------------------------- | | `--api-key` | Your Slite API key (required unless `SLITE_API_KEY` env is set) | | `--base-url` | Custom API base URL (default: `https://api.slite.com/`) | | `--help, -h` | Show help text | # Usage with Claude Add the following to your `claude_desktop_config.json`. See the [MCP documentation](https://modelcontextprotocol.io/quickstart/user) for more details. To ensure compatibility with Claude, we recommend that `npx` command be accessible within the same environment. A common location for this is `/usr/local/bin/node` (on mac) ```json { "mcpServers": { "slite": { "command": "npx", "args": ["-y", "slite-mcp"], "env": { "SLITE_API_KEY": "YOUR_SLITE_API_KEY" } } } } ``` or ```json { "mcpServers": { "slite": { "command": "npx", "args": ["-y", "slite-mcp", "--api-key=YOUR_SLITE_API_KEY"] } } } ``` ## Development Clone the repository and install dependencies: ```bash git clone git@github.com:sliteteam/slite-mcp-server.git cd slite-mcp-server npm install ``` # Available Scripts | Script | Description | | ---------------- | ---------------------------- | | `npm run build` | Build the TypeScript project | | `npm run lint` | Run ESLint | | `npm run format` | Format code with Prettier | # License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.