> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tools

> Connect to Model Context Protocol servers for external service integrations

MCP (Model Context Protocol) tools connect your agent to external services that implement the MCP standard. This allows your agent to use capabilities provided by MCP-compatible servers during conversations.

## How They Work

```
User speaks → Agent decides to call an MCP tool → Request sent to MCP server →
Server processes and responds → Agent uses the result in its reply
```

MCP tools run server-side, so they work on both phone and web deployments.

## Setting Up MCP Tools

1. Navigate to the **Tools** section in your dashboard
2. Click **Create Tool**
3. Select **MCP Server** as the tool type
4. Provide the MCP server connection details

### Connection Configuration

* **Server URL**: The MCP server endpoint
* **Authentication**: Credentials required by the MCP server (if any)

Once connected, the available tools from the MCP server are automatically discovered and made available to your agent.

## Using MCP Tools

### In Single Prompt Agents

The agent sees the MCP tools alongside any other configured tools. It decides when to call them based on the tool descriptions provided by the MCP server. The response is sent back to the LLM as context.

### In Flow Agents

MCP tools are used via [Tool Nodes](/agents/flow-agent/nodes/tool-node), just like function tools. You can extract values from responses and route the conversation based on results.

## When to Use MCP Tools

Use MCP tools when:

* You have an existing MCP server you want to connect to
* You want to leverage a third-party service's MCP integration
* You need capabilities that are provided through the MCP ecosystem

For custom API integrations where you control the endpoint, [Function Tools](/agents/tools/function-tools) are typically simpler to set up.

## Related

<CardGroup cols={2}>
  <Card title="Tools Overview" href="/agents/tools/introduction">
    Overview of all tool types
  </Card>

  <Card title="Function Tools" href="/agents/tools/function-tools">
    Server-side API call tools
  </Card>
</CardGroup>
