# AI development tools

Let Claude Code, Cursor, VS Code, Codex and Claude Desktop read these docs, fetch documented examples and check integration code through the Pouchi developer MCP.

Add the Pouchi developer MCP (`pouchi-dev`) to your coding agent, and the agent finds and reads these docs itself and integrates with documented example code. It uses only names the SDK actually exports instead of invented APIs, and checks finished code for common mistakes.

Docs, examples and static checks are read-only. The tenant app setup tools change settings only through the **tenant console session** a human puts in the MCP environment. The server never touches wallet keys, signatures, funds or administrator access.

## Installation

[Download the Pouchi developer MCP bundle](/downloads/pouchi-dev.mcpb)

**Package release in preparation**

The `@shard-lab/pouchi-dev-mcp` package release is in preparation. Until then, use the `node` command in [Bundle execution](#bundle-execution) below. The Claude Desktop bundle installs today.
Once released, it will be on the same GitHub Packages as the SDK, so your user `~/.npmrc` needs the `@shard-lab` registry setting for `npx` to fetch it (the `.npmrc` in the [Quickstart](/en/docs/quickstart/)).

## Bundle execution

The `.mcpb` bundle is a zip file. Unzip it and run it with `node` to use it from any client before the package is released. Node 20 or later is required.

1. Unzip the file you got from **Download the Claude Desktop bundle** above.

```sh
mkdir -p ~/.pouchi/dev-mcp
unzip -o ~/Downloads/pouchi-dev.mcpb -d ~/.pouchi/dev-mcp
```

2. In the package settings below, use `node ~/.pouchi/dev-mcp/server.mjs` instead of `npx -y @shard-lab/pouchi-dev-mcp`. Use absolute paths in JSON and TOML.

```sh
claude mcp add --scope user pouchi-dev -- node ~/.pouchi/dev-mcp/server.mjs
```

```json
{ "command": "node", "args": ["/Users/<you>/.pouchi/dev-mcp/server.mjs"] }
```

For clients that connect by URL, start it with `node ~/.pouchi/dev-mcp/server.mjs --http` and add `http://127.0.0.1:9470/mcp` (Streamable HTTP). Change the port with `DEV_MCP_PORT`.

## Configuration after package release

Use the `npx` configurations below after the package is published. For now, use the bundle setup above.

  **Claude Code**

```sh
claude mcp add --scope user pouchi-dev -- npx -y @shard-lab/pouchi-dev-mcp
```

With `--scope project` it is written to the repository's `.mcp.json` and the team shares it. Check the connection with `claude mcp list`.

  **Cursor**

After package release, put this in the project's `.cursor/mcp.json` (`~/.cursor/mcp.json` for every project).

```json title=".cursor/mcp.json"
{
  "mcpServers": {
    "pouchi-dev": { "command": "npx", "args": ["-y", "@shard-lab/pouchi-dev-mcp"] }
  }
}
```

  **VS Code**

After package release, put this in the workspace's `.vscode/mcp.json`. It shows up as tools in Copilot Chat agent mode.

```json title=".vscode/mcp.json"
{
  "servers": {
    "pouchi-dev": { "type": "stdio", "command": "npx", "args": ["-y", "@shard-lab/pouchi-dev-mcp"] }
  }
}
```

  **Codex**

Put it in `~/.codex/config.toml`. The Codex CLI and the IDE extension share this file.

```toml title="~/.codex/config.toml"
[mcp_servers.pouchi-dev]
command = "npx"
args = ["-y", "@shard-lab/pouchi-dev-mcp"]
```

Or add it with a command: `codex mcp add pouchi-dev -- npx -y @shard-lab/pouchi-dev-mcp`

  **Claude Desktop**

Use **Download the Claude Desktop bundle** above to get `pouchi-dev.mcpb`, then double-click it. Confirm the install on the Extensions screen in settings.
The bundle contains the server and the docs, so no separate Node or npm setup is needed (it runs on the Node that ships with Claude Desktop).

## Tools

| Tool | Arguments | What it does |
|---|---|---|
| `search_docs` | `query`, `limit?` | Searches these docs by keyword and returns the slug, section, URL and an excerpt |
| `get_doc` | `slug` | Returns one docs page as Markdown. For example `quickstart`, `privy-migration`, `delegation`, `security`, `reference/react` |
| `get_example` | `name` | Example source files. `react-quickstart`, `privy-migration`, `session-approval`, `tenant-delegated-payment`, `tenant-server` |
| `check_integration` | `package_json?`, `provider_snippet?` | Static checks: missing `appId` or `apiUrl`, a chain id other than 450815, use of `useSessionSigners`, social login without the server setting, a missing session approval `clientId`, exports that do not exist, secrets in code |
| `list_chains`, `get_network_info` | `chain_id?` | Maroo Testnet (450815) and the contract addresses from the deployment manifest |
| `get_tenant`, `get_app_config` | `origin?` | Tenant status and next steps; the public values an app needs (apiUrl, appId, clientId) and its `.env` |
| `set_app_origins`, `set_login_methods`, `set_sponsorship`, `set_policy_caps`, `upsert_web_client` | the fields, `dry_run?` | Change only those tenant settings. Each shows the before and after values and skips the call when nothing changes |
| `scaffold_app` | `target_dir`, `framework?`, `origin?` | Writes a Vite or Next.js app (login, wallet, send, sign, README) into an empty folder. Never overwrites a file |
| `verify_setup` | `origin?`, `client_id?` | A pass/fail table: API, chain, origin, CORS, client, login method, gas sponsorship |

## Tenant app setup

Humans create the tenant, sign the on-chain registration and approve it (the operator and the tenant). The agent then sets up the app with this MCP.
Credentials go only into the MCP environment, never into the chat. The setup below targets your assigned hosted API. Request the API URL, app ID, console access and package access from [business@pouchi.app](mailto:business@pouchi.app). Set `POUCHI_ALLOW_REMOTE_API=1` explicitly for a hosted API; the default otherwise permits only loopback APIs. Save the console password in a local file readable only by you, and pass its path through `POUCHI_TENANT_CONSOLE_PASSWORD_FILE`.

```sh
claude mcp add --scope local pouchi-dev \
  -e POUCHI_ALLOW_REMOTE_API=1 -e POUCHI_API_URL=YOUR_POUCHI_API_URL -e POUCHI_TENANT_ID=YOUR_POUCHI_APP_ID \
  -e POUCHI_TENANT_CONSOLE_EMAIL=YOUR_CONSOLE_EMAIL -e POUCHI_TENANT_CONSOLE_PASSWORD_FILE=$HOME/.pouchi/console.pw \
  -- node ~/.pouchi/dev-mcp/server.mjs
```

The React quickstart and server examples use the same files shown here and pass type checks against SDK declarations. Type checks and static checks do not establish that package installation, sign-in or an actual payment succeeds.

## Integration prompts

Adding Pouchi to a new app:

```text
Use the pouchi-dev MCP to add Pouchi email login and a wallet to this React app.
Read get_doc("quickstart") and get_example("react-quickstart") first, and use only APIs in the docs.
Take the tenant ID from VITE_POUCHI_TENANT_ID and the API URL from VITE_POUCHI_API_URL.
The chain is Maroo Testnet (450815). When done, run check_integration on
package.json and providers.tsx, then tell me the remaining warnings and
what I still need to do (such as adding applicationOrigins in the tenant settings).
```

Moving a Privy app:

```text
Use the pouchi-dev MCP to move this app from Privy to Pouchi.
Read get_doc("privy-migration") and get_example("privy-migration") first.
Replace the @privy-io/react-auth imports with @shard-lab/nc-waas-react,
and add apiUrl and defaultChain (Maroo Testnet) to the Provider.
Do not change places that use rejected APIs such as useSessionSigners; list them
and suggest an alternative (useSessionApproval or server delegation). Run check_integration at the end.
```

**Keep secrets out**

Do not put `clientSecret`, package tokens or private keys in prompts or in `check_integration` input. The check tells you when such values are in code, but never shows them back.
