mcpField
R
Repo Context Mcp

Repo Context Mcp

Local
github.com/pablo-peekVersion Control1Updated 53w ago

About Repo Context Mcp

Repo Context MCP is an MCP server for developers exploring local or GitHub repositories. It lists and reads files and analyzes TypeScript and JavaScript exports and types, including in private repositories without cloning.

Key features

  1. 01Browse repository files and folders
  2. 02Read file contents
  3. 03Analyze exported functions and types
  4. 04Access public and private GitHub repositories
  5. 05Fetch GitHub files without cloning

Use cases

  1. 01Explore an unfamiliar codebase
  2. 02Inspect endpoint payload types
  3. 03Read remote repository files
  4. 04Document repository structure

MCP support

It exposes repository browsing and code-analysis tools to MCP clients, including tools to set a local repository path, list and read files, and analyze TypeScript and JavaScript types.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"Repo-context": {
"command": "npx",
"args": [
"-y",
"@pablopeek/repo-context-mcp"
],
"env": {
"ENVIRONMENT": "<ENVIRONMENT>",
"GITHUB_TOKEN": "<GITHUB_TOKEN>",
"GITHUB_NAME": "<GITHUB_NAME>"
}
}
}
}
Run commandnpx -y @pablopeek/repo-context-mcp
Environment variables to set
ENVIRONMENT
GITHUB_TOKENSecret
GITHUB_NAME

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@pablopeek/repo-context-mcp

Tools

8

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
pathstringYesAbsolute path to the repository on the file system

Details

From the project README

Repo Context MCP 🚀

Explore and analyze any code repository—locally or remotely—directly from VS Code.


🚀 Why Use Repo-context-mcp?

See the difference when working in VS Code without and with this tool:

❌ Without Repo-context-mcp✅ With Repo-context-mcp
🔍 Explore repo structureManually browse files and foldersInstantly list files and folders in any repo
📄 Read file contentsOpen files one by oneRead any file’s content with a single command
🧑‍💻 Analyze codeManually inspect/export functionsGet exported functions and types automatically
🔒 Private/public reposNeed to clone and set up locallyAnalyze local or remote (even private) repos
⚡ GitHub endpointsManual API calls or cloningFetch files and metadata without cloning

✨ Features

  • 📂 List files and folders in any repo (local or GitHub)
  • 📄 Read file contents instantly
  • 🧑‍💻 Analyze exported functions and types from TypeScript/JavaScript files
  • 🔒 Works with private and public repositories
  • ⚡ No need to clone: fetch files and metadata from GitHub endpoints

🛠️ Installation

  1. Install in VS Code

    Open your workspace and run:

    npm install
    
  2. Build the project

    npm run build
    
  3. Start the server in development mode

    npm run start:dev
    

    Or, to run the compiled code:

    npm start
    

🚦 How It Works

With this MCP server, you can:

  • Set the repository path you want to analyze (local or remote)
  • List files and folders
  • Read file contents
  • Analyze TypeScript/JavaScript files to extract exported functions and their type information

All these tools are available directly from VS Code, making it easy to understand and document codebases while you work.


🎯 Example: Instantly Discover What an Endpoint Expects

With Repo Context MCP, you can analyze TypeScript repositories and ask very specific questions about API endpoints—like what object and types you need to send for a successful request.

For example:

“What do I need to send to POST /users/register to create a new user?”

Repo Context MCP will analyze the source code and provide the exact JSON structure and TypeScript types required, including enums and nested objects.
This means you’ll know precisely what to send, without wasting time guessing or searching through documentation.

This is a huge productivity boost for developers:

  • Instantly discover endpoint payloads and types
  • Avoid trial-and-error and failed requests
  • Integrate faster with any backend, even private APIs

If you need concrete examples or want to see the payload for any endpoint, just ask—Repo Context MCP will extract it directly.


🔗 Integration

Register this MCP server as a context provider in your mcp.json:

{
  "servers": {
    "repo-context-mcp": {
      "command": "npx",
      "args": [
        "ts-node",
        "/home/pablo/Apps/repo-context/src/index.ts"
      ],
      "type": "stdio",
      "env": {
        "ENVIRONMENT": "local",
        "GITHUB_TOKEN": "",
        "GITHUB_NAME": ""
      }
    }
  }
}

🔒 Analyzing Private and Local Repositories

  • Local repositories: Set the path using the setRepoPath tool.

  • Private GitHub repositories: Add your GitHub username and token to the environment variables in your MCP server configuration (mcp.json):

    "env": {
      "GITHUB_TOKEN": "<your-github-token>",
      "GITHUB_NAME": "<your-github-username>"
    }
    

    Then, use the tools to fetch and analyze files from the private repo by specifying the repo owner, name, and file path.

Note: For private GitHub repos, provide your GitHub credentials in the configuration. For local repos, simply pass the local path.


📦 Requirements

  • Node.js 18+
  • npm

💡 Notes

  • Dynamically set the repository to analyze using the setRepoPath tool.
  • The server exposes tools for file exploration and type analysis, making it ideal for code understanding and documentation.
  • You can fetch files and metadata from GitHub endpoints without cloning

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.