GitHub MCP
Use this integration to connect securely with a GitHub Model Context Protocol (MCP) server and access its tools in real time.
Utilities · GitHub MCP MCP
Details
| ID | GitHub MCP |
|---|---|
| Provider | Microsoft |
| Category | Utilities |
| From Version | 8.13.0 |
| Docker Image | demisto/mcp:1.0.0.10325753 |
| Supported Modules | Agentix Cloud Runtime Security Cloud Posture Security XSIAM EDR Cortex Cloud |
Enabled Toolsets (21 options)
If no toolsets are selected, GitHub's default toolsets 'context', 'repos', 'issues', 'pull_requests', and 'users' will be enabled.
context
actions
code_security
dependabot
discussions
gists
git
issues
labels
notifications
orgs
projects
pull_requests
repos
secret_protection
security_advisories
stargazers
users
copilot
copilot_spaces
github_support_docs_search
Connection settings
| Parameter | Name | Type | Required | Default |
|---|---|---|---|---|
| Personal Access Token | token |
Credentials | Yes | — |
| Enabled Toolsets | enabled_toolsets |
Multi select | No | — |
| Enable Read-Only Tools | readonly |
Boolean | No | — |
Commands (2)
An MCP server publishes no fixed command set: list-tools and
call-tool are the protocol plumbing, and the tools they reach are
discovered from the remote server when the instance connects. The pack cannot name them ahead of time, so
neither can this page.
-
call-toolCalls a specific tool on the GitHub MCP server with optional input parameters.
-
list-toolsRetrieves a list of available tools in the GitHub MCP server.
import demistomock as demisto from CommonServerPython import * from MCPApiModule import * import asyncio GITHUB_BASE_URL = "https://api.githubcopilot.com/mcp" GITHUB_AUTH_TYPE = AuthMethods.BEARER.value SERVER_NAME = "GitHub MCP" """ MAIN FUNCTION """ async def main() -> None: # pragma: no cover params = demisto.params() args = demisto.args() command = demisto.command() token = params.get("token", {}).get("password") toolsets = argToList(params.get("enabled_toolsets")) readonly = argToBoolean(params.get("readonly") or False) custom_headers = { "X-MCP-Toolsets": ",".join(toolsets), "X-MCP-Readonly": str(readonly).lower(), } demisto.debug(f"Command being called is {command}") try: client = Client( base_url=GITHUB_BASE_URL, auth_type=GITHUB_AUTH_TYPE, token=token, custom_headers=custom_headers, ) demisto.debug(f"Command being called is {command}") if command == "test-module": result = await client.test_connection() return_results(result) elif command == "list-tools": result = await client.list_tools(SERVER_NAME) return_results(result) elif command == "call-tool": result = await client.call_tool(args["name"], args.get("arguments", "")) return_results(result) else: raise NotImplementedError(f"Command {command} is not implemented") except BaseException as eg: root_msg = extract_root_error_message(eg) return_error(f"Failed to execute {command} command.\nError:\n{root_msg}") """ ENTRY POINT """ if __name__ in ("__main__", "__builtin__", "builtins"): asyncio.run(main())