Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_source_control_status

Check Git repository status in n8n workflows to monitor branch, remote sync, and merge conflicts for automation management.

Instructions

Get the current source control (Git) status.

Returns:

  • branchName: Current branch

  • connected: Whether Git is connected

  • ahead: Commits ahead of remote

  • behind: Commits behind remote

  • conflicts: Any merge conflicts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'n8n_source_control_status' tool by fetching the status from the n8n API.
    async () => {
      const status = await get<N8nSourceControlStatus>('/source-control/status');
      
      const text = [
        `**Source Control Status**`,
        `- Branch: ${status.branchName}`,
        `- Connected: ${status.connected ? '✅ Yes' : '❌ No'}`,
        `- Commits Ahead: ${status.ahead}`,
        `- Commits Behind: ${status.behind}`,
        status.conflicts?.length ? `- Conflicts: ${status.conflicts.join(', ')}` : ''
      ].filter(Boolean).join('\n');
      
      return {
        content: [{ type: 'text', text }],
        structuredContent: status
      };
    }
  • Registration of the 'n8n_source_control_status' tool within the server instance.
      // ============ Get Source Control Status ============
      server.registerTool(
        'n8n_source_control_status',
        {
          title: 'Get Source Control Status',
          description: `Get the current source control (Git) status.
    
    Returns:
      - branchName: Current branch
      - connected: Whether Git is connected
      - ahead: Commits ahead of remote
      - behind: Commits behind remote
      - conflicts: Any merge conflicts`,
          inputSchema: EmptySchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DrBalls/n8n-mcp-server-v2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server