Custom Tools (API & MCP)
Integrate your own REST APIs and MCP servers as tools that agents can access through Agentic Fabriq.
Overview
Agentic Fabriq supports two types of custom tool integrations beyond the built-in connectors (Gmail, Slack, etc.):
- OpenAPI Tools: Import an OpenAPI/Swagger specification to create tools from REST API endpoints
- MCP Server Tools: Connect to an external MCP server and discover its tools automatically
Both types follow the same zero-trust permission model: actions are denied by default until an admin explicitly grants them.
Tool Types
| Feature | OpenAPI | MCP Server |
|---|---|---|
| Specification | OpenAPI 3.x / Swagger 2.0 | MCP Protocol |
| Discovery | Import from URL or file upload | Auto-discover from server |
| Authentication | OAuth 2.0, API Key, Bearer Token | OAuth 2.0 (RFC 9728/8414), API Key, Bearer Token |
| User Connection | OAuth flow per user | OAuth flow per user (if server supports it) |
| Execution | HTTP request to API endpoint | MCP call to server |
Admin Setup — OpenAPI Tools
1. Create the Tool
- Navigate to Admin Console > Custom Tools > "Add Integration"
- Select type: OpenAPI
- Enter a name and slug (auto-generated from name)
- Optionally select a Network Connector if the API is on a private network
2. Import the Specification
- Upload a JSON/YAML file or enter the spec URL
- Preview parsed actions and scopes before importing
- Click "Import" to create actions and scopes from the spec
3. Review Actions and Scopes
- Each API endpoint becomes an action with a detected risk level (
read,write,delete,external) - Risk levels can be overridden by the admin
- Mapping status: mapped (admin verified), inferred (auto-detected), unverified (needs review)
4. Configure OAuth Credentials
- Set auth type (OAuth 2.0, API Key, Bearer Token)
- Enter authorize URL, token URL, client ID, client secret
- Configure scope separator and token placement
Note: Credentials are stored securely in the vault and are never exposed in API responses.
5. Assign Permissions
- Default: all actions are denied for all users
- Grant per-user permissions: Custom Tools > tool detail > Members tab
- Or create scope groups and assign users to groups
- The scope pool defines which OAuth scopes are requested during user connection
6. Mark Setup Complete
Once configured, the tool becomes visible to users.
Admin Setup — MCP Server Tools
1. Create the Tool
- Navigate to Admin Console > Custom Tools > "Add Integration"
- Select type: MCP Server
- Enter a name, slug, and the MCP server URL
2. Discover Authentication Requirements
Click "Discover Auth" to probe the server for RFC 9728/8414 OAuth metadata. If the server requires OAuth, enter client credentials.
3. Admin Connection
Complete the "Admin Connect" step to establish your own connection to the MCP server. This allows Agentic Fabriq to discover tools from the server.
4. Discover Tools
- Click "Discover Tools" to fetch the list of available tools from the MCP server
- Each discovered tool becomes an action
- Bulk enable/disable which tools are available to users
5. Assign Permissions
Same as OpenAPI: all actions are denied by default. Grant per-user permissions or use scope groups.
6. Mark Setup Complete
Once configured, the tool becomes visible to users.
User Workflow
- Browse available custom tools in the dashboard (My Tools section)
- Click "Connect" to initiate OAuth with the external service
- Grant the requested scopes
- Once connected, agents can invoke the custom tool's actions via MCP
- View connections and manage scopes in My Tools > Custom Tool Connections
Zero-Trust Permission Model
Important: Custom tools use a zero-trust model. By default, no user can execute any action. Admins must explicitly grant permissions.
Permission layers:
- Admin action limits: Which actions a user is allowed to execute (toggle per action per user)
- Scope groups: Group actions and scopes together, then assign users to groups
- User OAuth scopes: What the user actually granted during OAuth
- Effective permission: Intersection of all three layers
The scope pool defines the default set of scopes requested if an action doesn't specify explicit scopes.
Execution Failure Diagnostics
- When a user's tool call fails with
403(insufficient scope), it is recorded as an execution failure - Admins can view failures: Custom Tools > tool detail > Diagnostics tab
- Review the failure (which action, which user, what scope was missing)
- Resolve by granting the missing scope or updating the action's scope mapping
- Mark failures as resolved once addressed
Network Connectors
For APIs on private networks (not publicly accessible), use a Network Connector.
- Network connectors create a secure tunnel between Agentic Fabriq and your private infrastructure
- Select the network connector when creating the custom tool
- All API requests will be routed through the tunnel
Need help?
Our team is here to help you get started.