portkey
MCP Server for Portkey
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)
- Ensure Docker is running.
- 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 - The server will be available at http://localhost:8080 (SSE endpoint at /sse).
Option 2: Build from Binary
- Install Go and Git if not present.
- Clone the repository and build: git clone https://github.com/rvoh-emccaleb/portkey-mcp-server.git cd portkey-mcp-server make build
- 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)
- Ensure Go is installed.
- From repo root, run: go run -ldflags="-X main.appVersion=$(git rev-parse --short HEAD)" cmd/portkey-mcp-server/main.go
- 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
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go