Skip to main content
Glama

set-github-token

Configure a GitHub Personal Access Token for secure authentication to map and analyze GitHub repositories using the GitHub Mapper MCP Server.

Instructions

Set the GitHub Personal Access Token for authentication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesGitHub Personal Access Token

Implementation Reference

  • The handler logic for the 'set-github-token' tool. It extracts the token from arguments, sets the global githubToken, initializes the Octokit client with authentication, and returns a success message.
    if (name === "set-github-token") { const { token } = args as { token: string }; githubToken = token; octokit = new Octokit({ auth: githubToken }); return { content: [ { type: "text", text: "GitHub Personal Access Token has been set successfully.", }, ], }; } else if (name === "map-github-repo") {
  • src/index.ts:28-41 (registration)
    Registration of the 'set-github-token' tool in the ListToolsRequestHandler, providing name, description, and input schema.
    { name: "set-github-token", description: "Set the GitHub Personal Access Token for authentication", inputSchema: { type: "object", properties: { token: { type: "string", description: "GitHub Personal Access Token", }, }, required: ["token"], }, },
  • Input schema definition for the 'set-github-token' tool, specifying the required 'token' string property.
    inputSchema: { type: "object", properties: { token: { type: "string", description: "GitHub Personal Access Token", }, }, required: ["token"], },

Other Tools

Related Tools

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/dazeb/MCP-Github-Mapper'

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