GitHub Connector
Executable GitHub connector for repository search, issues, pull requests, and approved issue creation.
Credential setup
bearerUse a fine-grained token restricted to the repositories and read permissions these tools need.
Setup docs: https://github.com/settings/tokens
After adding this connector, attach the credential on the server page, then run astrail tools list.
Hosted MCP endpoint
/api/mcp/preset-githubPrivate servers require an Astrail API key in the Authorization header.
MCP client snippets
ConnectClaude Desktop config
{
"mcpServers": {
"github-connector": {
"url": "/api/mcp/preset-github"
}
}
}cURL initialize
curl -sS -X POST "/api/mcp/preset-github" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'cURL tools/list
curl -sS -X POST "/api/mcp/preset-github" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'cURL tools/call
curl -sS -X POST "/api/mcp/preset-github" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"github_search_repositories","arguments":{"q":"example","sort":"example","order":"example","per_page":"example"}}}'Runtime behavior
healthynot_checkedsafe_rest_executionnot recordednot recordednot recordednonestructured fallbackstandardauth_required / oauth_requiredmapping_requiredAstrail does not evaluate generated TypeScript inside Next.js. Hosted calls are routed through stored tool metadata and endpoint maps.
Tools
10github_search_repositoriesSearch GitHub repositories by query.
github_list_issuesList issues for a GitHub repository.
github_get_issueRetrieve a GitHub issue by number.
github_list_pull_requestsList pull requests for a GitHub repository.
github_get_pull_requestGet a GitHub pull request and its review state.
github_create_issueCreate a GitHub issue after approval.
github_list_issue_commentsList comments on a GitHub issue with explicit pagination.
github_create_issue_commentAdd a comment to a GitHub issue after approval.
github_list_commitsList recent commits on a branch or repository with explicit pagination.
github_list_branchesList repository branches and protection state.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "GitHub Connector", version: "1.0.0" });
// Curated Astrail connector for: github_search_repositories, github_list_issues, github_get_issue, github_list_pull_requests, github_get_pull_request, github_create_issue, github_list_issue_comments, github_create_issue_comment, github_list_commits, github_list_branches.
// The hosted endpoint executes its verified deterministic endpoint map. Attach a least-privilege provider credential before calling private tools.
server.tool("connector_status", "Confirm this curated connector template is installed.", z.object({}), async () => ({
content: [{ type: "text", text: "Connector installed. Attach provider credentials to enable hosted API calls." }],
}));
const transport = new StdioServerTransport();
await server.connect(transport);