MCP Server
Connect AI assistants to your workspace memory via Model Context Protocol for real-time semantic search across your tools.
MCP Server
The @lightfastai/mcp package connects AI assistants like Claude, Cursor, and Codex directly to your workspace memory via the Model Context Protocol.
Installation
No installation required — run directly with npx:
Or install globally:
Configuration
Choose your AI assistant and add the configuration:
Claude Desktop
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
Claude Code (CLI)
Add to .mcp.json in your project root:
Or use the CLI:
For global (user-level) configuration, add to ~/.claude.json or use --scope user.
Cursor
Add to .cursor/mcp.json in your project root:
OpenAI Codex
Add to ~/.codex/config.toml:
Available Tools
Once configured, your AI assistant has access to the lightfast_search tool.
lightfast_search
Search through connected tools for relevant decisions and observations.
Parameters:
query(required): Natural language search querylimit: Max results, 1–100 (default: 10)offset: Pagination offset (default: 0)mode:"fast"(vector scores only) or"balanced"(Cohere rerank, default)sources: Filter by provider (e.g.["github", "linear"])types: Filter by entity type (e.g.["pull_request", "issue"])after: ISO 8601 datetime lower boundbefore: ISO 8601 datetime upper bound
Example prompt:
"Search lightfast for how authentication works in our API"
Usage Examples
Once configured, you can ask your AI assistant questions like:
- "Search our codebase for how rate limiting is implemented"
- "What decisions have we made about database choices?"
- "Find documentation about our deployment process"
- "Who has worked on the payment service?"
The AI assistant will automatically use the Lightfast search tool to find answers with sources.
CLI Options
Environment Variables
Instead of passing --api-key, you can set the environment variable:
This is especially useful in MCP configurations where you don't want to hardcode the key:
Troubleshooting
Server not connecting
- Verify your API key is valid and starts with
sk-lf- - Check that Node.js >= 18 is installed
- Restart your AI assistant after configuration changes
Tools not appearing
- Ensure the MCP server is running (check logs)
- Verify the configuration file is in the correct location
- For Claude Code, run
/mcpto check server status
Permission errors
- Lightfast respects your GitHub permissions
- Ensure your workspace has the repositories you're searching
- Check that your API key has access to the workspace