---
name: plungeai-in-replit
description: "Connect Replit Agent to PlungeAI (Ocean Studio) over MCP — the one-click install-page link, the Integrations → MCP Servers form, keeping the Agent's MCP key separate from a deployed app's Replit Secret, and a plungeai_whoami + plungeai_list_agents verify. Use when the user is in Replit and says connect / install / set up PlungeAI, mentions MCP Servers or Replit Secrets, or an app built in Replit 401s against PlungeAI. For another editor use its plungeai-in-<tool> skill; for an unlisted but MCP-capable client use plungeai-mcp-setup's generic client config."
---

# PlungeAI in Replit (Replit Agent)

Replit talks to PlungeAI over the Streamable HTTP MCP server at
`https://mcp.plungeai.com/v1` — for the Agent while building. Apps the
Agent ships call the One API (`https://api.plungeai.com`) directly with
their own key in Replit Secrets.

## Prerequisites

- An `ozk_` key: Dashboard → **One API → Keys** (https://dashboard.plungeai.com) —
  self-service, shown once, copy it now.

## Connect (once)

### One click

1. Open https://mcp.plungeai.com/install, **type the `ozk_` key into the box
   at the top**, then click **Add to Replit** — the integration imports
   with its Authorization header. Clicked without the key, add the header
   afterwards under the integration's **Advanced settings**.

### By hand

Integrations → **MCP Servers** → **+ Add MCP server**: **Display name**
`PlungeAI`, **Server URL** `https://mcp.plungeai.com/v1`, then **Advanced
settings** → custom header `Authorization` = `Bearer ozk_YOUR_KEY`.

The integration is account-level: the Agent gets the `plungeai_*` tools
across all your projects, not just the current Repl.

## Verify

1. Ask the Agent: "use plungeai_whoami to confirm my identity" → an
   identity card.
2. From the Repl shell:
   `curl -H "Authorization: Bearer $PLUNGEAI_API_KEY" https://api.plungeai.com/v1/agents`
   → HTTP 200 JSON (proves a Repl Secret is set and valid).
3. "use plungeai_list_agents to search 'web search'" → live results from
   the active agent catalog.

## Quirks

- Two key locations — never mixed: the MCP integration's header (for the
  Agent) and **Replit Secrets** as `PLUNGEAI_API_KEY` (for the Repl's own
  code). Never in source files, `.replit`, or `replit.nix`.
- A workspace app that 401s after deploy → check that the deployment's
  secrets carry `PLUNGEAI_API_KEY` too.
- Tool approval: a tool that requires confirmation prompts before it runs.
  Money-verb PlungeAI operations still pause with a structured
  `needs_approval` outcome regardless — relay it, then `plungeai_continue`.
- Standard split when the Agent is asked to "build an app that uses
  PlungeAI": it uses MCP to discover and test the right agent, then writes
  app code that calls the One API with the key from Replit Secrets.

## Where next

- Operating the `plungeai_*` tools once connected: **plungeai-mcp-setup**.
- Writing app code that calls `https://api.plungeai.com` directly: **plungeai-api-setup**.
- Picking MCP vs the One API for a given job: **choose-your-plungeai-door**.
- An unlisted but MCP-capable client, or the shared connect concepts (native
  remote vs. stdio bridge, key hygiene): **plungeai-mcp-setup**.
