Overview
Custom integrations enable you to:- Connect to any REST API: No limitations on API structure
- Connect to MCP servers: Use Model Context Protocol servers for custom tools
- Generate libraries automatically: Rilo creates Python libraries from your API or MCP definition
- Use in workflows: Custom tools work like built-in integrations
- Reuse across workflows: Create once, use everywhere
Custom integrations are a powerful way to extend Rilo’s capabilities. Connect to internal tools, specialized services, or any REST API or MCP server.
Integration Types
Rilo supports two types of custom integrations:Custom APIs
Define REST API endpoints manually. Perfect for standard REST APIs with explicit control.
Custom MCP Tools
Connect to MCP servers for dynamic tool discovery. Ideal for MCP-compatible services.
Custom APIs
Custom APIs allow you to define REST API endpoints manually and create custom tools from them.Creating Custom API Integrations
Step 1: Navigate to Integrations
- Go to the Integrations page
- Find the Custom Integrations section
- Click “Create Custom Integration”
- Select “API” as the integration type
Step 2: Define API Endpoints
Specify your API endpoints:Step 3: Configure Authentication
Set up authentication: API Key:Step 4: Add Tools
You can add multiple tools to your custom API integration: Add Tool via API:- Go to your custom integration details page
- Click “Add Tool”
- Fill in tool details:
- Name and description
- HTTP method (GET, POST, PUT, PATCH, DELETE)
- URL endpoint
- Authentication configuration
- Query parameters, headers, and body parameters
- Test the tool before saving
- Save the tool
Step 5: Generate Library
Rilo automatically:- Generates a Python library class
- Creates methods for each tool/endpoint
- Handles authentication
- Makes tools available in workflows
Generated Library Structure
Automatic Generation
Rilo generates a library class from your API definition:Using Custom Integrations
Via Natural Language
Describe what you want:- Identify your custom integration
- Use it in generated code
- Handle authentication automatically
In Generated Code
Custom integrations work like any other library:API Definition Best Practices
Clear Endpoint Descriptions
Clear Endpoint Descriptions
Provide clear descriptions for each endpoint. This helps the AI agent understand how to use them.
Define Request Bodies
Define Request Bodies
Specify request body schemas for POST/PUT endpoints. This enables proper parameter handling.
Document Parameters
Document Parameters
Document path parameters, query parameters, and headers. This improves code generation.
Include Examples
Include Examples
Include example requests and responses when possible. This helps with testing and validation.
Authentication Methods
API Key
Simple API key authentication:Bearer Token
Bearer token authentication:OAuth 2.0
OAuth 2.0 flow:Custom Headers
Custom header authentication:Updating Custom Integrations
Modify Endpoints
You can update custom integrations:- Go to Integrations page: Find your custom integration
- Click “Edit”: Modify endpoint definitions
- Regenerate: Rilo regenerates the library
- Update Workflows: Existing workflows use the updated integration
Library class names remain stable after initial generation. Only descriptions, capabilities, and limitations can change on regeneration.
Custom MCP Tools
Custom MCP tools allow you to connect to Model Context Protocol (MCP) servers and use their tools in Rilo workflows.Creating Custom MCP Integration
Step 1: Navigate to Integrations
- Go to the Integrations page
- Find the Custom Integrations section
- Click “Create Custom Integration”
- Select “MCP” as the integration type
Step 2: Configure MCP Server
Provide MCP server details:- Server URL: The MCP server endpoint (must be publicly accessible)
- Server Name: Optional name for the MCP service
- Auth Type: Authentication method (none, bearer, api_key)
- Auth Config: Authentication credentials (encrypted by Rilo)
Step 3: Connect and Discover Tools
Rilo automatically:- Tests the connection to the MCP server
- Fetches available tools from the server
- Generates a Python library class
- Creates methods for each MCP tool
- Makes tools available in workflows
Step 4: Tool Discovery
MCP servers provide tools dynamically:- Tools are discovered from the MCP server
- Each tool becomes a method in the generated library
- Tool descriptions and parameters are extracted automatically
- Tools can be refreshed by syncing with the MCP server
MCP Tool Generation
When you add an MCP server, Rilo:- Connects to server: Establishes connection with authentication
- Fetches tools: Gets available tools from the server
- Generates class: Creates a Python library class
- Creates methods: Each MCP tool becomes a method
- Enhances metadata: Uses AI to improve tool descriptions
Generated MCP Library Structure
Using Custom MCP Tools
MCP tools work like any other library:MCP Server Requirements
MCP servers must:- ✅ Implement the MCP protocol
- ✅ Be accessible via HTTP/HTTPS
- ✅ Support tool discovery
- ✅ Handle tool execution requests
- ✅ Return results in MCP format
MCP Authentication
MCP servers can use various authentication methods:- Bearer Token: API key in Authorization header
- API Key: Key in headers or query parameters
- None: No authentication required
Syncing MCP Tools
You can sync tools from MCP servers:- Go to your MCP integration details page
- Click “Sync Tools” to refresh available tools
- Rilo will fetch latest tools from the server
- New tools are automatically added to the library
Custom API vs Custom MCP
When to Use Custom APIs
Use custom APIs when:- ✅ You have a standard REST API
- ✅ You want direct HTTP integration
- ✅ You prefer explicit API definitions
- ✅ You need custom authentication flows
- ✅ You want full control over tool definitions
When to Use Custom MCP Tools
Use custom MCP tools when:- ✅ You have an existing MCP server
- ✅ You want to leverage MCP protocol features
- ✅ You need dynamic tool discovery
- ✅ Tools are provided by an MCP-compatible service
- ✅ You want automatic tool synchronization
Both custom APIs and custom MCP tools achieve similar goals. Choose based on your existing infrastructure and preferences.
Best Practices
Test Before Production
Test Before Production
Test custom integrations thoroughly before using in production workflows.
Document APIs
Document APIs
Provide clear documentation for your API endpoints. This helps with integration and maintenance.
Handle Errors
Handle Errors
Ensure your API returns proper error responses. This helps with debugging and error handling.
Monitor Usage
Monitor Usage
Monitor API usage and rate limits to ensure workflows run smoothly.
Managing Custom Integrations
Adding Tools to API Integrations
You can add multiple tools to a custom API integration:- Via UI: Use the “Add Tool” button in the integration details page
- Via API: Use the
/add_tool/endpoint to programmatically add tools
- Name and description
- HTTP method (GET, POST, PUT, PATCH, DELETE)
- URL endpoint with path parameters
- Authentication configuration
- Query parameters
- Headers
- Body parameters (for POST/PUT/PATCH)
- Sample response (optional)
Testing Tools
Before using tools in workflows, you can test them:- Go to tool details in your integration
- Click “Test Tool”
- Provide test parameters
- Execute the tool
- Review the response
Updating Custom Integrations
You can update custom integrations:- Go to Integrations page: Find your custom integration
- Click “Edit”: Modify integration details
- For API integrations: Add, edit, or remove tools
- For MCP integrations: Update server URL or authentication
- Regenerate: Rilo regenerates the library if needed
- Update Workflows: Existing workflows use the updated integration
Library class names remain stable after initial generation. Only descriptions, capabilities, and limitations can change on regeneration.
Limitations
Custom API Limitations
- REST APIs only: Currently supports REST APIs, not GraphQL or other protocols
- Manual definition: Must manually define endpoints (no auto-discovery)
- No webhooks: Custom integrations don’t support webhook triggers (use app events)
- Rate limits: Subject to API rate limits
Custom MCP Limitations
- MCP protocol required: Server must implement MCP protocol
- Public accessibility: Server must be accessible from Rilo’s infrastructure
- Tool discovery: Depends on MCP server’s tool discovery implementation
- Rate limits: Subject to MCP server rate limits
Troubleshooting
Integration not connecting
Integration not connecting
- Verify API base URL is correct
- Check authentication credentials
- Ensure API is accessible
- Test API endpoint directly
Endpoints not working
Endpoints not working
- Verify endpoint paths are correct
- Check HTTP methods match API
- Ensure request bodies match API schema
- Review API documentation
Authentication failing
Authentication failing
- Verify credentials are correct
- Check authentication method matches API
- Ensure tokens are valid and not expired
- Review API authentication documentation
Related Features
- MCP Libraries - Built-in MCP integration method
- Integrations Overview - General integration information
- Email Tools - Email integration tools
- Document Tools - Document management tools
Custom integrations are a powerful way to extend Rilo’s capabilities. Connect to any REST API and use it in your workflows just like built-in integrations.