The Port IO MCP server provides a Model Context Protocol implementation that allows AI assistants to interact with Port's developer portal, enabling advanced automations and natural language interactions with your software catalog data. Through the MCP server, you can query information, analyze scorecards, create resources, and manage permissions directly from AI tools.
Before installing the Port MCP server, you'll need:
docker pull ghcr.io/port-labs/port-mcp-server:latest
python -m venv venv
source venv/bin/activate # On Linux/macOS
# OR
venv\Scripts\activate # On Windows
# Using Homebrew
brew install uv
# Or using pip
pip install uv
export PORT_CLIENT_ID="your_port_client_id"
export PORT_CLIENT_SECRET="your_port_client_secret"
export PORT_REGION="EU" # or "US"
uvx mcp-server-port --client-id your_port_client_id --client-secret your_port_client_secret --region EU --log-level DEBUG
You can use these additional parameters for more advanced configuration:
Parameter | UVX Flag | Docker Environment Variable | Description | Default |
---|---|---|---|---|
Log Level | log-level |
PORT_LOG_LEVEL |
Controls log output level | ERROR |
API Validation | api-validation-enabled |
PORT_API_VALIDATION_ENABLED |
Controls if API schema should be validated | False |
claude_desktop_config.json
file with one of these configurations:Docker configuration:
{
"mcpServers": {
"port": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PORT_CLIENT_ID",
"-e",
"PORT_CLIENT_SECRET",
"-e",
"PORT_REGION",
"-e",
"PORT_LOG_LEVEL",
"ghcr.io/port-labs/port-mcp-server:latest"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>",
"PORT_LOG_LEVEL": "<PORT_LOG_LEVEL>"
}
}
}
}
uvx configuration:
{
"mcpServers": {
"Port": {
"command": "uvx",
"args": [
"[email protected]",
"--client-id",
"<PORT_CLIENT_ID>",
"--client-secret",
"<PORT_CLIENT_SECRET>",
"--region",
"<PORT_REGION>"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>",
"PYTHONPATH": "/Users/matangrady/.venv-port-mcp/bin/python"
}
}
}
}
Preferences: Open User Settings (JSON)
and press entermcp
> servers
section:Docker configuration:
"Port": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PORT_CLIENT_ID",
"-e",
"PORT_CLIENT_SECRET",
"-e",
"PORT_REGION",
"ghcr.io/port-labs/port-mcp-server:latest"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>"
}
}
uvx configuration:
"Port": {
"type": "stdio",
"command": "uvx",
"args": [
"[email protected]",
"--client-id",
"<PORT_CLIENT_ID>",
"--client-secret",
"<PORT_CLIENT_SECRET>",
"--region",
"<PORT_REGION>"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>"
}
}
:MCPHub
and navigate to Config tabmcpServers
section (similar to above examples)PORT_CLIENT_ID
and PORT_CLIENT_SECRET
environment variables:MCPHub
and trigger restart with R
If you encounter authentication errors:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "port" '{"command":"docker","args":["run","-i","--rm","-e","PORT_CLIENT_ID","-e","PORT_CLIENT_SECRET","-e","PORT_REGION","-e","PORT_LOG_LEVEL","ghcr.io/port-labs/port-mcp-server:latest"],"env":{"PORT_CLIENT_ID":"<PORT_CLIENT_ID>","PORT_CLIENT_SECRET":"<PORT_CLIENT_SECRET>","PORT_REGION":"<PORT_REGION>","PORT_LOG_LEVEL":"<PORT_LOG_LEVEL>"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"port": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PORT_CLIENT_ID",
"-e",
"PORT_CLIENT_SECRET",
"-e",
"PORT_REGION",
"-e",
"PORT_LOG_LEVEL",
"ghcr.io/port-labs/port-mcp-server:latest"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>",
"PORT_LOG_LEVEL": "<PORT_LOG_LEVEL>"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"port": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PORT_CLIENT_ID",
"-e",
"PORT_CLIENT_SECRET",
"-e",
"PORT_REGION",
"-e",
"PORT_LOG_LEVEL",
"ghcr.io/port-labs/port-mcp-server:latest"
],
"env": {
"PORT_CLIENT_ID": "<PORT_CLIENT_ID>",
"PORT_CLIENT_SECRET": "<PORT_CLIENT_SECRET>",
"PORT_REGION": "<PORT_REGION>",
"PORT_LOG_LEVEL": "<PORT_LOG_LEVEL>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect