---
title: Set up n8n
description: 'Use Charming tools in an n8n AI Agent workflow.'
sidebar:
  label: n8n
  order: 15
---

## Pair n8n with Charming

n8n's MCP Client Tool needs a bearer token. Start a device pairing from a terminal:

```sh
curl -sS -X POST https://charm.ing/api/pair/start \
  -H 'Content-Type: application/json' \
  -d '{"label":"n8n"}'
```

The response contains a `user_code`, a `device_code`, and `verification_url`. Open [charm.ing/pair](https://charm.ing/pair), enter the user code, and approve access.

Poll for approval with the device code:

```sh
curl -sS -X POST https://charm.ing/api/pair/poll \
  -H 'Content-Type: application/json' \
  -d '{"device_code":"PASTE_DEVICE_CODE"}'
```

If the response says `pending`, wait and poll again. Copy the `chrm_user_*` token from the first `approved` response; Charming shows it once.

## Add the MCP Client Tool

1. Add an **AI Agent** node to your n8n workflow.
2. Attach an **MCP Client Tool** node.
3. Set **SSE Endpoint** to:

   ```text
   https://charm.ing/mcp
   ```

4. Choose **Bearer Auth** and create a credential with the `chrm_user_*` token.
5. Choose the Charming tools the workflow may use.
6. Run the workflow and ask the agent to list your Charming apps.

The workflow receives each finished app's Charming URL. n8n does not draw the app inside the workflow editor.

See [n8n's MCP Client Tool guide](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/) for node and credential options.

Paired tokens expire after 30 days. Pair again to replace one, then revoke the old token on your [Connections settings](https://charm.ing/account/agents).

## Build without the MCP Client Tool

The `chrm_user_*` token above is not limited to MCP. An **HTTP Request** node can call Charming's HTTP API directly with the same `Authorization: Bearer` header, which is the simpler shape when the workflow already knows which app and operation it wants.

The routes are in [Build over the HTTP API](../guides/build-over-the-http-api), with every schema in the [REST API reference](/docs/reference). Both paths reach the same apps in the same account.

## Related

- [AI clients](.)
- [Charming auth](https://usecharming.com/auth.md)

Found a bug or need a feature? [Tell us](/docs/capabilities/feedback) with `submit_feedback` or `POST /app/{id}/feedback`. Your feedback shapes what we build next.
