Claude Agent SDK
Give agents built on the Claude Agent SDK access to your memos.
Use it in code
The snippet has your key in it so it runs as pasted. Move it to an environment variable before the code is committed or shared.
- 1.
Install the SDK
npm install @anthropic-ai/claude-agent-sdk
- 2.
Add GigaRAG to the agent
import { query } from '@anthropic-ai/claude-agent-sdk'; for await (const message of query({ prompt: 'List my GigaRAG buckets.', options: { mcpServers: { gigarag: { type: 'http', url: 'https://mcp.gigarag.com/mcp', headers: { Authorization: 'Bearer <api-key>' }, }, }, allowedTools: ['mcp__gigarag__*'], }, })) { if (message.type === 'result') console.log(message.result); }
Check it worked
Send this once it is connected. An answer drawn from your workspace means the connection is live.
Run it. The model should answer with your GigaRAG buckets.
Written from the official docs: MCP in the Agent SDK