Connect n8n
n8n can use the Autonex tools from an AI Agent node through the MCP Client Tool node. Go through Essentials first.
Steps
- Create a service key with the scopes the workflow needs (how).
- In n8n, create a Bearer Auth credential with the key (
mk_xxxxxxxx_…) as the token. If your version doesn't have it, use Header Auth with nameAuthorizationand valueBearer mk_xxxxxxxx_…. - In your workflow, add an AI Agent node and, as a tool, an MCP Client Tool:
- Endpoint:
https://mcp.autonexhub.es/mcp - Server Transport: HTTP Streamable
- Authentication: the credential from step 2
- Tools to Include: Selected, ticking only the tools the agent needs.
- Endpoint:
- Run the workflow as a test and check with
whoamithat the organization is the right one.
Calling without an agent (HTTP Request node)
For a single call without an AI model, you can use an HTTP Request node:
- Method
POST, URLhttps://mcp.autonexhub.es/mcp - Headers:
Authorization: Bearer …,Content-Type: application/json,Accept: application/json, text/event-stream - JSON body:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "usage", "arguments": {} }
}The response carries the data in result.structuredContent and a summary in result.content[0].text.
Tips
- Keep the key only in n8n credentials, never written into the workflow.
- For writes from n8n, the workflow should call the preview (
*_preview), check the result (or ask a person to approve, e.g. by email or Slack) and then callconfirm_action.