MCP Server Reference
The @lightfastai/mcp package provides a Model Context Protocol server that exposes Lightfast tools to AI assistants.
Installation
CLI Options
| Option | Type | Default | Description |
|---|---|---|---|
--api-key | string | $LIGHTFAST_API_KEY | Lightfast API key |
--base-url | string | https://lightfast.ai | API base URL |
--help, -h | - | - | Show help message |
--version, -v | - | - | Show version |
Environment Variables
| Variable | Description |
|---|---|
LIGHTFAST_API_KEY | API key (alternative to --api-key flag) |
Tools
The MCP server exposes three tools to AI assistants.
lightfast_search
Search through workspace memory for relevant documents and observations.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | - | Natural language search query |
limit | number | No | 10 | Number of results to return |
mode | string | No | "balanced" | Search mode: "fast", "balanced", or "quality" |
filters | object | No | - | Filter object with sources and dateRange |
Example Request
Response Schema
lightfast_contents
Fetch full content for documents by their IDs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Array of document IDs to fetch |
Example Request
Response Schema
lightfast_find_similar
Find content semantically similar to a given document or URL.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | One of id/url | - | Document ID |
url | string | One of id/url | - | URL to find similar content for |
limit | number | No | 10 | Number of results |
threshold | number | No | 0.5 | Minimum similarity score (0-1) |
Example Request
Response Schema
Error Responses
All tools return errors in the following format:
| Error Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing API key |
VALIDATION_ERROR | Invalid parameters |
NOT_FOUND | Resource not found |
INTERNAL_ERROR | Server error |
Related
- MCP Setup Guide - Configuration for Claude, Cursor, Codex
- POST /v1/search - REST API endpoint reference
- GitHub Repository - MCP server source code