API Keys
Objective: let a script or an AI tool search your Yew data.
Done when: your tool gets results from Yew using the key.
What an API Key Does
An API key lets a program act as you without logging in. It works on Yew's API and on its MCP server, which is how AI tools such as Claude connect to your data. A key has full access to your account. There are no per-key permissions yet, so only give a key to tools you trust.
Creating a Key
- Open API Keys in the sidebar and click New API Key.
- Optionally, enter a Name that says what it's for, such as "Claude Code".
- Click Create.
Yew shows the full key once. Copy it and store it somewhere safe. Once you close the dialog it can't be shown again, only revoked.
Using a Key
Send the key in the Authorization header:
Authorization: Bearer <key>
Connecting an AI Tool With MCP
Yew's MCP server is at <BACKEND_URL>/mcp, for example http://localhost:8443/mcp. Add it to your AI tool as a remote (HTTP) MCP server with the header above. For example, in Claude Code:
claude mcp add --transport http yew http://localhost:8443/mcp \
--header "Authorization: Bearer <key>"
The tool can then:
- search your indexed content, with optional filters for integrations and dates
- read one search result's full content
- list your integrations and their sync status
- see your name and email
It can't change anything in Yew. Searches it runs appear in Search History under MCP.
Managing Keys
The list shows each key's name, the key with all but its last group of characters hidden, and when it was created. Edit renames a key. Revoke stops it working immediately, and anything using it loses access. Revoking can't be undone.