Overview
The Model Context Protocol (MCP) enables agents to access tools from external MCP servers. The framework provides built-in support for registering MCP servers via STDIO or HTTP transport, auto-discovering tools, and using them seamlessly in your agents.Quick Start
Register MCP Server Programmatically
Using Configuration File
Createmcp_servers.json in your agent folder:
Transport Types
STDIO Transport
Best for local MCP servers running as subprocesses.Executable to run (e.g.,
python, node, npx)Command-line arguments
Working directory for the process
Environment variables to pass to the process
HTTP Transport
Best for remote MCP servers or containerized deployments.Base URL of the MCP server
HTTP headers to include with requests
Using MCP Tools in Agents
Once registered, MCP tools are available just like any other tool.In WorkflowBuilder
In agent.json
In Agent Builder MCP
When building agents with the Agent Builder MCP server:Available Tools
When you register theaden_tools MCP server, these tools become available:
Web Tools
web_search
web_search
Search the web using Brave Search API.Parameters:
query(string, required): Search querycount(integer): Number of results (default: 10)
BRAVE_SEARCH_API_KEYExample:web_scrape
web_scrape
Scrape content from a URL.Parameters:
url(string, required): URL to scrapeselector(string): CSS selector for content extraction
File Tools
file_read
file_read
Read file contents.Parameters:
path(string, required): File path
file_write
file_write
Write content to a file.Parameters:
path(string, required): File pathcontent(string, required): Content to write
pdf_read
pdf_read
Extract text from PDF files.Parameters:
path(string, required): PDF file path
Environment Variables
Some MCP tools require credentials via environment variables.Pass via Configuration
${VAR_NAME} with values from the environment.
Pass Programmatically
Multiple MCP Servers
You can register multiple MCP servers to access different sets of tools:Best Practices
Development
Use STDIO for Local Development
STDIO transport is easier to debug and doesn’t require managing server processes:
Production
Use HTTP for Production
HTTP transport is better for:
- Containerized deployments
- Shared tools across multiple agents
- Remote tool execution
Tool Name Conflicts
If multiple MCP servers provide tools with the same name, the last registered server wins. To avoid conflicts:- Use unique tool names in your MCP servers
- Register servers in priority order (most important last)
- Use separate agents for different tool sets
Complete Example
Here’s a complete example of an agent that uses MCP tools:Troubleshooting
Connection Errors (STDIO)
Connection Errors (STDIO)
Symptoms:
- Server fails to start
- No response from server
- Process exits immediately
- Check command and path are correct
- Verify server starts successfully standalone:
- Check environment variables are set
- Look at stderr output for error messages
Tool Not Found
Tool Not Found
Symptoms:
- Tool referenced in agent.json but not available
- “Tool ‘xxx’ not found” error
- Verify server registered successfully (check logs)
- List available tools:
- Check tool name spelling in configuration
HTTP Server Not Responding
HTTP Server Not Responding
Symptoms:
- Connection timeout
- 404 or 500 errors
- Verify server is running:
- Check firewall settings
- Verify URL and port are correct
- Check server logs for errors
Missing Credentials
Missing Credentials
Symptoms:
- Tool execution fails with auth error
- “API key not found” errors
- Verify environment variables are set:
- Check env vars are passed to MCP server:
- Use credential store for managed credentials
Building Your Own MCP Server
For building custom MCP servers, see:MCP Server Guide
Learn how to build your own MCP servers with custom tools
Next Steps
Credential Management
Manage API credentials for MCP tools
Browser Automation
Use GCU browser tools via MCP