Appa Tools documentation for MCP Studio, including setup, guides, concepts, and API-related reference content.

Skip to main content

n8n integration

AI Context by MCP Studio is the MCP Studio community node for n8n. It gives the AI in your workflows persistent context: point it at your documentation, code repositories, PDFs, written specs, runbooks, or another MCP server, and it returns a live MCP endpoint that agents consult before they act.

AudienceAnyone running AI agents in n8n, plus automation builders, engineering teams, and developer-experience teams
PrerequisitesAn MCP Studio account, an API key, and n8n 1.x (self-hosted, or Cloud for verified community nodes)

Why use it

An agent is only as good as what it knows when it runs. Without grounding it answers from training data plus whatever happens to be in the prompt, which is how the same agent ends up confidently wrong about your own API, your own conventions, and your own processes.

Persistent context is the alternative. You publish your sources once, and the agent reads them on every run instead of being reminded in each prompt. In n8n this matters more than anywhere else, because an agent inside a workflow acts on what it retrieves — grounding it changes what it does, not just what it says.

The node makes that context something you automate: create a server when a project starts, add and remove sources as things change, adjust which tools it exposes, refresh it the moment content ships, read its metrics, and hand the endpoint to whatever consumes it.

What you can connect

A source is anything an agent should read before answering. Documentation is the obvious one; it is not the most valuable one.

SourceWhy teams connect it
Code repositoriesThe agent writes code matching your real conventions and helpers instead of inventing plausible ones. Public repos work immediately; private repos need a GitHub account linked once in the dashboard
Written specs and runbooksA page describing how something should be done becomes an instruction the agent follows every time, not a prompt someone has to remember to paste
PDFsContracts, policies, compliance documents, vendor manuals, exported reports — content that usually lives outside anything searchable
Documentation sitesProduct docs, internal wikis, help centres
API referencesThe agent gets your parameters and response shapes right rather than approximating them
Another MCP serverFederate an existing MCP endpoint in as a source, so several context sources sit behind one URL and one credential
Any websiteChangelogs, status pages, partner documentation, public research

They mix freely. One server can hold a docs site, two repositories, and a PDF, and answer across all of them in a single query.

Patterns worth building

Agents that follow your conventions. Write down how you want work done — how workflows should be structured, which internal tools to call, what to never do — and connect it alongside the repositories that demonstrate it. Every AI Agent node pointed at the endpoint now works from your rules rather than generic best practice.

Internal knowledge your automations act on. Connect the runbooks, policies, and PDFs your team works from, then let a workflow answer questions, triage tickets, or draft replies against them.

A docs MCP for your product. Publish an endpoint alongside your documentation so your users' AI tools answer accurately about your product, and refresh it from CI when you ship.

Context per client or per project. Provision one server per engagement as a repeatable workflow step instead of a manual setup each time.

Observability you can route on. Read a server's metrics in a workflow and act on them: post weekly numbers to Slack, email a client their usage, or alert when the success rate drops.

How it relates to n8n's MCP Client

They sit on opposite ends of the same pipe, and most workflows end up using both.

AI Context by MCP StudioMCP Client tool
PurposeBuilds and maintains the MCP serverConsumes an MCP server
Typical useCreate the context server, refresh it when content changesLet an AI Agent query that context
RunsOn a schedule, webhook, or manual triggerInside an agent's reasoning loop

A common pairing: this node creates the server and returns its URL, and an MCP Client tool attached to an AI Agent node queries it.

Install

In n8n, open Settings > Community nodes > Install and enter n8n-nodes-mcp-studio. On self-hosted n8n you can instead run npm install n8n-nodes-mcp-studio in ~/.n8n and restart. The node appears as AI Context by MCP Studio.

Create an API key

  1. In MCP Studio, go to Account > API Keys.
  2. Create a key and set Used from to n8n.
  3. Copy it immediately. Keys start with msk_live_ and are shown exactly once — only a hash is stored, so a lost key can be replaced but never recovered.
  4. In n8n, create an AI Context by MCP Studio API credential, paste the key, and leave Base URL at its default.
  5. Click Test. Success returns your current plan and usage.

A key acts on your account with your plan's limits. Revoke it from the same screen if it leaks.

Operations

