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

# Claude Code

> Configure Claude Code with Podium context and MCP tools for terminal-based agent development

Claude Code is Anthropic's terminal agent — a CLI tool that reads your codebase, edits files, runs commands, and uses MCP tools. Set it up with Podium context so it can scaffold integrations, write SDK code, and call Podium APIs directly from the terminal.

## Prerequisites

* Claude Code installed: `npm install -g @anthropic-ai/claude-code`
* A [Podium API key](https://app.podium.build/onboarding)

## CLAUDE.md Context File

Create a `CLAUDE.md` at the root of your project to give Claude Code persistent context about Podium:

````markdown theme={null}
# Podium Integration

## SDK

- Package: `@podium-sdk/node-sdk`
- Install: `npm install @podium-sdk/node-sdk`
- Client setup:

```typescript
import { createPodiumClient } from '@podium-sdk/node-sdk';

const client = createPodiumClient({
  apiKey: process.env.PODIUM_API_KEY,
});
```

## Key Namespaces

| Namespace | Methods |
|-----------|---------|
| `client.product` | `list()`, `get()`, `create()`, `update()`, `delete()` |
| `client.agentic` | `listProductsFeed()`, `createCheckoutSessions()` |
| `client.companion` | `listProfile()`, `updateProfile()`, `listRecommendations()`, `createInteractions()` |
| `client.user` | `get()`, `listPoints()`, `awardPoints()` |
| `client.userOrder` | `list()`, `checkout()`, `getDiscount()` |
| `client.tasks` | `listTasks()`, `createTasks()`, `createTaskPools()` |
| `client.x402` | `createOrderPay()` |
| `client.campaign` | `list()`, `get()`, `createVote()` |
| `client.admin` | `listApiKeys()`, `createApiKeys()` |

## API

- Base URL (staging): `https://podium-staging.up.railway.app/api/v1`
- Auth: `Authorization: Bearer <podium_api_key>`
- Keys: org-scoped, prefixed `podium_test_` or `podium_live_`

## Architecture Notes

- Multi-tenant PostgreSQL with row-level security
- Async event system for background jobs (webhook delivery, enrichment)
- x402 protocol for machine-native USDC payments on Base
- Enrichment pipeline adds AI-extracted attributes to products
- Companion profiles store user taste/intent data

## Patterns

- Always use SDK methods over raw HTTP when available
- Handle pagination with `{ page, limit }` params
- Use `requestBody` for POST/PUT payloads in SDK calls
- Error responses follow `{ error: string, statusCode: number }` shape
````

## MCP Configuration

Claude Code supports MCP servers. Add the Podium server to your project's `.mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "podium": {
      "command": "node",
      "args": ["path/to/podium-mcp-server/dist/index.js"],
      "env": {
        "PODIUM_API_KEY": "podium_live_sk_..."
      }
    }
  }
}
```

Or add it globally in `~/.claude/settings.json`:

```json theme={null}
{
  "mcpServers": {
    "podium": {
      "command": "node",
      "args": ["/absolute/path/to/podium-mcp-server/dist/index.js"],
      "env": {
        "PODIUM_API_KEY": "podium_live_sk_..."
      }
    }
  }
}
```

## Example Usage

Start Claude Code in your project directory:

```bash theme={null}
claude
```

Then ask it to scaffold a Podium integration:

> "Install the Podium SDK, create a services/podium.ts file that initializes the client, and add a function that searches products by category and returns the top 5 by price"

Claude Code will:

1. Run `npm install @podium-sdk/node-sdk`
2. Create the file with correct imports and SDK patterns (from CLAUDE.md context)
3. Write a typed function using `client.agentic.listProductsFeed()`

### With MCP Tools

If MCP is configured, you can also ask Claude Code to interact with the live API:

> "Search for sunscreen products and show me what's available"

Claude Code calls `search_products` via MCP and displays the results in your terminal.

## Tips

* **CLAUDE.md is cumulative** — if you have a monorepo, put Podium context in the relevant subdirectory's `CLAUDE.md`
* **Combine with MCP** for the best experience: CLAUDE.md provides code patterns, MCP provides live API access
* **Use `/compact` mode** for long sessions to keep context focused

## Related

* [Build a Claude MCP Server](/docs/recipes/mcp-server) — full MCP server implementation
* [SDK Setup](/docs/sdk/setup) — complete SDK reference
* [Cursor Setup](/docs/ai-tools/cursor) — same MCP server in a GUI IDE
