---
title: "Connect to external tools with MCP Code Agent SDK"
source: https://docs.autohand.ai/agent-sdk/tools/mcp
---

# Connect to external tools with MCP

MCP (Model Context Protocol) is a standard for connecting AI agents to external tools and data sources. Use MCP to extend your agents with capabilities like web research, database access, API integrations, and more.

## What is MCP?

MCP provides a standardized way for agents to discover and use external tools. MCP servers expose tools that agents can call, with proper schema definitions and execution handling.

**Note:** MCP integration is available in the TypeScript SDK. Support for other languages is coming soon.

## Using MCP Servers

Configure MCP servers to give agents access to external tools.

## Popular MCP Servers

There are many community-maintained MCP servers available:

-   **Brave Search:** Web search capabilities
-   **Filesystem:** Access to local and remote filesystems
-   **GitHub:** Repository operations and code search
-   **PostgreSQL:** Database query and management
-   **Slack:** Messaging and notifications
-   **Puppeteer:** Web automation and scraping
-   **Memory:** Persistent memory and state management

**Learn more:** See the [MCP documentation](/docs/guides/mcp-index) for a complete list of available servers and how to use them.

## Custom MCP Servers

You can build your own MCP servers to expose custom tools to agents.

## Use Cases

-   **Web Research:** Use Brave Search MCP to gather information from the web
-   **Database Access:** Query databases directly with PostgreSQL MCP
-   **API Integration:** Connect to external APIs through custom MCP servers
-   **File Operations:** Access remote filesystems with Filesystem MCP
-   **Notifications:** Send Slack messages or emails via MCP
-   **Web Automation:** Scrape websites with Puppeteer MCP

## Best Practices

-   **Validate tool outputs:** Always validate MCP tool results before using them
-   **Handle errors gracefully:** MCP servers may be unavailable or return errors
-   **Use appropriate permissions:** Configure permissions for MCP tools that modify state
-   **Monitor usage:** Track which MCP tools are being used and how frequently
-   **Secure credentials:** Store API keys and credentials securely, not in code