GitHub Mapper MCP Server
This GitHub Mapper MCP Server allows you to map and analyze GitHub repositories with authentication and detailed structure insights:
Set GitHub Personal Access Token: Authenticate requests using the
set-github-tokentool.Map GitHub Repository Structure: Analyze repositories to retrieve their structure and organization.
Access Repository Information: Get summary data (stars, forks, primary language, dates) and detailed file structure.
Error Handling: Receive clear messages for authentication issues or invalid URLs.
Integration Support: Works seamlessly with MCP clients like Cline or Roo-Cline.
Provides tools for mapping and analyzing GitHub repositories, including setting authentication tokens, retrieving repository structures, and accessing summary information like stars, forks, language, and update dates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub Mapper MCP Server map the repository structure for https://github.com/facebook/react"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub Mapper MCP Server
GitHub Mapper is a Model Context Protocol (MCP) server that provides tools for mapping and analyzing GitHub repositories. It allows users to set a GitHub Personal Access Token and retrieve detailed information about a specified repository, including its structure and summary statistics.
Features
Set GitHub Personal Access Token for authentication
Map and analyze GitHub repository structure
Retrieve repository summary information (stars, forks, language, etc.)
Provide a detailed repository file structure
Related MCP server: GitHub MCP Server
Prerequisites
Node.js (v18.0.0 or later recommended)
npm (comes with Node.js)
A GitHub Personal Access Token with appropriate permissions
Installation
Installing via Smithery
To install GitHub Mapper for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install github-mapper-mcp-server --client claudeManual Installation
Clone the repository:
git clone https://github.com/your-username/github-mapper-mcp-server.git cd github-mapper-mcp-serverInstall dependencies:
npm installBuild the project:
npm run build
Usage
Start the server:
npm startThe server will run on stdio, allowing it to communicate with MCP clients.
Available Tools
1. set-github-token
Sets the GitHub Personal Access Token for authentication.
Create your Personal Access Token here. Choose Tokens (classic). Scopes: repo
Example, in your IDE or Claude Desktop:
Please set-github-token to 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2. map-github-repo
Maps a GitHub repository structure and provides summary information.
Example:
Please map-github-repo https://github.com/dazeb/MCP-Github-MapperManual install in Cline or Roo-Cline MCP Client:
{
"mcpServers": {
"github-mapper": {
"command": "node",
"args": ["/home/user/Documents/Cline/MCP/github-mapper/build/index.js"]
}
}
}Example Output
Repository Analysis Summary:
Name: Hello-World
Description: My first repository on GitHub!
Stars: 1234
Forks: 567
Primary Language: JavaScript
Created: 2023-01-01
Last Updated: 2023-06-15
Repository Structure:
{
"src": {
"components": {
"Header.js": null,
"Footer.js": null
},
"pages": {
"index.js": null,
"about.js": null
},
"styles": {
"global.css": null
}
},
"public": {
"images": {
"logo.png": null
},
"favicon.ico": null
},
"package.json": null,
"README.md": null
}Images
Running evals
The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.tsError Handling
If the GitHub token is not set, you'll receive an error message prompting you to use the
set-github-tokentool first.Invalid GitHub URLs or repository paths will result in appropriate error messages.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Available Tools
2 toolsmap-github-repoC
Map a GitHub repository structure and provide summary information
Inputs: repoUrl (required).
set-github-tokenC
Set the GitHub Personal Access Token for authentication
Inputs: token (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one maps repository structures, while the other handles authentication. There is no overlap or ambiguity between them, making it easy for an agent to select the correct tool based on the task.
The tools use a mixed naming convention: 'map-github-repo' follows a verb-noun pattern with hyphens, while 'set-github-token' uses a verb-noun pattern but with a different structure. This inconsistency in style (hyphenated vs. standard verb_noun) reduces predictability, though both are readable.
With only 2 tools, the server feels thin for a GitHub-related domain, which typically involves operations like creating, updating, or deleting repositories, issues, or pull requests. The limited scope may hinder comprehensive agent workflows, as core functionalities are missing.
The server covers authentication and repository mapping but lacks essential GitHub operations such as CRUD for repositories, issues, or pull requests. This creates significant gaps that will likely cause agent failures when attempting common tasks like creating an issue or fetching repository details beyond structure.
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
GitHub repo search, stats, language breakdown and comparison as agent tools.
Manage repositories, users, releases, and automate GitHub workflows
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Large Language Models to analyze GitHub repositories in real-time, providing tools for retrieving repository information, analyzing issues, accessing documentation, and visualizing activity.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze GitHub repository structures and read file contents with features like directory traversal, file type analysis, syntax highlighting, and code pattern detection. Supports both public and private repositories through GitHub API integration.8 npmApache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables access to GitHub repositories and data through the GitHub API. Supports retrieving repositories, issues, pull requests, and searching code across GitHub with authentication via personal access tokens.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze GitHub repositories, including fetching repository details, searching, and retrieving README content.2MIT