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 the following tool to AI assistants.
lightfast_search
Search through connected tools for relevant decisions and observations.
Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Search query text |
limit | number | No | 10 | Max results (1–100) |
offset | number | No | 0 | Pagination offset |
mode | "fast" | "balanced" | No | "balanced" | fast = vector scores only, balanced = Cohere rerank |
sources | string[] | No | — | Filter by provider (e.g. ["github", "linear"]) |
types | string[] | No | — | Filter by entity type (e.g. ["pull_request", "issue"]) |
after | string | No | — | ISO 8601 datetime lower bound |
before | string | No | — | ISO 8601 datetime upper bound |
Example Request
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