Connect an MCP client
Step-by-step setup for the BesTest MCP server in Claude Code, Claude Desktop, Cursor, VS Code, Codex, Grok, Windsurf and Cline, including which clients support header authentication.
This page connects your AI agent to BesTest. Every client needs the same three things, so if yours is not listed below, the generic recipe will still get you there.
Before you start
-
Create a token in BesTest: app menu → API & MCP tokens → Create token. Copy it immediately, because it is shown once.
-
Note your region. Your endpoint is one of these, and a token only works against its own region:
Region MCP endpoint Europe https://prod-eu.getbestest.com/mcpNorth America https://prod-us.getbestest.com/mcpIndia https://prod-in.getbestest.com/mcp -
Check your client below, because not all of them can do what BesTest currently needs.
Check this first: header authentication only
BesTest MCP authenticates with a bearer token in an Authorization header. It does not support OAuth yet. That single fact decides how much work your client is:
| Client | Header authentication | Notes |
|---|---|---|
| Claude Code | Yes | One command. The simplest route. |
| Cursor | Yes | headers block in mcp.json. |
| VS Code / GitHub Copilot | Yes | headers plus a prompted secret input. |
| Codex | Yes | Reads the token from an environment variable. |
| Windsurf | Yes | headers block in mcp_config.json. |
| Cline | Yes | headers block in cline_mcp_settings.json. |
| Claude Desktop | Yes, via a bridge | Needs mcp-remote, or the request-headers beta. |
| Grok | Yes, where the connector UI offers it | Otherwise use a client from the rows above. |
| claude.ai in the browser | Beta / limited | Built around OAuth. Read this row before you promise anyone a demo. |
A client that only speaks OAuth cannot connect to BesTest MCP today, no matter how correct your token is. If you are demoing to someone, connect with Claude Code, Cursor or VS Code, all of which take a header without argument. OAuth support is on our roadmap.
Claude Code
One command, from your terminal:
claude mcp add --transport http bestest https://prod-eu.getbestest.com/mcp \
--header "Authorization: Bearer bst_pat_YOUR_TOKEN_HERE"Swap the URL for your region. Add --scope user to make it available in every project rather than just the current directory.
Check it worked by running /mcp inside a session: bestest should be listed as connected. Then ask it something only BesTest can answer:
List the test cycles in this Space.Official docs: MCP in Claude Code
Cursor
Edit ~/.cursor/mcp.json for every project, or .cursor/mcp.json inside one project:
{
"mcpServers": {
"bestest": {
"url": "https://prod-eu.getbestest.com/mcp",
"headers": {
"Authorization": "Bearer ${env:BESTEST_TOKEN}"
}
}
}
}Cursor resolves ${env:NAME}, so keep the token in your environment rather than in the file, and the file stays safe to commit. Hard-coding the token works too, but then never commit it.
Reload Cursor, open Settings → MCP, and confirm bestest shows as connected with its tools listed.
Official docs: Model Context Protocol in Cursor
VS Code / GitHub Copilot
Create .vscode/mcp.json in your workspace, or use the user-level mcp.json via MCP: Open User Configuration in the command palette:
{
"inputs": [
{
"type": "promptString",
"id": "bestest_token",
"description": "BesTest API token",
"password": true
}
],
"servers": {
"bestest": {
"type": "http",
"url": "https://prod-eu.getbestest.com/mcp",
"headers": {
"Authorization": "Bearer ${input:bestest_token}"
}
}
}
}The inputs block means VS Code prompts you for the token once and stores it securely, so the config file holds no secret and can be committed for your team. Start the server from the Start action that appears above the server entry, then open Copilot Chat in Agent mode and check the tools picker.
Official docs: MCP configuration reference
Codex
From the CLI:
export BESTEST_TOKEN="bst_pat_YOUR_TOKEN_HERE"
codex mcp add bestest --url https://prod-eu.getbestest.com/mcp \
--bearer-token-env-var BESTEST_TOKENOr write it into ~/.codex/config.toml by hand:
[mcp_servers.bestest]
url = "https://prod-eu.getbestest.com/mcp"
bearer_token_env_var = "BESTEST_TOKEN"Codex reads the environment variable when it connects and sends it as Authorization: Bearer <token>, so the token itself never lands in the config file. Make sure the variable is exported in the shell that actually launches Codex, which is the usual reason this one fails.
Official docs: Model Context Protocol in Codex
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json, or use Cascade → MCP servers → Configure:
{
"mcpServers": {
"bestest": {
"serverUrl": "https://prod-eu.getbestest.com/mcp",
"headers": {
"Authorization": "Bearer bst_pat_YOUR_TOKEN_HERE"
}
}
}
}Refresh the server list in Cascade afterwards.
Official docs: Cascade MCP integration
Cline
Open the Cline panel, choose MCP Servers, then Configure MCP Servers to edit cline_mcp_settings.json:
{
"mcpServers": {
"bestest": {
"type": "streamableHttp",
"url": "https://prod-eu.getbestest.com/mcp",
"headers": {
"Authorization": "Bearer bst_pat_YOUR_TOKEN_HERE"
}
}
}
}Official docs: Cline MCP quickstart
Claude Desktop
Claude Desktop's own connector dialog is built around OAuth, so the reliable route today is the mcp-remote bridge, which runs locally and adds the header for you. Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"bestest": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://prod-eu.getbestest.com/mcp",
"--header",
"Authorization: Bearer bst_pat_YOUR_TOKEN_HERE"
]
}
}
}This needs Node.js installed. Restart Claude Desktop fully afterwards, then look for the tools icon in the message box.
If your account has Anthropic's request headers beta enabled, you can skip the bridge and add the endpoint as a custom connector with an authorization request header instead. See the next section for what to enter.
claude.ai in the browser
This is the one that catches people out, so here it is plainly.
The claude.ai web app connects to remote MCP servers as custom connectors, and that dialog was OAuth-only for a long time. Because BesTest issues bearer tokens rather than running an OAuth flow, pasting the endpoint into the connector dialog would start an OAuth handshake that BesTest cannot complete, and you would be stuck with no useful error.
Anthropic has since added request header authentication to custom connectors. It is in beta and rolling out gradually, so it may or may not be on your account. If you have it:
- Go to Customize → Connectors → Add custom connector.
- Enter your region's endpoint, for example
https://prod-eu.getbestest.com/mcp. - Open Request headers and add the header name
authorization. - For the value, enter
Bearerfollowed by your token, including the space. Claude sends the value exactly as typed and adds no prefix of its own, so a bare token is rejected. - Mark it Required and save.
If Request headers is not in your dialog, the beta has not reached your account. Ask Anthropic for access, or use Claude Code or Claude Desktop in the meantime, since both reach the same data with the same token.
Official docs: Third party connectors with remote MCP
Grok
Grok supports bringing your own MCP server through its connectors interface. Add a custom connector, enter your region's /mcp endpoint, and supply the token where the dialog asks for authentication, entering the value as Bearer bst_pat_... if it asks for a raw header value.
Grok's connector surface is changing quickly and the authentication options differ between the consumer app and the API. If the dialog only offers OAuth, use one of the header-native clients above against the same token.
Official docs: xAI connectors
Any other MCP client
Any client that speaks MCP streamable HTTP with custom headers will work. Give it:
| Setting | Value |
|---|---|
| Transport | Streamable HTTP (not stdio, not SSE) |
| URL | https://prod-eu.getbestest.com/mcp (or your region) |
| Header | Authorization: Bearer bst_pat_YOUR_TOKEN_HERE |
The generic JSON shape most clients accept:
{
"mcpServers": {
"bestest": {
"type": "http",
"url": "https://prod-eu.getbestest.com/mcp",
"headers": {
"Authorization": "Bearer bst_pat_YOUR_TOKEN_HERE"
}
}
}
}If your client cannot send a custom header, put mcp-remote in front of it, as shown in the Claude Desktop section. It turns a header-authenticated remote server into a local stdio server that any client can talk to.
Check the connection
Whatever the client, prove it with a question only BesTest can answer:
List the test cycles in this Space.A real list means you are connected. An empty answer, or the agent talking about Jira instead, usually means the server did not load, so check the client's MCP panel before you debug the question.
When it does not work
| What you see | Almost always |
|---|---|
401 Unauthorized | Wrong region for the token, or the token is expired, revoked or rotated. Check the endpoint against your token's region first, since that is the most common cause. |
403 Forbidden | The token authenticated but is not allowed to do that: a read-only token attempting a write, or a request aimed at a different Space. |
| The server never appears | The config file is in the wrong place, or the client was not fully restarted. Most clients need a complete quit, not just a reload. |
| An OAuth screen appears | Your client is trying OAuth, which BesTest does not support yet. Use a header-native client from the table above. |
429 Too Many Requests | You have passed 100 requests a minute. The limit is shared with the REST API for the same token. |
| The agent answers about Jira, not tests | It is using a different MCP server. Name BesTest explicitly: "Using BesTest, list the test cycles." |
Related
- API tokens - create, rotate and revoke
- MCP - what the server can do
- Overview - regions, permissions and rate limits
- Support - if none of the above helped
