Skip to content

Support configuring custom MCP server endpoint (mcp-server-url input) #216

@cogni-ai-ee

Description

@cogni-ai-ee

Summary

Add support for configuring a custom MCP (Model Context Protocol) server endpoint in the AI Inference action, via a new input (e.g. mcp-server-url).

Motivation

Currently, the action only connects to the hardcoded GitHub-hosted MCP server (https://api.githubcopilot.com/mcp/) for tool/skill integration. There is no way to register or connect to a custom/self-hosted MCP server. This limits extensibility for organizations or developers running their own MCP infrastructure, custom tool registries, or private skill catalogs.

Enabling this feature would allow users to:

  • Point the action to a custom MCP server for tool/skill/service integration
  • Use in-house or extended toolsets not available on the official GitHub MCP instance
  • Develop/test new tools before publishing to a wider audience
  • Integrate with alternative MCP implementations or future standard-compliant endpoints

Proposed Solution

  • Add a new optional input to action.yml:
    inputs:
      mcp-server-url:
        description: The MCP server URL to connect to
        required: false
        default: 'https://api.githubcopilot.com/mcp/'
  • Refactor action source (src/mcp.ts, src/main.ts) to:
    • Use mcp-server-url for the MCP endpoint instead of the hardcoded URL
    • Maintain backward compatibility if the input is not provided (default to GitHub MCP)
    • Pass all relevant auth tokens/headers as done for the official server
  • Update documentation and usage examples

Example usage

steps:
  - name: Run AI Inference with Custom MCP
    uses: actions/ai-inference@v2
    with:
      prompt: 'What open PRs have the most review comments?'
      enable-github-mcp: true
      github-mcp-token: ${{ secrets.USER_PAT }}
      mcp-server-url: 'https://mcp.internal.myorg.com/'

Acceptance Criteria

  • A new mcp-server-url input is available and documented
  • Action connects to the specified server for tool discovery and execution
  • Existing workflows using the default remain compatible
  • Tests exercise the custom server input

Related feature area: GitHub MCP, tool/skill integration
Use case: Custom tool registry, private skills, local development
Files: action.yml, src/mcp.ts, src/main.ts, documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions