Loomal

GitHub MCP server in n8n a node, not a config file.

n8n connects to MCP servers through the MCP Client Tool node. Point it at GitHub's hosted endpoint and any AI Agent node in your workflow can manage repos, issues, and PRs.

n8n does MCP differently from code editors: there is no JSON file to edit. You drop an MCP Client Tool node into a workflow, give it an endpoint and credentials in the node UI, and attach it to an AI Agent node as a tool source.

GitHub's official MCP server (github/github-mcp-server, 30.6k stars) is hosted at a public HTTPS endpoint, which is exactly the shape n8n's MCP client expects — no subprocess, no container, just URL plus auth.

Where GitHub fits in an n8n workflow

Think in triggers and agents. A schedule trigger plus an AI Agent with GitHub tools gives you a nightly issue-triage bot; a webhook trigger gives you an agent that responds to events by opening or updating PRs. The MCP Client Tool node is what hands the agent its GitHub abilities — repo search, issue CRUD, pull request operations, workflow-run reads.

You can review everything the server exposes on its live Loomal listing at https://loomal.ai/marketplace/github, which helps when deciding whether to include all tools or a subset in the node.

Configure the MCP Client Tool node

Add the MCP Client Tool node to your workflow (it appears under tool nodes once you're building with an AI Agent). The settings that matter:

MCP Client Tool node settings
Endpoint:          https://api.githubcopilot.com/mcp/
Server Transport:  HTTP Streamable
Authentication:    Header Auth
  Credential:      Name  = Authorization
                   Value = Bearer ghp_YOUR_GITHUB_PAT
Tools to Include:  All  (or select specific tools)

Create the credential once, reuse everywhere

The PAT goes into an n8n Header Auth credential, not into the node itself — n8n encrypts credentials and lets every workflow reference the same one. Set the header name to Authorization and the value to Bearer followed by your token.

Use a fine-grained PAT scoped to the repos your automations touch. Workflows run unattended, so treat the token like any production secret: minimal scope, rotation schedule, separate tokens for separate automation tiers if you run many workflows.

Attach it to an agent and run

Connect the MCP Client Tool node to the AI Agent node's tool input. When the workflow executes, the agent fetches the GitHub tool list at runtime and decides per-step which to call. Run a manual execution with a prompt like "summarize open issues in owner/repo" and watch the node's execution data — you'll see each tool call and its raw response.

If the tool list is long, use Tools to Include to whitelist just what the workflow needs; smaller tool menus make the agent's choices more reliable.

Troubleshooting in n8n

Errors show up on the node, not in a log file. A red node with a 401 means the credential is wrong — usually a missing Bearer prefix in the header value. A timeout or connection error points at the endpoint URL or, on self-hosted n8n, at egress rules blocking api.githubcopilot.com.

If the agent runs but never calls GitHub tools, check that the MCP Client Tool node is actually wired to the agent's tool port (easy to miss on a crowded canvas) and that the workflow was saved and re-executed after wiring. n8n picks up node changes per execution, so there's no restart — but stale browser tabs can show an old canvas.

FAQ

How do I connect GitHub to n8n over MCP?

Add an MCP Client Tool node, set the endpoint to https://api.githubcopilot.com/mcp/ with HTTP Streamable transport, attach a Header Auth credential (Authorization: Bearer your-PAT), and wire the node into an AI Agent node's tool input. The agent then calls GitHub tools during execution.

Is there a config file to edit in n8n?

No. n8n stores MCP configuration inside the workflow itself, in the MCP Client Tool node's parameters, with the token held in n8n's encrypted credentials store. Everything is set through the node UI rather than a JSON or YAML file.

Does this work on n8n Cloud and self-hosted?

Yes — the GitHub server is a public HTTPS endpoint, so n8n Cloud reaches it directly. On self-hosted instances, confirm outbound HTTPS to api.githubcopilot.com is allowed; locked-down networks are the main cause of connection failures.

Why is my agent ignoring the GitHub tools?

Most often the MCP Client Tool node isn't connected to the agent's tool input, or the tool list is so large the model picks poorly. Verify the wiring, then narrow Tools to Include to the handful the workflow actually needs.

More MCP servers for n8n.

Browse endpoints with live tool lists on the Loomal marketplace.

Browse the marketplace