MCPTool
Execute tools provided by connected MCP servers
ListMcpResourcesTool
Enumerate resources available on MCP servers
ReadMcpResourceTool
Read a specific resource by URI from an MCP server
McpAuthTool
Initiate OAuth authentication for an MCP server
WebFetchTool
Fetch and process content from a URL
WebSearchTool
Execute a web search and retrieve results
MCPTool
MCPTool is the generic wrapper that exposes every tool registered by a connected MCP server as a first-class Claude Code tool. Each MCP server tool becomes individually callable under the naming convention:github providing a create_issue tool is exposed as mcp__github__create_issue.
Tool name: mcp__<server>__<tool> (dynamic, per connected server)Read-only: determined by the MCP server
Concurrency-safe: determined by the MCP server
Destructive: determined by the MCP server
Dynamic schema
MCPTool’s input schema is passthrough — it accepts any JSON object and forwards it verbatim to the MCP server. The actual schema for each tool is defined by the server and reported via the MCPtools/list RPC. Claude Code displays the server-provided description and parameter documentation in the UI.
tools/list, receives the tool definitions, and registers a concrete tool instance for each one — replacing the passthrough schema with the server’s actual JSON Schema.
Tool naming convention
| Component | Source |
|---|---|
mcp__ | Fixed prefix indicating MCP origin |
<server-name> | The name field from the server’s config in settings.json |
<tool-name> | The name field from the server’s tools/list response |
Permission model
MCP tool calls go through the same permission system as built-in tools. You can configurealways_allow rules for specific MCP tools in settings.json:
Usage example
Calling a GitHub MCP tool to list open issues:ListMcpResourcesTool
Lists all resources (data sources) available across connected MCP servers, or scoped to a specific server. Resources are persistent, addressable data items (files, database tables, API endpoints, etc.) that an MCP server exposes for reading. Tool name:ListMcpResourcesToolRead-only: yes
Concurrency-safe: yes
Destructive: no
Parameters
Optional server name to filter results. When omitted, returns resources from all connected servers. Pass the exact server name from your MCP configuration.
Return value
An array of resource descriptors:Resource URI (e.g.
file:///path/to/file, db://mydb/table/users).Human-readable name for the resource.
Optional MIME type of the resource content.
Optional description of the resource.
Name of the server that provides this resource.
Usage example
ReadMcpResourceTool
Reads the contents of a specific resource from an MCP server by URI. Binary content is saved to a local file; text content is returned inline. Tool name:ReadMcpResourceToolRead-only: yes
Concurrency-safe: yes
Destructive: no
Parameters
The MCP server name that hosts the resource.
The resource URI to read, as returned by
ListMcpResourcesTool.Return value
Array of content items from the resource:
uri— the resource URImimeType— optional MIME typetext— text content (present for text resources)blobSavedTo— local path where binary content was saved (present for binary resources)
Usage example
McpAuthTool
A pseudo-tool that is automatically injected in place of an MCP server’s real tools when that server requires OAuth authentication. Calling it starts the OAuth flow and returns an authorization URL for the user to complete in their browser. Tool name:mcp__<server>__authenticate (one per unauthenticated server)Read-only: no
Concurrency-safe: no
Authentication flow
Server needs auth
Claude Code connects to the server and receives an HTTP 401. The server’s real tools are replaced with a single
mcp__<server>__authenticate pseudo-tool.Initiate OAuth
Claude calls
mcp__<server>__authenticate with no parameters. Claude Code starts the OAuth flow in the background with skipBrowserOpen: true.Share URL
McpAuthTool returns
{ status: "auth_url", authUrl, message }. Claude presents the URL to the user.Browser callback
The user opens the URL and completes authorization. The OAuth callback fires in the background.
Parameters
McpAuthTool accepts no parameters ({}).
Return value
"auth_url" — OAuth URL was obtained and should be shown to the user."unsupported" — The server’s transport does not support programmatic OAuth (e.g. stdio). Direct the user to run /mcp manually."error" — The OAuth flow failed. Includes an error message.Human-readable instructions or error message.
The authorization URL to open in a browser (present when
status is "auth_url").McpAuthTool only supports
sse and http MCP transports. Servers using stdio or claudeai-proxy transports must be authenticated manually via the /mcp command.WebFetchTool
Fetches content from an HTTP(S) URL, converts it to Markdown, and applies a prompt to extract or summarise the relevant parts. Useful for reading documentation, API references, or any web page. Tool name:WebFetchRead-only: yes
Concurrency-safe: yes
Destructive: no
Parameters
The fully-formed URL to fetch (must be a valid
https:// or http:// URL).A natural-language prompt describing what to extract or summarise from the fetched content. The tool fetches the page, converts it to Markdown (up to ~100 000 characters), and applies this prompt to focus the output.
Return value
The URL that was fetched.
HTTP response status code (e.g.
200, 404).HTTP response status text (e.g.
"OK", "Not Found").Size of the fetched content in bytes.
Processed output after applying the
prompt to the fetched content.Wall-clock time to fetch and process the content in milliseconds.
Pre-approved hosts
Certain hosts (e.g.docs.anthropic.com) are pre-approved and do not require user permission. All other hosts prompt for permission on first use unless configured in settings.json.
Usage example
WebSearchTool
Executes a web search using Anthropic’s built-in search capability (web_search_20250305) and returns a list of matching pages with titles and URLs.
Tool name: WebSearchRead-only: yes
Concurrency-safe: yes
Destructive: no
WebSearchTool is only available when the active model supports the
web_search_20250305 beta tool (currently Claude models on Anthropic’s API). It is automatically disabled on Bedrock, Vertex, and other providers that do not support this capability.Parameters
The search query (minimum 2 characters).
Restrict results to pages from these domains only. For example
["docs.anthropic.com", "github.com"].Exclude results from these domains. Takes precedence over
allowed_domains.Return value
The search query that was executed.
Mixed array of search result objects and text commentary from the model. Each search result has:
tool_use_id— identifier of the search invocationcontent[]— array of{ title, url }search hits
Total time to complete the search operation.