What environment variables are required?
GITHUB_TOKEN and GITHUB_NAME must be set. The token should never be stored in config files.
@pablo-peek
Basic information
Repo Context MCP provides programmatic access to repository contents for integrations and automation. It can list directories/files, read any file, return the README, perform TypeScript type analysis (via ts-morph), and search for OpenAPI/Swagger spec files. Supports local repo p
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"repo-context": {
"type": "stdio",
"command": "npx",
"args": [
"@pablopeek/repo-context-mcp"
],
"env": {
"ENVIRONMENT": "local",
"GITHUB_TOKEN": "<SET_GITHUB_TOKEN>",
"GITHUB_NAME": "<SET_GITHUB_NAME>"
}
}
}
}Change the active repository path
List files and folders at the given path in the active repo
Read the content of a file in the active repo
Read the README.md file from the active repo
Analyze a file and return exported functions and the type of their parameters (if available)
Analyze a file using ts-morph and return exported functions and the type of their parameters (resolving local and imported types)
Read the content of a file from a (private) GitHub repository using the GitHub API.
Read the Swagger/OpenAPI specification file (swagger.json, openapi.json, openapi.yaml, etc.) from the active repo.
It is a programmatic MCP server to explore repositories, either local or from GitHub. It can list files, read file contents, return README, analyze TypeScript types using ts-morph, and locate OpenAPI/Swagger specs. It is intended for developers who want to programmatically interact with repository contents via an MCP interface.
Set environment variables GITHUB_TOKEN and GITHUB_NAME (do not store tokens in config files). Then invoke the server and use its tools such as setRepoPath, getFiles, getFileContent, getReadme, analyzeFileTypes, analyzeFileTypesAdvanced, getGithubFileContent, and getSwaggerSpec.
GITHUB_TOKEN and GITHUB_NAME must be set. The token should never be stored in config files.
It can access both local file system repositories (via setRepoPath) and GitHub repositories (via getGithubFileContent using the token).
It provides setRepoPath, getFiles, getFileContent, getReadme, analyzeFileTypes, analyzeFileTypesAdvanced, getGithubFileContent, and getSwaggerSpec.
analyzeFileTypes performs a simple exported function scan, while analyzeFileTypesAdvanced uses ts-morph resolution which may require project dependencies.
Yes, getSwaggerSpec searches common locations for OpenAPI/Swagger specification files.

The system of record for AI-written software. A persistent graph of entities, relationships, changes, and provenance, so humans and AI agents see what a change touches before it merges. Beside Git today.
Learn how to use MCP Servers with GitHub Copilot
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
MCP server that enables AI assistants to interact with Linear project management system through natural language, allowing users to retrieve, create, and update issues, projects, and teams.
Put an end to code hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project
Comments