Connecting Custom REST APIs
In addition to MCP servers, Hyper allows you to connect to any REST API. This means if a service has an API — whether it’s your own internal API, a third-party service, or any HTTP-based endpoint — you can make it available to your agents as a tool.What You’ll Need
Before connecting a custom API, have the following ready:- The base URL of the API (e.g.,
https://api.yourservice.com/v1) - Authentication details — API key, bearer token, or other credentials
- Optionally, an OpenAPI/Swagger specification URL or file for automatic endpoint discovery
How Custom APIs Work
When you connect a custom API to Hyper:- You provide the API endpoint details and authentication
- Hyper registers the API as a callable tool for your agents
- When an agent needs to use the API, Hyper handles authentication and makes the request on the agent’s behalf
- The response is returned to the agent for processing
Step-by-Step: Adding a Custom API
Step 1: Open the Tool Selector
When configuring an agent, open the Tool Selector dialog. You’ll see three tabs at the top: Apps, Custom API, and Custom MCP.Step 2: Switch to the Custom API Tab
Click on the Custom API tab. You’ll see an option to add a new API connection.Step 3: Click “Add API”
Click the Add API button to open the configuration form.Step 4: Configure Your API
API Name
Give your API a descriptive name that helps identify what it does. For example:
Internal CRM API, Weather Service, or Payment Gateway.Base URL
Enter the base URL for the API. All endpoint paths will be relative to this URL.Example:
https://api.example.com/v1Authentication
Configure how to authenticate with the API:
- API Key — Provide a key that will be sent as a header (e.g.,
X-API-Key: your-key) - Bearer Token — A token sent in the
Authorization: Bearerheader - Custom Headers — Add any custom headers the API requires
- None — For APIs that don’t require authentication
Step 5: Save and Test
Save the configuration and test the connection to make sure your agent can reach the API successfully.Tips & Best Practices
Use OpenAPI specs when available
Use OpenAPI specs when available
If the API you’re connecting to has an OpenAPI (Swagger) specification, use it. This lets Hyper automatically discover all endpoints, parameters, and response types, making the integration much smoother.
Start with read-only endpoints
Start with read-only endpoints
When first connecting a custom API, consider starting with read-only (GET) endpoints. Once you’re confident the integration is working correctly, you can add write operations.
Provide context for your agents
Provide context for your agents
Just like with MCPs, adding descriptive names and notes helps your agents understand when and how to use each API connection effectively.
Keep credentials secure
Keep credentials secure
API keys and tokens are stored securely in Hyper. Never share them in agent instructions or notes. Hyper handles credential injection automatically.
Custom APIs vs. MCPs — Which Should I Use?
| Custom MCP | Custom API | |
|---|---|---|
| Best for | Services that offer an MCP endpoint | Any REST API |
| Setup | Just provide the MCP URL and auth | Provide base URL, auth, and endpoint config |
| Tool discovery | Automatic — MCP servers advertise their tools | Automatic with OpenAPI spec, or manual |
| Protocol | Model Context Protocol (structured) | HTTP REST |
| When to choose | The service has an MCP server | The service only has a REST API |