# Custom MCP Server

## Overview

**Custom MCP servers** let you combine tools from Chargebee's full tool catalog into a server tailored to your use case—for example, an invoice lookup server that exposes only the subscription and invoice tools your AI client needs. For an overview of Chargebee MCP servers, see [Chargebee MCP Servers](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/chargebee-mcp).

Unlike the predefined [Knowledge Base](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/knowledge-base-agent), [Data Lookup](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/data-lookup-agent), and [Onboarding](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/onboarding-agent) MCP servers, custom servers let you pick any combination of available tools.

> ℹ️ Note
>
> Custom MCP servers require [Latest Product Catalog](https://chargebee.com/docs/billing/2.0/product-catalog/product-catalog). They are not available on sites using [Legacy Product Catalog](https://chargebee.com/docs/billing/1.0/product-catalog/product-catalog).

## Create a custom MCP server

1. Log in to [Chargebee Billing](https://app.chargebee.com).
2. Navigate to **Settings > Configure Chargebee > Agentic AI > MCP Servers**. ![Agentic AI menu](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/agentic-ai-menu.png)
3. In the **Custom MCP servers** section, click **+ Create custom server**. ![MCP Servers page with Custom MCP servers section](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-servers-list.png)
4. In the **Create MCP server** dialog, enter a **Server name** and **Description**, then click **Create**. ![Create MCP server dialog](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-create-modal.png)
5. You are redirected to the new server's **Toolsets** tab. The **Add tools** sidebar opens automatically.
6. Search or browse toolsets, select the tools you need, then click **Add tools**. ![Add tools sidebar with toolset list](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-add-tools-sidebar.png)
7. Selected tools appear grouped by toolset on the **Toolsets** tab.

## Manage tools

To add more tools later, click **+ Add tools** on the **Toolsets** tab and repeat the selection flow. ![Toolsets tab with Add tools control](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-add-more-tools.png)

Turn on or turn off individual tools using the toggle next to each tool.

![Custom MCP server toolsets with per-tool toggles](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-toolsets.png)

## Access and authentication

Under the **Access & Authentication** tab, turn on the **MCP Access** toggle to allow external AI clients to access this server via MCP.

![Custom MCP server access and authentication](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-access-auth.png)

### Server URLs

Under **MCP Server URL**, you'll find the server URL for this MCP server for your Chargebee site. The URL slug is derived from the server name you provided—for example, a server named `invoice lookup mcp server` uses the slug `invoice_lookup_mcp_server`. Depending on your site's data center, you will see a URL in one of the following formats:

#### US data center

```
https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.chargebee.com/YOUR-CUSTOM-SERVER-SLUG
```

#### EU data center

```
https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.eu.chargebee.com/YOUR-CUSTOM-SERVER-SLUG
```

#### AU data center

```
https://YOUR-CHARGEBEE-SUBDOMAIN.mcp.au.chargebee.com/YOUR-CUSTOM-SERVER-SLUG
```

### Authentication

Choose how external AI clients authenticate with this MCP server. The tools available may vary depending on the selected authentication method.

---
**Best practices**

- Enable only the servers and toolsets your organization needs
- Rotate keys and OAuth credentials periodically
- Ensure that systems accessing the MCP servers have appropriate customer data protection measures in place
---

#### API Key

The API Key method grants access to all enabled tools in this server and is best suited for:

- Server-to-server integrations
- Internal automations
- Trusted development environments

You can create up to 5 API keys for this server.

![Authentication API key](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/authentication-api-key.png)

Clients authenticate by sending the API key in request headers:

```http
Authorization: Bearer YOUR-API-KEY
```

Configuration code snippets for API key are available for some of the commonly used AI clients.

#### OAuth

The OAuth method provides user-based access. Among the enabled toolsets for the MCP server, the tool access is further limited by the signed-in Chargebee user's [access level](https://chargebee.com/docs/billing/2.0/site-configuration/account_settings) in Chargebee. OAuth is best suited for:

- User-facing AI clients
- Shared developer tools
- Integrations where access should reflect your user's access level in Chargebee

![Authentication OAuth](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/authentication-oauth.png)

Configuration code snippets for OAuth are available for some of the commonly used AI clients.

Use the same OAuth client ID for users of the same MCP client. For example, if you have 100 Claude Code users, you can generate one OAuth client ID and share it with all 100 users. Claude Code (or any other MCP client) will then direct them to the Chargebee Billing login page. Once signed in, they will be redirected back to the MCP client, and their MCP access will be limited by their Chargebee user access level.

> ℹ️ Note
>
> OAuth authentication is not supported on sites with [Multi-Business Entity](https://chargebee.com/docs/billing/2.0/multi-business-entity/mbe) enabled. Use [API Key authentication](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/custom-mcp-server#api-key) instead.

## Delete a custom MCP server

On the **Access & Authentication** tab, scroll to the **Danger zone** section at the bottom of the page and click **Delete server**.

Deleting a server permanently removes its toolsets, API keys, and OAuth clients. External AI clients lose access immediately.

![Danger zone section with Delete server button on custom MCP server configuration page](https://chargebee.com/docs/assets/screenshots/billing/mcp-servers/custom-mcp-server-delete.png)

**See Also:**
- **[Chargebee Knowledge Base MCP Server](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/knowledge-base-agent)**: Answer questions using Chargebee docs and API references.
- **[Chargebee Data Lookup MCP Server](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/data-lookup-agent)**: Retrieve customer, subscription, invoice, and payment data from your Chargebee site.
- **[Onboarding MCP Server](https://chargebee.com/docs/billing/2.0/ai-in-chargebee/onboarding-agent)**: Create product catalogs and generate demo data for test and sandbox sites.