ResourceOperationWhat it does
ServerCreateCreates a server from one or more sources, queues indexing, returns the endpoint URL and a client config snippet
ServerGetReturns a server with per-source indexing progress, the endpoint URL, and the config snippet
ServerGet ManyLists every server on the account
ServerRefreshQueues a re-index, for the whole server or a single source
ServerDeleteSoft-deletes a server, restorable for 7 days
SourceAddAdds a source to an existing server and queues indexing
SourceRemoveRemoves a source and its indexed content, by source ID or URL
ToolGet ManyReturns the tools a server exposes today, plus the full catalogue it can choose from
ToolAddEnables more tools. Tools already enabled are left alone
ToolRemoveDisables tools. At least 3 have to remain
ToolReplaceSets the exact tool list, whatever was enabled before
AnalyticsGetReturns one server's request metrics
AccountGet UsageReturns plan, request usage, and server and source limits
AccountGet EntitlementsReturns trial state, analytics tier, and per-server source limits

Every operation that takes a server accepts either its ID or its slug.

Changing tools after creation

You pick 3 to 10 tools when you create a server, and the Tool resource changes that afterwards without recreating anything. A change reaches connected agents on their next request: no re-index, and the endpoint URL does not change.

Add and Remove are both no-ops when there is nothing to do, so a workflow that enforces a standard tool set can run on a schedule without special-casing servers that already comply. Removing below 3 tools is refused and leaves the selection untouched.

See the tools reference for what each tool does.

Reading metrics in a workflow

Analytics > Get returns the metrics included on every plan, and returns the same fields at every plan level — so a workflow that routes on successRate keeps working whatever happens to the subscription.

FieldWhat it tells you
totalCalls, failedCalls, successRateWhether agents are getting answers
avgDurationMsHow fast they get them
activeSources, citedSourcesHow many of your sources are actually being quoted. A source that is never cited is either badly targeted or badly written
toolUsageWhich tools agents reach for, and how often each succeeds
sourceUsageWhich sources answer the most questions
clientUsageWhich clients are connecting
callsOverTimeDaily volume and errors for the last 30 days

Per-request detail — the exact passage returned for a given question, content gaps, source grades, and forecasts — is part of Action and Predictive analytics and is read on the dashboard rather than through the node.

A first workflow

The package ships an importable template, workflows/mcp-studio-fast-start.json, that runs the whole path: read the plan, branch if the account is at its server limit, create a server, wait, then read back the endpoint and progress.

Built by hand it is four steps:

  1. Account > Get Usage — confirm there is room for another server.
  2. Server > Create — a name, one or more sources, and between 3 and 10 tools.
  3. Wait, then Server > Get — poll until every source reports crawlStatus: "complete".
  4. Use the returned url, or paste configSnippet into an MCP client.

What to expect

Create and Refresh return when the work is queued, not when it finishes. See Indexing for timings, status meanings, and error reasons. The short version: poll Server > Get and watch each source's crawlStatus move pendingcrawlingcomplete, with indexing.pagesIndexed climbing while it runs.

The endpoint is queryable before indexing completes — it simply has less content to search.

Tool changes are immediate; content changes take as long as indexing takes.

Usage counts MCP requests, not node executions. Running the node does not consume request quota; querying the finished server does.

Plan limits in a workflow

Rather than letting a workflow discover a limit by failing, read it. Account > Get Usage returns serversUsed, serversLimit, mcpCallsUsed, mcpCallsLimit, and sourcesLimitPerServer, so an IF node can branch, alert, or queue for later. See Billing for what each tier includes.

The same response carries an upgradeUrl, as does every limit error, so a workflow that detects a cap can include a working link in whatever it sends rather than telling someone to go and find Billing. Source limits also return a purchaseUrl that goes straight to checkout. On the MCP call limit, which is a JSON-RPC error, the link is on error.data.upgradeUrl.

Private GitHub repositories

A private repository needs a linked GitHub account, and that link is a browser OAuth step that cannot happen over an API. Link it once in the dashboard, then add the source. Without it, adding a private repository returns 422 with auth_required, because there is no token to read the repository with.

Common errors

ResponseMeaning
401Key is wrong, truncated on paste, or revoked
400 Select between 3 and 10 toolsTool count is outside the allowed range
400 An MCP server needs at least 3 toolsA Tool > Remove would drop the server below the minimum
400 Unknown tool nameA tool name is not in the catalogue; the response lists the valid names
402 source_limitMore sources than the tier allows; the message states the limit
403 enterprise_limitServer count cap reached
404 Server not foundWrong ID or slug, or the server belongs to another account
409 Source already existsThat URL is already on the server
422 auth_requiredPrivate GitHub repo with no linked GitHub account
429Rate limited. Server creation is capped at 10 per hour

Enable Always Output Data on a node to see the full error body rather than only the status code.