Skip to main content
Version: 6.1.0

GitHub MCP Server Integration

The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows through natural language interactions.

How N|Solid Console Uses GitHub MCP N|Solid Console integrates with the Remote GitHub MCP Server to automate pull request creation in the AI report workflow. When you generate performance analysis reports using the AI Assistant, the system can automatically create pull requests with recommended code changes directly to your GitHub repositories.

Overview

The GitHub MCP Server integration enables:

  • Automated Pull Requests: Sentinel creates PRs with optimized code after successful benchmarks
  • Seamless Workflow: From optimization to PR creation with minimal manual steps

Prerequisites

Before setting up the GitHub integration, ensure you have:

  • Administrative access to your GitHub organization or repository
  • Access to the N|Solid Console Settings page
  • A PAT created by following the guide provided in the about section of the integration, and in this doc

Creating a Fine-Grained Personal Access Token (PAT)

  1. Navigate to GitHub Settings
  2. Find and access Developer Settings in the left sidebar
  3. Under Person access tokens, click Fine-grained tokens and generate a new token following the practices below

Token Descriptors and Settings

  • Enter a descriptive Token name (e.g., "N|Solid Console MCP")
  • Set an Expiration date (recommended: 90 days or less for security)
  • Optionally add a Description explaining the token's purpose

Resource Owners

  • Choose the account or organization that owns the repositories

If selecting an organization, you may need approval from an admin

Configure Repository Access

  • Select Only select repositories
  • Choose the specific repositories where you want to create pull requests

This follows the principle of least privilege for better security

Set Repository Permissions

The token needs the following repository permissions:

  • Contents: Read and write (to create branches and files)
  • Pull requests: Read and write (to create and manage PRs)
  • Metadata: Read (automatically included)

Generate and Save Token

  • Click Generate token
  • Important: Copy the token immediately and store it securely
  • You won't be able to see it again after leaving the page

Pending Approval

If you selected an organization as the resource owner and the organization requires approval for fine-grained tokens, your token will be marked as pending until reviewed by an organization administrator. Contact your organization admin to approve the token request.

Installing the GitHub MCP Server

To enable Sentinel to create pull requests in your repositories, you need to install the Github MCP Server

Installation Steps

  1. Navigate to Settings in the N|Solid Console
  2. Select MCP Servers under the Integrations dropdown in the left side menu
  3. Locate the GitHub card
  4. Click the Install Github MCP Server button

Github Dropdown

  1. You will be given a model where you can input your PAT

Github Install Build

Verifying Installation

After installation, the GitHub Server card in the Integrations page will display:

  • Installation Status: Shows as "Installed" with a checkmark

Github App Status

Using GitHub Integration with Sentinel

Once the GitHub integration is configured, Sentinel can automatically create pull requests when it identifies successful optimizations.

Optimization Workflow

  1. Start Optimization: Initiate a Sentinel optimization through the AI report button of a CPU Profile
  2. Analysis & Benchmarking: Sentinel analyzes your code and generates optimizations
  3. Benchmark Results: Sentinel will provide a detailed report based on the CPU profile, and will provide back the optimized code if it performs better than the original version

Sentinel Report

  1. PR Prompt: After successfully creating and benchmarking an optimized function, Sentinel will display the functions ready for PR and ask: "Would you like to create a Pull Request with these optimizations?"

  2. Confirm PR Creation: Click CREATE PULL REQUEST to proceed to the org, repo and branch selection window

  3. ORG Selection: The integration will provide a suggested org(s) to select, a user can also input a specific org in the dialogue box

Org Select

  1. REPO Selection: Next it will display suggested repositories to work in that can also be specified with the dialogue box

Repo Select

  1. Branch Selection: You will then be asked to select the branch that Sentinel should use for creating its new pull request from

Branch Select

  1. Summary: You will then be shown the exact information you inputted for the pull request from the previous 3 steps before confirming the new pull request creation

Summary

What Happens Next

When you confirm PR creation, Sentinel will:

  1. Create a new branch in your repository
  2. Commit the optimized code with a descriptive message
  3. Open a pull request with:
    • Performance benchmark results
    • Details about the optimization

Example PR

  1. Display the PR URL in the Console for easy access

PR Success

First-Time Setup During Optimization

If you haven't installed the GitHub MCP Server when Sentinel prompts you to create a PR:

  1. Sentinel will display a message: "GitHub MCP Server Required"
  2. Click the VIEW MCP SERVERS PAGE link
  3. Complete the installation steps (see Installing the GitHub MCP Server)
  4. Return to the Console and confirm PR creation again

Server Required

Skipping PR Creation

If you prefer not to create a pull request for a particular optimization:

  1. Click Skip PR when prompted
  2. The optimization report will be saved
  3. You can manually apply the changes later if desired

Managing Your GitHub Integration

Viewing Installation Details

To view your current GitHub MCP Server integration status:

  1. Go to Settings → MCP Integrations
  2. Locate the GitHub MCP Server card
  3. Review:
    • Installation status
    • Masked GitHub PAT under configurations

Updating Configuration

To change your Personal Access Token

  1. Click Configure on the GitHub MCP Server card
  2. Update your masked PAT
  3. Click Save

Removing the Integration

To disconnect the GitHub integration:

  1. In the GitHub App card, navigate to the Enabled dropdown
  2. Click Disabled to disable the integration or Uninstall to uninstall the integration
  3. Remove your PAT from the Configure page and delete the GitHub Token

Permissions and Security

The NodeSource Sentinel GitHub MCP Server requires minimal permissions through your PAT:

  • Contents: Read and write access to create branches and commit code
  • Pull Requests: Write access to open pull requests

Security Features

  • Short-lived Tokens: Authentication tokens expire within minutes
  • Scoped Access: The integration only accesses repositories you explicitly grant through your token
  • Encrypted Storage: All credentials are encrypted using AWS KMS
  • Audit Trail: All GitHub operations are logged for security review

Troubleshooting

Repository Not Listed

If your target repository doesn't appear in the repository list you can manually input the repository and branch names as shown in Optimization Workflow

Best Practices

  • Review PRs Promptly: Sentinel-generated PRs should be reviewed and tested before merging
  • Test Optimizations: Always run tests on optimized code before merging to production

Additional Resources

For more information about the GitHub MCP Server, see:

For more information about Github Personal Access Tokens, see:

For more information about Sentinel optimizations and AI-powered code improvements, see:

NodeSource Support