Get the FREE Ultimate OpenClaw Setup Guide →

portkey

MCP Server for Portkey

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rvoh-emccaleb-portkey-mcp-server docker run -i --rm -e PORTKEY_API_KEY -e TRANSPORT ericmccaleb/portkey-mcp-server:latest \
  --env TRANSPORT="stdio" \
  --env PORTKEY_API_KEY="your-api-key"

How to use

Portkey is an MCP server that acts as a bridge between Portkey and various AI tools and services using the Model Context Protocol. It exposes tools such as prompt_create, prompt_render, and prompts_list, enabling you to manage prompts and render them through a unified MCP interface. You can run the server in SSE (server-sent events) or stdio mode, and connect clients like Cursor IDE or Claude Desktop by configuring a simple mcp.json or equivalent config that points to the server endpoint. The included tooling lets you create prompts, render them with variables, and list existing prompts to integrate with your workflows.

To use the server with Cursor IDE or Claude Desktop, set up an mcp.json config that points to either a running SSE endpoint (http://localhost:8080/sse) or to a Docker/Binary instance that exposes a stdio interface. For SSE, connect to the server’s /sse endpoint and then initialize sessions and call tools (prompt_create, prompt_render, prompts_list) via the MCP protocol. For stdio, run the server and configure the connector to interface directly through standard input/output using the mcp server’s documented arguments and environment variables.

How to install

Prerequisites:

  • Docker installed and running, or Go toolchain if building from source, or a prebuilt binary.
  • Access to a Portkey API key (PORTKEY_API_KEY) for authentication when required by the server.

Option 1: Docker (recommended for quick start)

  1. Ensure Docker is running.
  2. Run the Portkey MCP server using the provided image: docker run -p 8080:8080
    -e TRANSPORT=sse
    -e TRANSPORT_SSE_ADDRESS=:8080
    -e PORTKEY_API_KEY=your-api-key
    ericmccaleb/portkey-mcp-server:latest
  3. The server will be available at http://localhost:8080 (SSE endpoint at /sse).

Option 2: Build from Binary

  1. Install Go and Git if not present.
  2. Clone the repository and build: git clone https://github.com/rvoh-emccaleb/portkey-mcp-server.git cd portkey-mcp-server make build
  3. Run the binary (set required env vars as needed): PORTKEY_API_KEY=your-api-key TRANSPORT=sse TRANSPORT_SSE_ADDRESS=:8080 ./portkey-mcp-server

Option 3: From Source (Go toolchain)

  1. Ensure Go is installed.
  2. From repo root, run: go run -ldflags="-X main.appVersion=$(git rev-parse --short HEAD)" cmd/portkey-mcp-server/main.go
  3. Configure environment (PORTKEY_API_KEY, TRANSPORT) before starting.

Prerequisite files:

  • .env.example or internal/config for environment variable references if running via Docker or containerized setups.

Additional notes

Environment variables play a key role in configuring Portkey’s behavior. Common variables include PORTKEY_API_KEY (authentication), TRANSPORT (stdio or sse), and TRANSPORT_SSE_ADDRESS (port for SSE). When running via Docker, you can override these with -e flags. If you switch to SSE, ensure you open the correct port (default 8080) and configure the client to connect to /sse. For local development, keeping TRANSPORT as stdio simplifies integration with CLI tools, while SSE is preferred for HTTP-based clients and IDE integrations. If you encounter connection issues, verify that the API key is valid and that the chosen transport mode matches your client configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers