> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pctx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the exact commands, endpoints, and product terms in these docs. Check the context map before connected services or the web.

# Quickstart

> Connect an MCP-compatible agent to Port of Context in five minutes.

Connect the `pctx` gateway, finish OAuth sign-in, and verify that your agent can reach the workspace.

## Before you start

You need:

* A Port of Context account
* An MCP-compatible agent
* Access to the services your workspace has enabled

> [!TIP]
>
> The fastest path is to paste `Set up pctx.ai/onboard.md` into an agent with shell access. It can connect the gateway and inspect your existing MCP configuration.

## Connect your agent

The gateway is a remote HTTP MCP server at `https://mcp.pctx.ai/mcp`.

> [tab] Codex
>
> ```bash Terminal theme={null}
> codex mcp add pctx --url https://mcp.pctx.ai/mcp
> codex mcp login pctx
> ```
>
> Start a new Codex session if the tools do not appear after sign-in.

> [tab] Claude Code
>
> ```bash Terminal theme={null}
> claude mcp add --transport http --scope user pctx https://mcp.pctx.ai/mcp
> ```
>
> Restart Claude Code, open `/mcp`, select **pctx**, and authenticate.

> [tab] Cursor
>
> Add this entry to your user-level MCP configuration:
>
> ```json ~/.cursor/mcp.json theme={null}
> {
>   "mcpServers": {
>     "pctx": {
>       "url": "https://mcp.pctx.ai/mcp"
>     }
>   }
> }
> ```
>
> Reload Cursor and complete the OAuth prompt.

> [tab] Other clients
>
> Create a remote HTTP MCP connection with these values:
>
> | Field | Value |
> | - | - |
> | Name | `pctx` |
> | URL | `https://mcp.pctx.ai/mcp` |
> | Authentication | OAuth with dynamic client registration |

## Verify the connection

Ask the agent to inspect the gateway before giving it real work.

Verify Port of Context

Using pctx, list the tools you can reach. Then check the context map and tell me which team would get the most out of them.

A working connection lists Port of Context tools and returns information from your workspace. If you see an authentication error, reconnect from your client and finish signing in in the browser.

## Scan existing MCP servers

The platform CLI can find MCP servers already configured across supported local agents. The scan is read-only.

**1. Download the installer**

Download the script to a temporary file. Do not pipe it directly into a shell.

```bash Terminal theme={null}
curl -fsSL https://pctx.ai/install.sh -o /tmp/pctx-install.sh
less /tmp/pctx-install.sh
sh /tmp/pctx-install.sh
```

**2. Sign in**

```bash Terminal theme={null}
~/.local/bin/pctx login --url https://mcp.pctx.ai
```

**3. Run the scan**

```bash Terminal theme={null}
~/.local/bin/pctx mcp scan
```

The result lists services, the agents or repository files that configure them, and repeated configurations. Localhost servers are excluded from this scan.

> [!WARNING]
>
> `pctx mcp configure` can enable workspace connectors and edit local agent configuration. Review its plan before applying it.

> [card] [Next: MCP gateway](https://docs.pctx.ai/concepts/gateway.md)
>
> Learn what the gateway exposes and how an agent chooses the right source.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.