Skip to main content

What is MCP?

Model Context Protocol (MCP) is an open standard that enables AI models to securely connect to various data sources and tools. With MCP, you can extend your agents’ capabilities without modifying the core SDK.
MCP allows agents to access databases, APIs, file systems, and custom tools through a standardized interface.

Why Use MCP?

Extensibility

Add new capabilities without changing SDK code

Security

Controlled access to sensitive resources

Modularity

Mix and match different MCP servers

Standards-Based

Industry-standard protocol

Connecting to MCP Servers

Basic Connection

Connect to an MCP server using HTTP:

Multiple MCP Servers

Connect to multiple MCP servers for different capabilities:

Available MCP Tools

Once connected, agents can automatically discover and use MCP tools:

Building MCP Servers

Create your own MCP server to expose custom functionality:

Example: Database Tool

MCP Configuration

Authentication

Configure authentication for secure MCP connections:

Timeout Configuration

Set timeouts for MCP operations:

MCP Best Practices

Always validate inputs in your MCP tools to prevent injection attacks:
Reuse connections for better performance:
Protect your MCP servers from abuse:
Track MCP usage for debugging and security:

Common MCP Use Cases

Database Access

API Integration

File System Operations

Custom Business Logic

Troubleshooting

Ensure the MCP server is running and accessible:
Verify your authentication credentials:
Check that the tool is registered on the MCP server:

Next Steps

Tools Reference

Learn about built-in tools

API Reference

View the complete API