# Connecting Servers

Once your MCP server has tools, you connect AI assistants to it by giving them the server URL and (if authentication is enabled) an API key. This page covers where to find that information, how to configure each major client, and how to control which tools each client can see.

***

## What You Need

Every AI client needs two things to connect:

| Item           | Where to find it                                                                                                                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Server URL** | The **Overview** tab of your MCP server - click **Copy URL**                                                                                                                    |
| **API Key**    | The key you generated when configuring authentication (**Authentication** tab). Store it somewhere safe when you create it - it is not displayed again after you leave the page |

The server URL looks like this:

```
https://server.mcpfunctions.ai/api/streamable-mcp/<server-id>/mcp
```

***

## Connecting Cursor

Cursor has built-in MCP support. The configuration is stored in a JSON file.

1. Open Cursor and go to **Settings → MCP** (or open `~/.cursor/mcp.json` directly).
2. Add your server under `mcpServers`:

```json
{
  "mcpServers": {
    "my-tools": {
      "url": "https://server.mcpfunctions.ai/api/streamable-mcp/<server-id>/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}
```

3. Save the file. Cursor will connect automatically and discover your tools.
4. In any chat, ask: *"What tools do you have available?"* - Cursor should list your tools by name and description.

***

## Connecting Claude Desktop

Claude Desktop reads its MCP configuration from a JSON file.

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

Add your server to the configuration:

```json
{
  "mcpServers": {
    "my-tools": {
      "url": "https://server.mcpfunctions.ai/api/streamable-mcp/<server-id>/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}
```

Save the file and restart Claude Desktop. The tools will be available in your conversations.

***

## Connecting ChatGPT

ChatGPT supports MCP servers through the Actions or Connectors section, depending on your plan.

1. Open **ChatGPT Settings → Connectors** (or **Custom GPT → Actions** if you're building a custom GPT).
2. Click **Add Connector** or **Add Action**.
3. Provide:
   * **Server URL**: your MCP server URL
   * **Authentication**: Bearer token - paste your API key
4. Save and confirm the connection. ChatGPT will query the `tools/list` endpoint and load your tool definitions.

> **Note:** MCP support in ChatGPT is rolling out progressively. If you don't see a Connectors option, check that your plan and region support it.

***

## Connecting Any Other MCP-Compatible Client

The connection pattern is the same across all MCP clients:

1. Find the MCP server configuration in the client's settings (typically labelled "MCP Servers", "Tools", or "Integrations").
2. Provide the **Server URL**.
3. If your server requires authentication, add the API key as an `Authorization: Bearer <key>` header.
4. Save and test.

Refer to each client's own documentation for the exact location of these settings.

***

## Controlling Which Tools a Client Can See

By default a client that connects to your server discovers **all** published tools. You can restrict this by appending a `tools` query parameter to the server URL.

This lets you connect multiple clients to the same server while giving each one access to only the tools it should use - no extra servers needed.

```
# Single tool
https://server.mcpfunctions.ai/api/streamable-mcp/<server-id>/mcp?tools=GetOrderStatus

# Multiple tools
https://server.mcpfunctions.ai/api/streamable-mcp/<server-id>/mcp?tools=GetOrderStatus,CreateSupportTicket
```

**Example segmentation:**

| Client                              | URL                                                           |
| ----------------------------------- | ------------------------------------------------------------- |
| Customer-facing chatbot (read-only) | `...?tools=GetOrderStatus,GetProductInfo`                     |
| Internal support agent              | `...?tools=GetOrderStatus,CreateSupportTicket,EscalateTicket` |
| Admin agent (full access)           | *(no filter)*                                                 |

{% hint style="info" %}
Tool names in the `tools` parameter are **case-sensitive** and must match exactly as shown in the Tools tab of your server.
{% endhint %}

***

## Verifying the Connection

After connecting any client, run this quick verification:

1. **Ask:** *"What tools do you have available?"*
   * Expected: the client lists your tools by name and description.
2. **Use a tool:** Ask a question that requires one of your tools.
   * Expected: the client calls the tool and returns a result drawn from live data.
3. **Check logs:** Open the **Logs** tab on your MCP server in the dashboard. Each invocation appears here with inputs, outputs, and execution time.

***

## Troubleshooting

| Symptom                               | Likely cause                                    | Fix                                                                                                       |
| ------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Client can't connect at all           | Wrong URL or network issue                      | Copy the URL again from the Overview tab; check that the full URL including `/mcp` at the end is included |
| Authentication fails                  | Wrong or expired API key                        | Verify the key in the Authentication tab; regenerate if needed and update all clients using the old key   |
| Client connects but sees no tools     | No published tools, or all tools are inactive   | Check the Tools tab - tools must have Active status to be discoverable                                    |
| Client sees tools but can't call them | Missing secrets, code error, or parameter issue | Run the tool from the Test panel in the dashboard; check the Logs tab for the error details               |
| Only some tools are visible           | `?tools=` filter is applied                     | Check the URL you configured in the client for a `tools=` query parameter                                 |

***

## Security Practices

* **Store API keys securely** - use a password manager or secrets vault, never plaintext files, Slack, or email
* **Use separate API keys per client** - this lets you revoke access for one client without affecting others
* **Use separate workspaces for dev and production** - this isolates credentials and tools between environments
* **Review the Logs tab regularly** - it shows which clients are calling which tools and when

***

## Related Pages

* [Protocol Overview](https://docs.mcpfunctions.ai/documentation/mcp-protocol/protocol-overview) - How the MCP protocol works under the hood
* [Quick Start - Step 7](https://docs.mcpfunctions.ai/getting-started/quick-start#step-7-connect-an-ai-assistant) - First-time connection walkthrough with screenshots


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mcpfunctions.ai/documentation/mcp-protocol/connecting-servers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
