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 five tools to AI assistants.
lightfast_search
Search through workspace memory for relevant documents and observations.
Parameters & Response
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
Filters object structure:
sourceTypes:string[]- Source types to include (e.g.,["github", "linear"])observationTypes:string[]- Observation types to include (e.g.,["commit", "issue"])actorNames:string[]- Actor names to filter by (e.g.,["@sarah", "@mike"])dateRange:object- Date range filter withstartandendISO datetime strings
Example Request
lightfast_contents
Fetch full content for documents by their IDs.
Parameters & Response
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
Example Request
lightfast_find_similar
Find content semantically similar to a given document or URL.
Parameters & Response
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
Note: Filters have the same structure as lightfast_search.
Example Request
lightfast_graph
Traverse the relationship graph from a starting observation. Returns connected observations with relationship edges. Supports depth control (1-3) and relationship type filtering.
Parameters & Response
Example Request
lightfast_related
Find observations directly connected to a given observation via relationships. Returns related events grouped by source system with relationship types and directions.
Parameters & Response
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
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