# Overview

This page is the complete reference for the Divigent MCP server. For installation and first prompts, see the [MCP Quickstart](/divigent-docs/quick-start/mcp.md).

## Available Tools

| Tool                         | Type              | What It Does                                                                                                                     |
| ---------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `divigent_status`            | Read-only         | Reads protocol health, oracle freshness, treasury status, pause flag, TVL cap, total assets, allocation, and withdrawal capacity |
| `divigent_check_yield`       | Read-only         | Reads current Aave and Morpho rates and the oracle-selected safe optimal vault                                                   |
| `divigent_get_position`      | Read-only         | Reads a wallet's USDC balance, dvUSDC shares, router allowance, deposited value, current value, and accrued yield                |
| `divigent_plan_approve_usdc` | Unsigned planning | Plans an unsigned USDC approval for the Divigent router                                                                          |
| `divigent_plan_deposit`      | Unsigned planning | Plans an unsigned Divigent deposit and reports whether approval is needed                                                        |
| `divigent_plan_withdraw`     | Unsigned planning | Plans an unsigned Divigent withdrawal by desired USDC amount or exact dvUSDC shares                                              |

## Example Prompts

### Check Protocol Status

Prompt:

```
Use the Divigent MCP server to check Divigent protocol status on Base Sepolia.
```

Tool: `divigent_status`. No input required.

### Check Current Yields

Prompt:

```
Use Divigent MCP to check current Aave and Morpho yields.
```

Tool: `divigent_check_yield`. No input required.

### Check A Wallet Position

Prompt:

```
Use Divigent MCP to get the Divigent position for wallet 0xYourWalletAddress.
```

Tool: `divigent_get_position`.

Required input:

```json
{
  "wallet": "0xYourWalletAddress"
}
```

### Plan A USDC Approval

Prompt:

```
Use Divigent MCP to plan, but not submit, a 1 USDC approval for wallet 0xYourWalletAddress.
```

Tool: `divigent_plan_approve_usdc`.

Required input:

```json
{
  "wallet": "0xYourWalletAddress",
  "amountUsdc": "1"
}
```

### Plan A Deposit

Prompt:

```
Use Divigent MCP to plan, but not submit, a 1 USDC deposit for wallet 0xYourWalletAddress with 50 bps slippage.
```

Tool: `divigent_plan_deposit`.

Required input:

```json
{
  "wallet": "0xYourWalletAddress",
  "amountUsdc": "1"
}
```

Optional input:

```json
{
  "wallet": "0xYourWalletAddress",
  "amountUsdc": "1",
  "slippageBps": 50
}
```

Direct Claude Code tool prompt:

```
Use mcp__divigent__divigent_plan_deposit with wallet 0xYourWalletAddress, amountUsdc 1, and slippageBps 50.
```

### Plan A Withdrawal By Desired USDC

Prompt:

```
Use Divigent MCP to plan, but not submit, a withdrawal of 1 USDC for wallet 0xYourWalletAddress.
```

Tool: `divigent_plan_withdraw`.

Required input:

```json
{
  "wallet": "0xYourWalletAddress",
  "amountUsdc": "1"
}
```

### Plan A Withdrawal By Shares

Prompt:

```
Use Divigent MCP to plan, but not submit, a withdrawal of 1000000 shares for wallet 0xYourWalletAddress.
```

Tool: `divigent_plan_withdraw`.

Required input:

```json
{
  "wallet": "0xYourWalletAddress",
  "shares": "1000000"
}
```

Direct Claude Code tool prompt:

```
Use mcp__divigent__divigent_plan_withdraw with wallet 0xYourWalletAddress and shares 1000000.
```

For withdrawals, provide exactly one of `amountUsdc` or `shares`.

## What Planning Tools Return

Planning tools return unsigned transaction data. Expect fields like:

```json
{
  "chain": "base-sepolia",
  "chainId": 84532,
  "warning": "Unsigned transaction plan only. This MCP server cannot sign or broadcast; review and send from a wallet you control.",
  "transaction": {
    "chain": "base-sepolia",
    "chainId": 84532,
    "to": "0x...",
    "data": "0x...",
    "value": "0",
    "functionName": "deposit",
    "args": []
  }
}
```

The user must review this transaction in their own wallet. The MCP server does not sign or broadcast it.

## Safety Model

Divigent MCP intentionally does not expose:

* private key inputs;
* signing;
* broadcasting;
* `sendPlan`;
* SDK write methods such as `deposit`, `withdraw`, or `approveUsdc`;
* governance or pause writes.

The only transaction-related tools are unsigned planning tools.

## Environment Variables

| Variable                     | Default                    | Purpose                             |
| ---------------------------- | -------------------------- | ----------------------------------- |
| `BASE_SEPOLIA_RPC_URL`       | `https://sepolia.base.org` | Preferred Base Sepolia RPC URL      |
| `DIVIGENT_CHAIN`             | `base-sepolia`             | Must be `base-sepolia` in this beta |
| `DIVIGENT_MCP_MAX_PLAN_USDC` | `100`                      | Per-plan USDC amount cap            |
| `MCP_LOG_LEVEL`              | `info`                     | Use `error` for quiet client usage  |

There is intentionally no private key environment variable.

## Troubleshooting

If the MCP server does not appear:

1. Confirm Node.js 20 or newer is installed.
2. Confirm `npx -y @divigent/mcp-server@beta` runs locally.
3. In Claude Code, run `claude mcp list`.
4. Inside Claude Code, run `/mcp` and check whether `divigent` is connected.
5. Restart the client after editing MCP configuration.

If a planning tool returns an approval requirement, plan and submit the approval transaction from your wallet before attempting the deposit.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://divigent.gitbook.io/divigent-docs/mcp/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
