MCP Server Reference
Lightfast exposes MCP tools through the hosted OAuth resource server and the @lightfastai/mcp local stdio package.
Hosted OAuth resource:
Local development resource:
[<wt>.] is an optional local worktree prefix. Use
https://mcp.lightfast.localhost/mcp in the primary worktree, or a prefixed
URL such as https://remote-mcp.mcp.lightfast.localhost/mcp in a secondary
worktree.
The @lightfastai/mcp package remains available for API-key stdio clients.
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 policy-derived tools to AI assistants. Hosted OAuth clients must request the scope listed for each tool.
lightfast_system_health
Check whether the connection is authenticated and reachable.
| Field | Value |
|---|---|
| Required scope | mcp:system:read |
| Requires selected organization | No |
Parameters: none.
Response:
lightfast_signals_create
Create a signal in the connected organization.
| Field | Value |
|---|---|
| Required scope | mcp:signals:write |
| Requires selected organization | Yes |
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Signal text. Trimmed, 1-4000 characters. |
Response:
lightfast_signals_get
Get a visible signal by id from the connected organization.
| Field | Value |
|---|---|
| Required scope | mcp:signals:read |
| Requires selected organization | Yes |
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Signal id in signal_<uuid> format. |
Response:
status is one of queued, processing, classified, or failed.
classification is null until classification is available.
visibilityScope is one of user, team, or needs_review.
Example Request
Error Responses
HTTP authentication failures return an OAuth bearer error response:
Tool execution failures are returned as MCP tool results with isError: true
and a text message.
| Error Code | Description |
|---|---|
missing_token | OAuth bearer token is missing |
invalid_token | OAuth bearer token is invalid or expired |
insufficient_scope | Token is missing the scope required by the tool |
invalid_input | Tool parameters failed schema validation |
not_found | Requested signal is not visible or does not exist |
org_access_denied | The user or grant no longer has access to the selected organization |
upstream_error | A Lightfast upstream service returned an error |
unsupported_tool | The requested MCP tool is not supported |
Related
- MCP Setup Guide - Configuration for hosted OAuth and stdio clients
- Hosted OAuth MCP source
- Local stdio MCP source