Loomal

Context7 MCP server in n8n live docs inside your workflows.

Point n8n's MCP Client Tool node at Context7's hosted endpoint and your AI Agent workflows can pull current library documentation mid-run.

n8n handles MCP differently from every IDE on this list: there's no config file. You add an MCP Client Tool node to a workflow, attach it to an AI Agent node, and point it at a server over the network. That last part matters — n8n connects to remote endpoints, so the npx-based stdio setup you'll see in Cursor or Claude Desktop tutorials doesn't transfer.

Context7 works here because Upstash ships a hosted endpoint alongside the open-source package (57.1k stars on GitHub). Your workflow agents get version-accurate library docs without you running anything.

Where Context7 fits in a workflow

Any n8n workflow with an AI Agent node can use it: a code-review automation that checks pull requests against current API docs, a support bot answering questions about your SDK, an internal assistant that drafts integration snippets. The agent calls Context7 to resolve a library and fetch its documentation, then continues the workflow with grounded context.

Because the lookup happens per-execution, the docs are as fresh on run five thousand as on run one — nothing is baked into the workflow.

Configure the MCP Client Tool node

Add an MCP Client Tool node and attach it to your AI Agent node's tool input. Set the endpoint to Context7's hosted URL and pick the HTTP Streamable transport. No credential is required to start; Context7 supports an optional API key for higher rate limits, which you'd add as a header credential.

MCP Client Tool node settings
{
  "node": "MCP Client Tool",
  "parameters": {
    "endpointUrl": "https://mcp.context7.com/mcp",
    "serverTransport": "httpStreamable",
    "authentication": "none"
  }
}

Test the connection

Execute the workflow once with a prompt that forces a documentation lookup. In the execution log, expand the agent step: you should see the Context7 tool listed among available tools and, if the prompt warranted it, an actual call with the fetched docs in the output. The tool list you see should match Context7's live listing on the Loomal marketplace: https://loomal.ai/marketplace/context7.

Troubleshooting in n8n

If the node shows a connection error, the transport setting is suspect first — older guides reference SSE endpoints, and mixing an SSE transport selection with the /mcp streamable URL fails. Match the transport to the endpoint you entered.

If tools connect but the agent never uses them, that's a prompting problem, not a config one: name the tool in the agent's system message ("use Context7 for any library documentation question"). And on self-hosted n8n behind a strict firewall, confirm outbound HTTPS to mcp.context7.com is allowed — there's no restart to do, since each execution opens a fresh connection.

FAQ

How do I install Context7 in n8n?

You don't install anything. Add an MCP Client Tool node to a workflow, attach it to an AI Agent node, set the endpoint to https://mcp.context7.com/mcp with HTTP Streamable transport, and run the workflow.

Can I run Context7 locally with npx for n8n?

Not through the MCP Client Tool node — it speaks to network endpoints, not stdio subprocesses. Use the hosted endpoint, or self-host the open-source server behind an HTTP transport if you need it on your own infrastructure.

Why does the agent connect but never call Context7?

n8n agents only use tools the prompt steers them toward. Add an instruction like "look up library documentation with Context7 before answering code questions" to the agent's system message, then re-run and check the execution log for the tool call.

Do I need an API key?

Not to get started — the endpoint works unauthenticated. Context7 offers an optional key for higher rate limits, worth adding as a header credential if your workflows run at volume; check their docs for current limits.

More MCP servers for n8n.

Browse remote-ready servers your workflows can call today.

Browse the marketplace