Skip to content

fix: update tool names to match Claude Code MCP naming convention#1

Open
jyin-cw wants to merge 1 commit intosourcegraph-community:mainfrom
jyin-cw:fix/claude-code-mcp-tool-names
Open

fix: update tool names to match Claude Code MCP naming convention#1
jyin-cw wants to merge 1 commit intosourcegraph-community:mainfrom
jyin-cw:fix/claude-code-mcp-tool-names

Conversation

@jyin-cw
Copy link

@jyin-cw jyin-cw commented Mar 12, 2026

Problem

Claude Code names MCP tools using the scheme mcp__<server-name>__<tool>, where <server-name> is whatever was passed to claude mcp add. For example:

claude mcp add sourcegraph https://.../.api/mcp
# → tools become: mcp__sourcegraph__keyword_search, mcp__sourcegraph__nls_search, etc.

The sg_* shorthand names in this skill (e.g. sg_keyword_search) don't match any valid Claude Code MCP registration name. There's no way to register a server that produces sg_keyword_search — Claude Code always uses double underscores and the mcp__ prefix.

Result: every tool call in the skill silently fails with no error. The skill appears to run but returns nothing.

Fix

Rename all sg_* tool references to mcp__sourcegraph__* to match the standard Claude Code convention when the server is registered as "sourcegraph" (the typical name for the Sourcegraph MCP server).

Files changed

  • SKILL.md
  • examples/common-searches.md
  • workflows/debugging-issue.md
  • workflows/fixing-bug.md
  • workflows/implementing-feature.md
  • workflows/understanding-code.md
  • workflows/code-review.md

Note

If users register the server under a different name (e.g. "sg"), they would need mcp__sg__* names instead. The README could document this — but sourcegraph is the conventional name used by the official Sourcegraph MCP server docs and setup scripts.

Reported while vendoring this skill into a Claude Code plugin marketplace.

Claude Code names MCP tools as `mcp__<server-name>__<tool>` based on how
the server is registered (e.g. `claude mcp add sourcegraph <url>` produces
`mcp__sourcegraph__keyword_search`). The `sg_*` shorthand names used in this
skill don't match any valid Claude Code MCP registration name — they silently
fail with no error, making the skill non-functional.

This PR renames all `sg_*` tool references to `mcp__sourcegraph__*` to match
the standard Claude Code convention when the Sourcegraph MCP server is
registered under the name "sourcegraph".

Reported by CoreWeave while vendoring this skill into their internal
Claude Code plugin marketplace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant