[Integrations](https://spiral.ai/integrations) › [n8n](https://spiral.ai/integrations/n8n) › [LongCat 2.0](https://spiral.ai/integrations/n8n/longcat-2-0)

# How to Use LongCat 2.0 in n8n

LongCat 2.0 is built for understanding code, editing repositories, and completing tasks across multiple steps. Its 1M-token context supports work that combines a large codebase with migration docs.

|  |  |
| --- | --- |
| Model | LongCat 2.0 |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with LongCat 2.0 in n8n

- Every weekday, use LongCat 2.0 to review new issue descriptions available through your connected tools. Identify likely duplicates, summarize reproduction steps, and rank issues by documented user impact.
- Each morning, use LongCat 2.0 to compare the latest service report with the previous seven reports. Highlight changes that warrant investigation, cite the supporting figures, and separate observations from possible explanations.
- Every Friday, use LongCat 2.0 to review the published release notes for our tracked dependencies. Summarize breaking changes and draft a migration checklist with links to the relevant documentation.
- Each week, use LongCat 2.0 to research updates on the technical topics in our watchlist. Produce a brief with source links, conflicting claims, and questions that remain unanswered.
- Every evening, use LongCat 2.0 to review today's failed automation runs through your connected tools. Compare error messages, identify recurring patterns, and prepare a short investigation queue with evidence for each item.

## How to set up LongCat 2.0 in n8n

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send n8n this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Create a key**: Create a key under API keys in the console.

2. **Add an MCP Client node**: In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

```text
https://api.spiral.ai/mcp
```

3. **Pick a tool**: The node lists Spiral's tools. In an MCP Client node pick one, such as `run`, and give it its arguments:

```json
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

4. **Run LongCat 2.0 in a workflow step**: Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds LongCat 2.0, prices it and runs it each time the step fires.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run LongCat 2.0**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openrouter",
    "model": "meituan/longcat-2.0",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: n8n finds LongCat 2.0 on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/n8n

## LongCat 2.0 tools and prices

- [Meituan: LongCat 2.0](https://spiral.ai/tools/openrouter/meituan/longcat-2.0) (OpenRouter): Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |

## What can you do with LongCat 2.0 in n8n?

LongCat 2.0 can support recurring reviews that compare new information with earlier results and identify follow-up work. Define the evidence to inspect, the reporting threshold, and the format of each report.

### Migrate a plugin to a new SDK

Provide the current implementation and migration documentation. Ask for an architecture map, required changes, and checks that existing behavior still works.

### Fix a bug across several modules

Trace a reported failure through the relevant code, identify the cause, and request a focused patch with a regression test.

### Explain an unfamiliar codebase

Map entry points, dependencies, and the path a request takes through the code. Ask for references to the implementation behind each explanation.

### Build a small web prototype

Turn a written specification into application code. Define the screens, interactions, and acceptance checks before requesting implementation.

### Produce a research brief

Have an agent gather evidence across several sources, reconcile conflicting claims, and produce a brief with citations and unresolved questions.

### Work through a technical analysis

Supply assumptions, equations, and constraints. Request a solution with units, intermediate results, and a check against the original requirements.

### Review recurring operational reports

Compare the current report with earlier results, identify changes that deserve investigation, and prepare a short evidence-based review.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All n8n guides](https://spiral.ai/integrations/n8n)

## LongCat 2.0 in other agents

- [Amp](https://spiral.ai/integrations/amp/longcat-2-0)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/longcat-2-0)
- [Claude](https://spiral.ai/integrations/claude-desktop/longcat-2-0)
- [Claude Code](https://spiral.ai/integrations/claude-code/longcat-2-0)
- [Cline](https://spiral.ai/integrations/cline/longcat-2-0)
- [Codex](https://spiral.ai/integrations/codex/longcat-2-0)
- [Cursor](https://spiral.ai/integrations/cursor/longcat-2-0)
- [Devin](https://spiral.ai/integrations/devin/longcat-2-0)
- [dots](https://spiral.ai/integrations/dots/longcat-2-0)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/longcat-2-0)
- [Gemini](https://spiral.ai/integrations/gemini/longcat-2-0)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/longcat-2-0)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/longcat-2-0)
- [goose](https://spiral.ai/integrations/goose/longcat-2-0)
- [Grok](https://spiral.ai/integrations/grok/longcat-2-0)
- [Grok Build](https://spiral.ai/integrations/grok-build/longcat-2-0)
- [Hermes](https://spiral.ai/integrations/hermes/longcat-2-0)
- [Instinct](https://spiral.ai/integrations/instinct/longcat-2-0)
- [Manus](https://spiral.ai/integrations/manus/longcat-2-0)
- [Muse](https://spiral.ai/integrations/muse/longcat-2-0)
- [Muse Code](https://spiral.ai/integrations/muse-code/longcat-2-0)
- [Notion](https://spiral.ai/integrations/notion/longcat-2-0)
- [OpenClaw](https://spiral.ai/integrations/openclaw/longcat-2-0)
- [opencode](https://spiral.ai/integrations/opencode/longcat-2-0)
- [Perplexity](https://spiral.ai/integrations/perplexity/longcat-2-0)
- [Raycast](https://spiral.ai/integrations/raycast/longcat-2-0)
- [VS Code](https://spiral.ai/integrations/vscode/longcat-2-0)
- [Windsurf](https://spiral.ai/integrations/windsurf/longcat-2-0)
- [Zapier](https://spiral.ai/integrations/zapier/longcat-2-0)

## More n8n guides

- [Llama Guard 4 12B](https://spiral.ai/integrations/n8n/llama-guard-4-12b)
- [Magnum v4 72B](https://spiral.ai/integrations/n8n/magnum-v4-72b)
- [Llama 4 Scout](https://spiral.ai/integrations/n8n/llama-4-scout)
- [Mi:dm K 3.0 Pro](https://spiral.ai/integrations/n8n/mi-dm-k-3-0-pro)
- [Llama 4 Maverick](https://spiral.ai/integrations/n8n/llama-4-maverick)
- [MiMo V2.6 Pro](https://spiral.ai/integrations/n8n/mimo-v2-6-pro)

## Questions about LongCat 2.0 in n8n

**Can n8n use LongCat 2.0?**

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run LongCat 2.0 like any built-in tool.

**How much does LongCat 2.0 cost in n8n?**

Up to $0.006404 per run at the default inputs. $0.39 per 1M input tokens, $1.56 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your n8n plan is separate.

**Do I need an OpenRouter account to use LongCat 2.0 in n8n?**

You need no OpenRouter account. n8n uses one Spiral API key for every tool, and Spiral runs LongCat 2.0 on its own OpenRouter account.

**How long does it take to set up LongCat 2.0 in n8n?**

About two minutes: create a key, then add an MCP Client node, then pick a tool.

**Does n8n wait while LongCat 2.0 runs?**

LongCat 2.0 runs in the background. n8n starts the run, checks on it and gives you the text, json when it's ready.

**What is LongCat 2.0 best suited for?**

Code understanding, repository edits, and tasks that require several steps. Give it a concrete result to produce, such as a tested patch or a migration plan.

**How much context can LongCat 2.0 handle?**

Meituan documents a 1M-token context. That makes it useful for tasks that draw on substantial reference material, such as code and migration documentation together.

**How long can a LongCat 2.0 response be?**

Meituan's API documentation specifies a maximum generation length of 131,072 tokens. The 1M-token context should not be read as a promise of a million-token response.

**When should I use thinking with LongCat 2.0?**

Use thinking for difficult debugging or analytical tasks. The maker describes turning thinking off as more token efficient and recommends retaining reasoning content when using its thinking template.

**Does LongCat 2.0 perform equally well in every language?**

The model card explicitly warns that performance varies across languages. Check representative examples in the language you plan to use before assigning recurring work.

