← All N8N workflows
Developer toolsAggregateExecute Workflow TriggerGithubHTTP RequestMcp Trigger

Always Authenticate Your Server!

Configured with Aggregate, Execute Workflow Trigger, Github, HTTP Request, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen Executed byAnother WorkflowExecute Workflow TriggerRoutingOperationSwitchTriggerGithub MCP ServerMcp TriggerSubworkflowGet Latest IssuesTool WorkflowSubworkflowAdd Issue CommentTool WorkflowTransformSimplify IssuesEdit FieldsTransformAggregate ResultsAggregateSubworkflowGet Issue CommentsTool WorkflowWeb / APIGet CommentsHTTP RequestTransformSimplify CommentsEdit FieldsTransformAggregate CommentsAggregateIntegrationGet Many IssuesGithubIntegrationGet Single IssueGithubIntegrationCreate CommentGithubTransformGet ResponseEdit Fields

Node categories in this workflow

  • Trigger
  • Routing
  • Subworkflow
  • Transform
  • Web / API
  • Integration

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When Executed by Another WorkflowTriggerExecute Workflow TriggerSee node parameters
OperationRoutingSwitchSee node parameters
Github MCP ServerTriggerMcp TriggerSee node parameters
Get Latest IssuesSubworkflowTool WorkflowSee node parameters
Add Issue CommentSubworkflowTool WorkflowSee node parameters
Simplify IssuesTransformEdit FieldsSee node parameters
Aggregate ResultsTransformAggregateSee node parameters
Get Issue CommentsSubworkflowTool WorkflowSee node parameters
Get CommentsWeb / APIHTTP RequestSee node parameters
Simplify CommentsTransformEdit FieldsSee node parameters
Aggregate CommentsTransformAggregateSee node parameters
Get Many IssuesIntegrationGithubrepository
Get Single IssueIntegrationGithubget
Create CommentIntegrationGithubcreateComment
Get ResponseTransformEdit FieldsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • githubApi

Workflow notes

1. Set up an MCP Server Trigger

1. Set up an MCP Server Trigger

Read more about the MCP Server Trigger

2. Build Simple Support Tools with Github Node

2. Build Simple Support Tools with Github Node

Read more about the Github Node

Whilst it may be easier to just let the Agent provide the full raw SQL statement, it may expose you or your organisation to a real security risk where in the worst case, data may be unknowingly leaked or deleted.

Forcing the agent to provide only the parameters of the query means we can guard somewhat against this risk and also allows use of query parameters as best practice against SQL injection attacks.

Always Authenticate Your Server!

Always Authenticate Your Server!

Before going to production, it's always advised to enable authentication on your MCP server trigger.

Try It Out!

Try It Out!

This n8n demonstrates how to build your own Github MCP server to personalise it to your organisation's repositories, issues and pull requests.

This n8n implementation, though not as fully featured as the official MCP server offered by Github, allows you to control precisely what access and/or functionality is granted to users which can make MCP use simpler and in some cases, more secure. The use-case in this template is to simply view and comment on issues within a specific repository but can be extended to meet the needs of your team.

This MCP example is based off an official MCP reference implementation which can be found here https://github.com/modelcontextprotocol/servers/tree/main/src/github

How it works

  • A MCP server trigger is used and connected to 3 custom workflow tools. We're using custom workflow tools as there is quite a few nodes required for each task.
  • Behind these tools are regular Github nodes although preconfigured with credentials and targeted repository.
  • The "Get Issue Comments" and "Create Issue Comment" tools depend on obtaining an Issue Number first. The agent should call the "Get Latest Issues" tool for this.

How to use

  • This Github MCP server allows any compatible MCP client to view and comment on Github Issues. You will need to have a Github account and repository access available before you can use this server.
  • Connect your MCP client by following the n8n guidelines here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop
  • Try the following queries in your MCP client:
    • "Can you get me the latest issues about MCP?"
    • "What is the current progress on Issue 12345?"
    • "Please can you add a comment to Issue 12345 that they should try installing the latest version and see if that works?"

Requirements

  • Github for account and repository access. The repository need not be your own but you'll still need to ensure you have the correct permissions.
  • MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download

Customising this workflow

  • Extend this template to interactive with pull requests or workflows within your own company's Github repositories. Alternatively, pull in metrics and generate reports for programme managers.
  • Remember to set the MCP server to require credentials before going to production and sharing this MCP server with others!
Always Authenticate Your Server!

Always Authenticate Your Server!

Purpose and structure

This folder contains the Always Authenticate Your Server! workflow. Its executable nodes use aggregate, executeWorkflowTrigger, github, httpRequest, mcpTrigger, set, switch, toolWorkflow. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When Executed by Another Workflow, Github MCP Server

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Github/0876_GitHub_Aggregate_Create_Webhook.json MIT; preserve source notices.

More in Developer tools