MCPDocumentation
On this page

Connect n8n

n8n can use the Autonex tools from an AI Agent node through the MCP Client Tool node. Go through Essentials first.

Steps

  1. Create a service key with the scopes the workflow needs (how).
  2. 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 name Authorization and value Bearer mk_xxxxxxxx_….
  3. 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.
  4. Run the workflow as a test and check with whoami that 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, URL https://mcp.autonexhub.es/mcp
  • Headers: Authorization: Bearer …, Content-Type: application/json, Accept: application/json, text/event-stream
  • JSON body:
JSON
{
  "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 call confirm_action.