MCP tool (for calling server-defined tools), ListMcpResources (for discovering available resources), and ReadMcpResource (for reading a specific resource by URI).
MCP (server-defined tools)
When an MCP server is connected, each tool it exposes becomes available to Claude as a first-class tool with its own name, description, and input schema — all defined by the server. Claude invokes these tools the same way it invokes built-in tools.How it works
Claude Code uses the MCP tool mechanism as a base, but each connected server’s tools are registered with:- A real tool name (e.g.,
github__search_repositories,postgres__query) - A description provided by the server
- An input schema defined by the server
Output
The MCP tool’s execution result, returned as a string. The content and format depend entirely on the server and tool.
Referencing MCP tools
You can ask Claude to use a specific MCP tool by name:Permissions
MCP tools use a passthrough permission model. Claude Code will ask for your consent before invoking an MCP tool for the first time. You can pre-approve MCP tools in your settings.If an MCP server provides a web fetch or search tool, prefer it over the built-in
WebFetch or WebSearch tools — MCP tools may have authenticated access or fewer restrictions.ListMcpResources
Lists the resources available from connected MCP servers. Resources are data artifacts exposed by a server (files, database records, API responses, etc.) that can be read by URI.Parameters
Optional. Filter results to a specific MCP server by name. When omitted, resources from all connected servers are returned.
Output
Returns an array of resource objects:The resource URI — used as the identifier to read the resource with
ReadMcpResource.Human-readable resource name.
The name of the MCP server that provides this resource.
MIME type of the resource content (e.g.,
"text/plain", "application/json").Optional description of what the resource contains.
Examples
List all resources from all servers
List resources from a specific server
ReadMcpResource
Reads the content of a specific resource from an MCP server, identified by its server name and URI.Parameters
The name of the MCP server to read the resource from. Must match a connected server’s name exactly.
The URI of the resource to read. Obtain URIs from
ListMcpResources.Output
Array of content objects. Each object includes:
Usage notes
- Binary blob content (images, PDFs, etc.) is automatically saved to a temporary file rather than inlined as base64. The
blobSavedTofield gives you the path; use theReadtool to access it. - The server must have resource capabilities enabled. If it doesn’t,
ReadMcpResourcewill return an error.
Example workflow
Step 1: Discover available resources