> ## Documentation Index
> Fetch the complete documentation index at: https://docs.danubeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Agent SDK

> Two ways to give a Claude Agent SDK agent the Danube catalog: the hosted MCP server, or in-process tools

## Install

```bash theme={null}
npm install danube @anthropic-ai/claude-agent-sdk
export DANUBE_API_KEY=...
```

## Option 1: the hosted MCP server (no code in the loop)

Danube's MCP server at `https://mcp.danubeai.com/mcp` already exposes search, describe, execute and the rest. Register it and allow the tools you want:

```ts theme={null}
import { query } from '@anthropic-ai/claude-agent-sdk';
import { danubeMcpServer, danubeMcpToolNames } from 'danube/claude-agent-sdk';

for await (const message of query({
  prompt: 'Post "deploy finished" to #ops on Slack',
  options: {
    mcpServers: { danube: danubeMcpServer({ apiKey: process.env.DANUBE_API_KEY!, groups: ['core'] }) },
    allowedTools: danubeMcpToolNames(['search_tools', 'describe_tool', 'execute_tool']),
  },
})) {
  if (message.type === 'result') console.log(message.result);
}
```

`groups: ['core']` asks the server for its small core tool list (see MCP tool groups); omit it for everything.

## Option 2: in-process tools

The same three tools as every other adapter, served through the SDK's own MCP server. The SDK's `tool` helper and `zod` are passed in, so `danube` adds no dependency:

```ts theme={null}
import { query, createSdkMcpServer, tool } from '@anthropic-ai/claude-agent-sdk';
import { z } from 'zod';
import { DanubeClient } from 'danube';
import { danubeSdkTools } from 'danube/claude-agent-sdk';

const danube = createSdkMcpServer({
  name: 'danube',
  tools: danubeSdkTools(new DanubeClient(), { tool, z }),
});

query({ prompt: 'Top Hacker News stories?', options: { mcpServers: { danube } } });
```

Options for `danubeSdkTools`: `serviceId`, `readyOnly`, `maxResults`.

| tool                   | purpose                                     |
| ---------------------- | ------------------------------------------- |
| `danube_search_tools`  | find tools across the catalog               |
| `danube_describe_tool` | schema, tips, readiness before a first call |
| `danube_execute_tool`  | run it; errors say what to do next          |
