# Connect MCP clients

Configure Codex, Claude Code, Hermes, OpenClaw, or any stdio-compatible MCP host to launch the local AppPortal CLI server.

Source: https://appportal.io/docs/api/mcp-clients

Install and verify the CLI using [CLI installation](https://appportal.io/docs/api/cli-install) before following this guide.


Authenticate once before configuring a client:

```bash
appportal auth login
appportal auth status
```

Every client below launches the same local process: command `appportal`, arguments `mcp`. No token,
callback URL, or AppPortal endpoint belongs in the client configuration.

## Codex CLI, desktop, and IDE extension

Add the stdio server from the command line:

```bash
codex mcp add appportal -- appportal mcp
codex mcp list
```

Or add it to `~/.codex/config.toml`:

```toml
[mcp_servers.appportal]
command = "appportal"
args = ["mcp"]
```

Codex CLI, the Codex desktop app, and the IDE extension share this configuration. In the Codex TUI,
use `/mcp` to inspect connected servers and available tools. See OpenAI's
[official Codex MCP documentation](https://developers.openai.com/codex/mcp).

For a named AppPortal profile:

```toml
[mcp_servers.appportal_customer]
command = "appportal"
args = ["mcp", "--profile", "selected-customer-access"]
```

## Claude Code

Add AppPortal for the current project:

```bash
claude mcp add appportal -- appportal mcp
claude mcp list
```

Use user scope when the same connection should be available across projects:

```bash
claude mcp add appportal --scope user -- appportal mcp
```

For a project-shared configuration, add `.mcp.json`:

```json
{
  "mcpServers": {
    "appportal": {
      "command": "appportal",
      "args": ["mcp"]
    }
  }
}
```

Use `/mcp` inside Claude Code to inspect the connection. Review Anthropic's
[Claude Code MCP guide](https://docs.anthropic.com/en/docs/claude-code/mcp) for configuration scope
and approval behavior. Do not commit a user-specific profile name unless that shared choice is
intentional.

## Claude Desktop

Authenticate the same OS user and named profile before opening the client. In Claude Desktop's
Settings, open **Developer → Edit Config** and merge this entry with any existing servers:

```json
{
  "mcpServers": {
    "appportal": {
      "command": "appportal",
      "args": ["mcp", "--profile", "work"]
    }
  }
}
```

Restart the client, then inspect its AppPortal tool list before making a data request. The
[official local-server guide](https://modelcontextprotocol.io/docs/develop/connect-local-servers)
describes the client's configuration file. This starts a local process; it is not an AppPortal HTTP
or SSE connector.

## VS Code and Copilot

Use **MCP: Add Server**, choose **Command (stdio)** and enter
`appportal mcp --profile work`. Select the configuration destination for the agent harness you use.
Portable Copilot configurations use `mcpServers`, as in the process entry above; team configurations
can use a workspace-root `.mcp.json` when that destination is enabled.

The VS Code Local harness also supports this compatibility format in `.vscode/mcp.json`:

```json
{
  "servers": {
    "appportal": {
      "type": "stdio",
      "command": "appportal",
      "args": ["mcp", "--profile", "work"]
    }
  }
}
```

Review the server trust prompt and inspect its state and tool output. VS Code's
[server setup guide](https://code.visualstudio.com/docs/agent-customization/mcp-servers) and
[configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)
distinguish portable `mcpServers` files from the Local harness `servers` format. The guided flow
labels the Local harness compatibility destinations deprecated; do not copy that shape into a
portable Copilot file. In a remote workspace, the CLI, .NET runtime and authenticated profile must
exist where the MCP process runs. Do not copy another user's token storage into the workspace.

## Hermes Agent

Add and test the stdio server:

```bash
hermes mcp add appportal --command appportal --args mcp
hermes mcp test appportal
```

The equivalent `~/.hermes/config.yaml` entry is:

```yaml
mcp_servers:
  appportal:
    command: "appportal"
    args:
      - "mcp"
```

After editing the file during a session, use `/reload-mcp`. See the Hermes Agent guide to
[using MCP with Hermes](https://hermes-agent.nousresearch.com/docs/guides/use-mcp-with-hermes).

## OpenClaw

Add AppPortal and probe the server:

```bash
openclaw mcp add appportal --command appportal --arg mcp
openclaw mcp doctor appportal --probe
```

The equivalent configuration is:

```json
{
  "mcp": {
    "servers": {
      "appportal": {
        "command": "appportal",
        "args": ["mcp"]
      }
    }
  }
}
```

See OpenClaw's [MCP CLI documentation](https://github.com/openclaw/openclaw/blob/main/docs/cli/mcp.md)
for its full server-management commands.

## Other MCP clients

Any host that supports local stdio servers can use this process definition:

| Field | Value |
| --- | --- |
| Name | `appportal` |
| Transport | stdio/local process |
| Command | `appportal` |
| Arguments | `mcp` |
| Environment variables | none required |
| Remote URL | none |
| Authentication token in client config | none |

Clients modeled after the common `mcpServers` format can use:

```json
{
  "mcpServers": {
    "appportal": {
      "command": "appportal",
      "args": ["mcp"]
    }
  }
}
```

If the host does not inherit your shell `PATH`, use the absolute `appportal` executable path. Keep
the saved OAuth session in the CLI's protected user storage; do not export it into environment
variables or copy it into the MCP configuration.

## Verify the connection

After restarting or reloading the client, ask:

> List the AppPortal tools you can use. Do not call them yet.

You should see `inspect_mobile_project` plus the remote tools permitted by the active profile. Then
try a credential-free local request:

> Use AppPortal to inspect this mobile project. Report the detected project type, app version,
> build number, icon, symbols, and artifact readiness. Do not modify files.

If the local tool works but remote tools fail, run `appportal auth status` for the same named profile
used in the client's arguments.

## Verify one authorized read

A successful local inspection proves the process connection, not access to a deployed AppPortal
account. For a read-only walkthrough, choose an app/environment you own and a profile with only
the required read scopes. Record the installed CLI/client versions and the selected API deployment.
Then ask the client to list its actual tool, resource, and prompt catalog and perform one bounded read,
such as the selected app overview. Inspect its returned scope and coverage; an unavailable result
is not an empty healthy app. Do not send messages, publish releases or approve writes as part of
this connection check.

Hermes terminal-client results and GUI-client results are different observations. A configuration
that parses, a running fixture, or `hermes mcp test` alone does not establish the owned data read.
When using a temporary profile and configuration for a test, remove only what that test created and
retain unrelated servers, model connections and saved profiles. Never copy protected token storage.

## Next steps

- Return to the [AppPortal MCP overview](https://appportal.io/docs/api/mcp).
- Try [example conversations](https://appportal.io/docs/api/mcp-conversations).
