Prefer not to open a browser, or running on a server? Send an API key in an
X-API-Key header instead. Keys are created in the dashboard.Tools
Every search result carries the same
rights object as the REST API. See Rights answers. Searches default to real photographs, commercial-use licences, and files at least 1000 px wide; pass a filter as null to opt out (see Defaults).
Set up your client
- Claude Code
- Cursor
- Claude
- Codex
- Other clients
/mcp inside Claude Code, pick lightdrift, and choose Authenticate. Your browser opens; sign in and you are connected.With an API key instead:Let the agent do it
Paste this into a coding agent and it connects the server and proves it works:First search
Once connected, ask for an image the way you would ask a person:Find me a photo of a coastal lighthouse at dusk with room for a headline on the left, and tell me the attribution I need to include.The agent calls
search_images, reads rights.attribution from the top result, and hands you both.
Troubleshooting
How authentication works
- Sign-in (OAuth): the client discovers
https://lightdrift.ai/.well-known/oauth-protected-resource/mcp, identifies itself (by client metadata document, or dynamic registration for older clients), and sends you to sign in. Signing in creates the account if needed; that account starts with 9 more when a card is added. Tokens are scoped toopenid profile email; the server resolves them to your workspace and charges its credit. - API key: the client sends
X-API-Key: <key>on every request. The server verifies the key and charges the key’s workspace, the same as the REST API. Never send both.