Set Up an MCP Client
Use the MCP Client Snap Pack to connect your SnapLogic agent pipelines to external MCP servers, enabling your AI agents to discover and invoke tools hosted outside of SnapLogic.
Overview
The MCP Client Snap Pack lets your SnapLogic pipelines act as MCP clients — connecting to any MCP-compatible server to discover its tools and invoke them on behalf of an AI agent. This is the complement to the MCP Server: where the MCP Server exposes your SnapLogic pipelines as tools, the MCP Client lets your pipelines consume tools from elsewhere.
Use the MCP Client Snap Pack to:
- Call tools hosted on external MCP servers — such as web search, code execution, or data retrieval services — from within a SnapLogic agent pipeline
- Connect to a SnapLogic MCP Server from a different pipeline or organization
- Chain tools from multiple MCP servers together in a single agent workflow
- Expose MCP resources (
resources/list,resources/read) to your AI agent alongside tools
The Snap Pack contains two Snaps that work together:
- MCP Function
Generator: Connects to the MCP server and queries it for available tools
(
tools/list). Converts the server's tool definitions into a list of function definitions formatted for LLM tool calling. - MCP
Invoke: Executes a tool or resource operation on the MCP server
(
tools/call,resources/read,resources/list) and returns the result in a unified structure for downstream processing.
How it works
MCP Client Snaps are designed to work within agent pipelines built using AgentCreator Snaps. In a typical pipeline, the MCP Function Generator and MCP Invoke Snaps bracket the LLM tool-calling step:
- MCP Function Generator connects to the external MCP server using the configured
account. It calls
tools/listto fetch available tools and converts each tool's name, description, and parameter schema into a function definition. Optionally, it also addslist_resourcesandread_resourceas callable functions. - The function definitions are passed to an LLM tool-calling Snap (Anthropic Claude, OpenAI, Azure OpenAI, or Google). The LLM evaluates the user's request, selects the appropriate tool, and generates the call parameters.
- MCP Invoke receives the LLM's tool call decision and executes the selected operation on the MCP server, passing the tool name and parameters. It returns the result in a unified structure.
- A Function Result Generator Snap formats the tool result and returns it to the LLM, which incorporates it into its response or triggers further tool calls.
Prerequisites
- The URL of the external MCP server you want to connect to, including transport path
(
/sseor/mcp) - Authentication credentials for the server, if required (bearer token, or OAuth2 client ID and secret)
- An AgentCreator pipeline containing a supported LLM tool-calling Snap (Anthropic Claude, OpenAI, Azure OpenAI, or Google)
Step 1: Create an MCP Client account
Choose the account type that matches your MCP server's transport protocol and authentication method, then follow the setup steps in Configure MCP Client Accounts.
| Account type | Transport | Use when |
|---|---|---|
| MCP SSE Account | SSE | The server exposes a /sse endpoint and requires no
authentication beyond optional header fields |
| MCP SSE OAuth2 Account | SSE + OAuth2 | The server exposes a /sse endpoint and requires OAuth2
authentication (client credentials, authorization code, or password grant) |
| MCP Streamable HTTP Account | Streamable HTTP | The server exposes a /mcp endpoint and requires no
authentication beyond optional header fields |
| MCP Streamable HTTP OAuth2 Account | Streamable HTTP + OAuth2 | The server exposes a /mcp endpoint and requires OAuth2
authentication |
Step 2: Build the MCP Client pipeline
Add the MCP Client Snaps to your agent pipeline alongside the LLM Snaps that handle tool calling.
- Add an MCP Function Generator Snap to your pipeline and configure its account to use the account you created in Step 1.
- Expose Tools is selected by default. Leave it selected to include the server's tools as callable functions.
- Optionally, select Expose Resources to add
list_resourcesandread_resourceas additional functions the LLM can invoke. - Connect the MCP Function Generator output to your LLM tool-calling Snap (Anthropic Claude, OpenAI, Azure OpenAI, or Google). The Snap passes the function definitions to the LLM with the user's prompt.
- Add an MCP Invoke Snap downstream of the LLM tool-calling Snap. Configure its
settings:
- Operation: Set to
tools/call, or use$sl_metadata.operationto pass the operation from the LLM's tool call decision. - Tool Name: Set to
$function.nameto use the tool selected by the LLM. - Parameter: Set to
$function.json_argumentsto pass the LLM-generated parameters to the tool.
- Operation: Set to
- Connect the MCP Invoke output to a Function Result Generator Snap (matching your LLM provider) to return the tool result to the LLM for further processing.