Meet Eden →
Agent Optimization 6 min read

Connect Claude Code to PromptEden (MCP)

PromptEden exposes a hosted MCP endpoint for agent clients. Claude Code can connect with a bearer token, call read tools such as list_monitors, and propose write tools that flow through PromptEden's approval and policy system before anything runs.

By PromptEden Team
Connect Claude Code to PromptEden (MCP)

Prerequisites

You need three things before connecting Claude Code:

  • A PromptEden workspace with API access.
  • A scoped API key that includes the scopes your tools need. For the first read-only check, use monitors:read. For approval polling, include account:read.
  • A Claude Code MCP client version that supports remote HTTP MCP servers with headers.

PromptEden API keys start with pe_. Store the key as PROMPTEDEN_API_KEY in your local shell or secret manager.

MCP endpoint

The hosted MCP endpoint is:

https://app.prompteden.com/api/mcp

PromptEden also accepts the explicit transport alias:

https://app.prompteden.com/api/mcp/mcp

Use /api/mcp first. Use /api/mcp/mcp only if a client requires a transport path in the URL.

Claude Code MCP config

Add PromptEden as a remote MCP server:

{
  "mcpServers": {
    "prompteden": {
      "url": "https://app.prompteden.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${PROMPTEDEN_API_KEY}"
      }
    }
  }
}

The bearer token can be a pe_ API key. OAuth access tokens are also accepted by the hosted MCP endpoint for provisioned connector clients.

First action: list monitors

Ask Claude Code to call the PromptEden MCP tool:

list_monitors

The tool maps to:

GET /api/v1/monitors

A successful response includes a monitors array for the authenticated workspace. If the workspace has no monitors yet, an empty array is still a successful connection.

What approvals look like from Claude Code

Read tools return data directly. Hosted write tools return an approval proposal instead of executing immediately.

Example shape:

{
  "status": "approval_required",
  "tool": "content_generate_article",
  "approvalId": 42,
  "deepLinkUrl": "https://app.prompteden.com/approvals/42",
  "approval": { "id": 42, "status": "pending" },
  "estimate": { "credits": 40 }
}

Open the deepLinkUrl in PromptEden to approve, reject, or grant a standing permission. Then ask Claude Code to call:

check_approval

with the returned approvalId. The result reports the current status and includes the execution result after approval.

Troubleshooting

401 unauthorized: missing bearer token. The hosted MCP endpoint requires Authorization: Bearer ....

401 invalid_api_key. The API key is invalid, revoked, malformed, or expired.

403 plan_limit. API access is not included in the workspace's current plan.

403 insufficient_scope. The token is valid but lacks the scope required by the tool. list_monitors requires monitors:read; check_approval requires account:read.

429 rate_limit_exceeded. The key or MCP token hit its per-minute rate limit. Retry after the Retry-After value.

mcp claude-code agent-optimization api-keys

Frequently asked questions

Does Claude Code need a PromptEden npm package?

No. Use the hosted MCP endpoint directly. The CLI npm package is coming soon, but it is not required for remote MCP.

Can I use OAuth instead of an API key?

Yes, if your connector client has been provisioned by PromptEden. The hosted MCP endpoint accepts OAuth bearer tokens as well as pe_ API keys.

Do MCP writes run without approval?

No. Hosted write tools return approval_required with a browser deep link and must pass through PromptEden approvals or standing permissions.

Which endpoint should I configure?

Start with https://app.prompteden.com/api/mcp. Use https://app.prompteden.com/api/mcp/mcp only for clients that require an explicit transport path.

Connect Your Agent to PromptEden

Use hosted MCP or API keys to let your agent inspect monitors and propose growth actions through PromptEden approvals.