---
title: "MCP tool name collisions: causes and fixes"
description: Two MCP servers can each define a tool with the same name. Namespace tools by server, rename the server, and use only letters, digits, _ and -.
canonical: https://mcp1.com/blog/mcp-tool-name-collisions
last-updated: 2026-11-17
---

# MCP tool name collisions: causes and fixes

Two MCP servers can each define a tool with the same name. Namespace tools by server, rename the server, and use only letters, digits, \_ and -.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

list\_projectslist\_projects

 supabase\_\_list\_projects

 neon\_\_list\_projects

list\_projectslist\_projects

 supabase\_\_list\_projects

 neon\_\_list\_projects

An MCP tool name only has to be unique within its own server, so two servers can both ship a tool called `search` or `list_projects`. The fix is to namespace every tool with the server it came from, like `neon__list_projects`, and to keep names inside the strictest character and length rules of the model APIs your clients call.

## Why do MCP tool names collide?

The MCP spec says tool names should be unique within a server and says nothing about uniqueness across servers. A client that connects to several servers gets several namespaces with no rule for merging them. Collisions come from three places:

- Generic verbs. Supabase and Neon both have `list_projects`. Servers written for ChatGPT’s deep research expose tools named exactly `search` and `fetch`, because that convention asked for those names.
- The same server twice. Connect GitHub with your work account and your personal account, and every tool name appears twice.
- Shadowing on purpose. A malicious server can define a tool with the same name and a similar description as one you trust, hoping the model calls it instead.

The spec doesn’t say what a client should do with two tools of one name, and most clients don’t document it. Whatever they do, the model sees two tools it can’t tell apart by name, and you can’t tell from the transcript which server ran the call.

## How do MCP clients namespace tool names?

Claude Code documents its scheme: every MCP tool is exposed as `mcp__<server>__<tool>`, where the server part is the name you gave it in `claude mcp add`. That makes `mcp__supabase__list_projects` and `mcp__neon__list_projects` two different tools, and lets permission rules target one of them. A few details matter:

- Dots and spaces in the server name become underscores, so a server named `my.server` is matched as `mcp__my_server__*`.
- A server name that contains `__` makes rules ambiguous, because the separator is also `__`.
- A tool whose full name passes 128 characters is left out entirely, with no tool for the model to call.

Cursor and VS Code don’t document a naming scheme for MCP tools. Check their tool lists (Tools & MCP in Cursor, the tools picker in VS Code) after connecting two servers that share names, and name the server in your prompt when it matters.

## What characters can an MCP tool name use?

Letters, digits, underscores and hyphens, and keep it short. The spec allows more than the model APIs accept, and the client has to bridge the gap:

WhereRule for tool names

MCP spec (2025-11-25)

Should be 1 to 128 characters of A-Z, a-z, 0-9, underscore, hyphen and dot, case-sensitive, unique within the server.

Anthropic Messages API

Must match `^[a-zA-Z0-9_-]{1,128}$`. No dots.

OpenAI APIs

Reject names with dots or spaces with a “does not match pattern” error, and the pattern in those errors caps names at 64 characters.

Claude Code

Counts the full `mcp__server__tool` name against 128 characters.

So `issues.create` is a valid MCP tool name that neither API will take as is. A client has to rewrite it, and the rewritten name is the one in your logs and permission rules, not the one in the server’s code.

## How do I fix a tool name collision as a user?

Rename the server, not the tool. The server’s name in your config is the part of the namespace you control. For the two-accounts case in Claude Code:

Terminal

```
claude mcp add --transport http github_work https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer $GITHUB_WORK_TOKEN"

claude mcp add --transport http github_personal https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer $GITHUB_PERSONAL_TOKEN"
```

Every tool now exists twice under distinct names, `mcp__github_work__create_issue` and `mcp__github_personal__create_issue`, and you can say which account to use. The shell expands the variables when you run the command, so the token is stored in Claude Code’s config; use a fine-grained token for each.

If you only need one of two overlapping tools, deny the other. A deny rule with a full tool name removes it from the model’s context:

.claude/settings.json

```
{
  "permissions": {
    "deny": ["mcp__neon__list_projects"]
  }
}
```

Cursor and VS Code let you switch single tools off in their tool lists. Fewer overlapping tools also means fewer wrong picks, which [too many MCP tools](https://mcp1.com/blog/too-many-mcp-tools) covers in more detail.

## How should I name tools in my own MCP server?

1. 1Use snake\_case with only letters, digits and underscores, like `create_issue`. Skip dots even though the spec allows them.
2. 2Name the action and the object. list\_projects is clear inside your server; the client adds the server name, so don’t repeat your product name in every tool.
3. 3Budget for the prefix. Claude Code adds `mcp__`, the server name and `__`. Keeping tool names under about 40 characters leaves room for that under OpenAI’s 64.
4. 4Don’t rely on case. `Search` and `search` are different names to the spec, but not to the person reading a log.
5. 5Never rename a tool casually. Names are what permission rules, deny lists and audit queries match on, so a rename silently breaks them.

Descriptions don’t fix collisions

A clearer description helps the model choose between similar tools, but two tools with the same name are still one name to the client. Fix the name, then the description.

## How MCP1 keeps tool names apart

MCP1 is a gateway that puts many MCP servers behind one URL, so it namespaces every tool as `server__tool`, like `github__create_issue`, before any client sees it. The prefix comes from the name you give a server when you install it, lowercased with underscores. Install GitHub twice and the second is `github_2` unless you name it. MCP1’s own tools are `mcp1__*`, so they never clash with a server’s.

Because names are stable and prefixed, rules by name such as `github__delete_*` hold across servers and tools added later, and the audit log shows exactly which server ran each call. A gateway too large to list every tool shows only its built-in tools, and agents find the rest with `mcp1__search_tools`. The [docs](https://mcp1.com/docs) explain gateways and rules, and the Individual plan is free to [start with](https://mcp1.com/signup).

## Common questions

### Can two tools in the same MCP server share a name?

No. The spec says names should be unique within a server, and tools/call identifies the tool by name alone, so the second would be unreachable.

### Are MCP tool names case-sensitive?

The spec says to treat them as case-sensitive, so Search and search are different tools. Don’t rely on case to tell tools apart.

### Why does Claude Code skip some of my MCP tools?

Claude Code leaves out a tool whose full mcp\_\_server\_\_tool name is over 128 characters. Use a shorter server name or shorten the tool name.

### Can MCP tool names contain dots?

The spec allows dots, but Anthropic’s and OpenAI’s APIs reject them, so clients have to rewrite the name. Use underscores instead.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ Terminal$ claude mcp add --transport http github api.githubcopilot.com/mcp/githubConnectedHow to connect GitHub MCP to Claude CodeRun claude mcp add with https://api.githubcopilot.com/mcp/ and a fine-grained token. Read-only mode, toolsets, permission rules and team setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/github-mcp-claude-code)[ SupportIntercomRead-onlyLinearRead-onlyNotionRead-onlyStripeRead-onlyMCP servers for support teams: what to connect firstStart with your helpdesk, Linear, Notion and Stripe, read-only first. What they answer together, which writes to hold back and a shared setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/mcp-servers-for-support-teams)

---

This is the markdown copy of https://mcp1.com/blog/mcp-tool-name-collisions. Site index for agents: https://mcp1.com/llms.txt
