# MCP setup guide

The Nephis MCP server is a Model Context Protocol server distributed from the `nephis-mcp-server` npm package. Its tool catalog is versioned with the package; clients should discover the available tools through MCP `tools/list`, rather than relying on a fixed count in documentation.

## Requirements

- Node.js and npm/npx
- A provider-issued Nephis API key
- Network access to the Nephis gateway

The server does not claim keys or grant trial credits. Check your account balance and current rates before allowing an agent to make metered calls.

## Cursor or Claude Desktop configuration

Add this server entry to the MCP configuration supported by your client:

```json
{
  "mcpServers": {
    "nephis": {
      "command": "npx",
      "args": ["-y", "nephis-mcp-server"],
      "env": {
        "NEPHIS_API_KEY": "YOUR_PROVIDER_ISSUED_KEY",
        "NEPHIS_BASE_URL": "https://nephis.theeducode.com"
      }
    }
  }
}
```

Restart the MCP client after saving the configuration. Keep the key private; do not commit configuration files containing real credentials.

## Verify connection

Run the package directly from a terminal:

```bash
NEPHIS_API_KEY="YOUR_PROVIDER_ISSUED_KEY" \
NEPHIS_BASE_URL="https://nephis.theeducode.com" \
npx -y nephis-mcp-server
```

The server communicates over stdio. A normal terminal may appear idle while it waits for MCP JSON-RPC messages. Verify it from the MCP host by checking that initialization succeeds and calling `tools/list`.

## Tool availability and safety

- The tool list and schemas come from the installed server version. Check `tools/list`; do not rely on stale counts or copied catalogs.
- A tool being listed does not prove its upstream engine or account entitlement is available. An invocation can return an authentication, quota, billing, or upstream error.
- Treat code execution, project creation, SQL mutation, branch promotion, and delete/release operations as potentially billable or destructive. Confirm the account and target resource before invoking them.
- Some currently documented Mnemon operations, including time-travel branch creation and branch schema diff, are not implemented in the local control plane and return `501 Not Implemented`.

## Other clients

Windsurf, Cline, and other MCP hosts support similar server entries, but their configuration file locations and schema can differ by version. Use the host's current MCP configuration instructions and retain the same environment variable names above.

Related: [API reference](API_REFERENCE.md), [Billing and credits](BILLING_AND_CREDITS.md), [MCP package README](../sdk/mcp/README.md).
