Flexible Configuration
Craft Agents uses smart discovery to find MCP server configurations in your agent document. You can write configurations in any common format - Claude Code JSON, VS Code format, or others. The discovery process will find and parse them automatically.This documentation uses Claude Code format for consistency, but you can paste configurations from any MCP-compatible tool.
Basic Configuration
Add MCP servers to your agent document in a JSON code block:Configuration Fields
| Field | Required | Description |
|---|---|---|
url | Yes | Full URL to the MCP server endpoint |
headers | No | Custom headers including authentication |
Example: Advanced Web Search with Exa
Craft Agents includes built-in web search, but for research-intensive tasks you may want more powerful capabilities. Here’s a complete example adding Exa’s neural search and content extraction to a research agent: Agent document content:Multiple Servers
You can connect multiple MCP servers to a single agent:Server Discovery
When you activate an agent with MCP servers, Craft Agents:- Connects to each configured server
- Queries available tools from each server
- Makes tools available with prefixed names (e.g.,
exa_search,github_list_repos)
Refreshing Connections
If a server’s tools change or you need to reconnect:Troubleshooting
Server not connecting
Server not connecting
- Verify the URL is correct and accessible
- Check if the server requires authentication
- Ensure your network allows the connection
- Try accessing the URL directly in a browser
Tools not appearing
Tools not appearing
- Run
/agent reloadto refresh the connection - Check
/tools -vto see what’s available - Verify the YAML syntax is correct
- Make sure the code block is marked as
yaml
Authentication errors
Authentication errors
- Confirm your API key or token is correct
- Check if the key has the required permissions
- Some servers need specific scopes - check their documentation
JSON parsing errors
JSON parsing errors
- Ensure valid JSON syntax (commas between items, no trailing commas)
- Check that URLs are properly quoted
- Verify the
mcpServerskey is present
Best Practices
Use descriptive names
Use descriptive names
Choose server names that describe their purpose:
web-search, github-repo, company-wiki rather than server1, server2.Limit servers per agent
Limit servers per agent
Connect only the servers an agent needs. Too many tools can confuse the agent about which to use.
Document in instructions
Document in instructions
Mention connected services in the agent’s instructions so it knows what tools are available and when to use them.
Next Steps
Configure authentication
Learn about OAuth, bearer tokens, and API key authentication for MCP servers.