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

# Use the Sphinx MCP server

> Connect your agent to Sphinx with OAuth or an API key, search your knowledge base, and propose updates.

The Sphinx Model Context Protocol (MCP) server gives your agent tools to search your organization's knowledge, read complete pages, and suggest changes. You can connect it to clients such as Claude and ChatGPT.

Sphinx tools expose the [learned organizational context](https://docs.sphinx.ai/concepts/context-learning.md) stored in your workspace. For context augmentation in the inference request path, see the [Responses API](https://docs.sphinx.ai/responses-api/overview.md).

## Before you start

* A Sphinx account with access to the workspace you want to use.
* An agent or client that supports remote MCP servers over Streamable HTTP.
* For API-key authentication, permission to create a key in that workspace and a client that supports custom request headers.

| Setting | Value |
| - | - |
| Server name | `sphinx` |
| Transport | Streamable HTTP |
| Server URL | `https://api.prod.sphinx.ai/mcp` |

## Authenticate

Choose the method supported by your client. Both methods use the same MCP endpoint.

### OAuth: sign in through your browser

**1. Add the remote server**

Open your client's MCP or connector settings. Add a server using the name, transport, and URL above. Choose OAuth if the client asks for an authentication method. If it offers dynamic client registration, choose automatic registration.

**2. Authenticate**

Use your client's **Authenticate**, **Connect**, or **Sign in & test** action. Sign in to Sphinx in the browser that opens.

**3. Select your workspace**

Select the Sphinx workspace you want the agent to use and review the authorization request. Click **Allow access** to authorize it.

**4. Return to your agent**

Finish saving or applying the connection in your client. Enable Sphinx for the conversation if your client requires it.

### API key: send a Bearer header

**1. Create a workspace key**

Open Sphinx, click **Settings** at the bottom left, and check the selected **Workspace**. Open **API keys**, click **New key**, enter a name and expiration, then click **Create**. Copy the generated key.

**2. Configure your client**

Add the remote MCP endpoint and supply this request header, replacing the placeholder with your key:

```text theme={null}
Authorization: Bearer YOUR_SPHINX_API_KEY
```

For a client that uses a Claude-style `.mcp.json`, the configuration is:

```json theme={null}
{
  "mcpServers": {
    "sphinx": {
      "type": "http",
      "url": "https://api.prod.sphinx.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_SPHINX_API_KEY"
      }
    }
  }
}
```

Configuration formats vary by client. See [Claude Code API key setup](https://docs.sphinx.ai/claude-code-cli/api-key-setup.md) for the plugin-specific steps.

**3. Reconnect and verify**

Save the configuration and reconnect the MCP server. Confirm that the client lists Sphinx's tools, then try a question about a page in your workspace.

> [!WARNING]
>
> Keep API keys private. Do not commit a configuration containing your key or share it in screenshots, prompts, or logs. Use your client's secret storage when available.

## Use Sphinx in a conversation

| Tool | What it does |
| - | - |
| `search` | Finds relevant knowledge base pages. |
| `fetch` | Reads a complete page returned by search. |
| `suggest_edits` | Requests an asynchronous knowledge base update. |

Try a question tied to your workspace's content:

```text theme={null}
Use Sphinx to find our definition of customer lifetime value. Read the
relevant pages and explain the definition with links to your sources.
```

For an update, name the pages and the specific change you want. Follow the resulting job in **Ingest** and [review the proposed changes](https://docs.sphinx.ai/knowledge-base/review-changes.md) in Sphinx.

## Connect Sphinx MCP to your agent

> [card] [Claude](https://docs.sphinx.ai/claude/sphinx-plugin-onboarding.md)
>
> Set up the plugin and connect Claude.ai, Claude Desktop, or Claude Code.

> [card] [Claude Code with an API key](https://docs.sphinx.ai/claude-code-cli/api-key-setup.md)
>
> Configure Bearer authentication for the Sphinx plugin's MCP server.

> [card] [ChatGPT Desktop](https://docs.sphinx.ai/chatgpt-desktop/install-sphinx-mcp.md)
>
> Add the remote MCP server and authorize a workspace.

> [card] [Claude with Private Gateway](https://docs.sphinx.ai/claude-desktop/sphinx-mcp/install-sphinx-mcp.md)
>
> Add MCP in Claude's third-party inference settings.

## Troubleshooting

* **Authentication fails:** check the endpoint and transport. For API keys, check expiration and that the header starts with `Bearer ` followed by the key. For OAuth, authenticate again through the client.
* **Expected knowledge is missing:** check that you authorized the intended workspace or created the key there. Ask about a page you can find in **Browse Knowledge**.
* **Sphinx is connected but unused:** enable it for the conversation and explicitly ask the agent to use Sphinx.
* **A suggested edit is not visible yet:** check the ingest's progress and review status. Submitting an update request does not mean it has been accepted.

MCP provides knowledge tools. To route model inference through Sphinx, see [Sphinx Private Gateway](https://docs.sphinx.ai/private-gateway/overview.md).


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