MCP Integration with Smithery.ai
Connect your Agent5ive agent to MCP servers hosted on Smithery.ai
Overview
Smithery.ai is a platform that hosts and manages Model Context Protocol (MCP) servers, making it easy to discover and connect to powerful tools and integrations. This tutorial will guide you through:
- Finding MCP servers on Smithery.ai
- Getting the correct MCP server URLs
- Understanding streamable/SSE connections
- Integrating Smithery MCP servers with Agent5ive
- Testing and troubleshooting connections
What is Smithery.ai?
Smithery.ai allows you to build, find, and use MCP servers. They host popular MCP servers including:
- Exa - Search the live web, access LinkedIn profiles, do deep research
- Context7 - Reference the latest docs for major SDKs and frameworks
- Browserbase - Control a remote web browser using Stagehand
- And many more community-contributed servers
Prerequisites
- An Agent5ive account with agent creation access
- Basic understanding of MCP (Model Context Protocol)
- Internet connection for accessing Smithery.ai
Step-by-Step Guide
Browse Smithery.ai MCP Servers
Visit smithery.ai to browse available MCP servers. You can search for specific functionality or browse by category.
Select an MCP Server
Click on any MCP server that interests you. Each server page shows:
- Description of what the server does
- Available tools and functions
- Usage examples
- Connection instructions
For this example, let's use the Context7 server which provides access to documentation for popular frameworks.
Get the MCP Server URL
On the server page, look for the connection details. Smithery provides different connection methods:
- HTTP/HTTPS URLs - For direct HTTP connections
- Streamable URLs - For Server-Sent Events (SSE) connections
For Agent5ive integration, you'll use the HTTP/HTTPS URL with embedded keys which looks like:
Understanding Streamable/SSE Connections
Smithery.ai supports Server-Sent Events (SSE) for real-time streaming responses. This is particularly useful for:
- Long-running operations - Tasks that take time to complete
- Progressive responses - Getting partial results as they become available
- Real-time updates - Live data feeds and notifications
Agent5ive automatically handles SSE connections when the MCP server supports them. The connection type is determined by the server's capabilities.
How SSE Works with Agent5ive:
- Agent5ive sends a request to the MCP server
- Server responds with streaming data chunks
- Agent5ive processes each chunk as it arrives
- Final response is assembled from all chunks
Configure Your Agent5ive Agent
Now let's integrate the Smithery MCP server with your Agent5ive agent:
- Log in to your Agent5ive account
- Create a new agent or edit an existing one
- Navigate to the "Tools" section during agent creation/editing
- Expand the "Advanced Tools (MCP - Experimental)" section
- Toggle on "Enable Advanced Tools (via MCP Server)"
- Paste the MCP Server URL you copied from Smithery
- Click the "Validate" button to verify the connection
Test the Integration
After deploying your agent, test the MCP integration with relevant prompts based on the server's capabilities.
Example Prompts for Context7:
- "/context7 how do I use React hooks?"
- "/context7 Next.js app router documentation"
- "/context7 TypeScript utility types"
Example Prompts for Exa (Web Search):
- "Search for the latest AI research papers"
- "Find recent news about renewable energy"
- "Look up information about quantum computing"
Advanced Configuration
Environment Variables
Some Smithery MCP servers may require additional configuration through environment variables:
Variable | Required | Description |
---|---|---|
API_KEY | Sometimes | API key for servers that require authentication (use \"Get URL with keys instead\" option instead) |
SERVER_TOKEN | Sometimes | Server-specific authentication token (use \"Get URL with keys instead\" option instead) |
Connection Types
Smithery supports multiple connection protocols:
- HTTP/HTTPS - Standard request-response pattern
- Server-Sent Events (SSE) - Streaming responses for real-time data
Agent5ive automatically detects and uses the appropriate connection type based on the server's capabilities.
Troubleshooting
Connection Fails
If the MCP server connection fails:
- Verify the URL is correct and accessible
- Make sure you used \"Get URL with keys instead\" - OAuth authentication is not supported
- Check if the server requires authentication
- Ensure your network allows outbound connections to Smithery.ai
- Try a different server to isolate the issue
Server Not Responding
If the server doesn't respond to requests:
- Check the server status on Smithery.ai
- Verify you're using the correct tool names and parameters
- Review the server's documentation for usage examples
- Check for rate limiting or quota restrictions
Streaming Issues
If SSE/streaming connections have problems:
- Ensure your network supports Server-Sent Events
- Check for proxy or firewall interference
- Try using the HTTP endpoint instead of streaming
- Verify the server supports the streaming protocol
Popular Smithery MCP Servers
Context7 (Upstash)
Access documentation for major SDKs and frameworks directly in your agent
View on SmitheryQuick Start: Copy any of the URLs above and paste them directly into your Agent5ive MCP configuration.
Next Steps
Now that you've connected to Smithery MCP servers, consider:
- Explore multiple servers - Combine different MCP servers for powerful agent capabilities
- Create specialized agents - Build agents focused on specific use cases using relevant MCP tools
- Monitor usage - Keep track of API calls and rate limits for external services
- Contribute back - Consider creating your own MCP servers and sharing them on Smithery
For more information about the agent5ive-mcp package, visit the NPM package page .