mcp-current-repo
Automatically scopes MCP tools to the current GitHub repository, eliminating the need for the agent to enumerate and guess the repository context.
Click on "Install 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., "@mcp-current-repoShow me the open issues in this repository"
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.
mcp-current-repo
Give an MCP server "current-project" focus — so it stops doing the "list every repo and guess" dance — without giving it filesystem access.
The host already knows what project you're in. The protocol can carry that. The server never needs to touch your disk.
A working proof of the path @SamMorrowDrums suggested on github/github-mcp-server#1683:
"I have often considered allowing for a repo-specific version… I think the host application would need to do it with a roots-like MCP protocol support. We don't have local folder access so unlike GH we cannot access files to determine current repo directly."
The problem (#1683 / #1308)
Ask a GitHub-connected agent to "show this project's issues" and it wanders: list_repositories → enumerate every repo → guess the current one → maybe ask you. Slow, scattered, and it burns context the model needs for the actual task.
Related MCP server: git-mcp
The fix
current repo HOST (MCP client) SERVER
(derived by the ──▶ puts it in a root ──roots/list──▶ reads the root,
host) (protocol) auto-scopes the tool
— never reads a fileThe host has the project context; it passes the repo identity over MCP roots; the server auto-scopes every tool. No exploration phase, no filesystem access on the server.
Before / after (actual output of npm run demo)
BEFORE — plain workspace root, no project context
· no owner/repo in the call → requesting roots/list from the host…
· host returned 1 root(s): workspace
⛔ No project scope available.
A real agent now does the 'search-first-then-locate' dance:
→ list_repositories (enumerate every repo) → guess the current one → maybe ask the user.
AFTER — host carries the current repo via the root name
· no owner/repo in the call → requesting roots/list from the host…
· host returned 1 root(s): faf:repo=github.com/octocat/Hello-World
✅ Scoped to octocat/Hello-World (no fs, no exploration)
No exploration phase. The server read NO files.The finding worth knowing (a 20-min spike)
The MCP TypeScript SDK currently hard-enforces file:// on root URIs:
// @modelcontextprotocol/sdk — types.js
RootSchema = z.object({
uri: z.string().startsWith('file://'), // "This *must* start with file:// for now."
...
})So you cannot pass https://github.com/owner/repo as a root URI today — it's rejected. This demo therefore carries the repo identity in the root name. That points at a small, concrete ask for the spec/SDK: relax the roots URI constraint (a typed repo:// / project-context root), so identity doesn't have to ride in a free-text name.
What a server would add (minimal)
On a tool call without
owner/repo, callroots/list(the SDK already supports this).Read the project root the host provides.
Use it as the default scope. Done — no exploration, no fs access.
Where the current repo comes from
The host has to derive the repo somehow. This demo reads a project.faf — a typed, portable context file you own (IANA-registered as application/vnd.faf+yaml) — which already carries the project's identity in one field. It's a clean source because the file is the scope and travels with the repo.
But the mechanism is source-agnostic: derive the repo from .git, an env var, an IDE workspace setting — whatever the host knows. The roots path is the same; project.faf is just one tidy way to feed it.
Run it
npm install
npm run demoMIT. A stub for discussion, not a fork.
This server cannot be installed
Maintenance
Related MCP Servers
- -license-qualityAmaintenanceMCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.128,88689,405MIT
- Flicense-qualityDmaintenanceStandalone MCP server for GitHub that enables repository management, branch operations, pull request handling, and commit retrieval via tools listed in the README.1
- Flicense-qualityBmaintenanceA GitHub MCP server that wraps the gh CLI to expose GitHub operations like issues, pull requests, branches, labels, repositories, CI actions, and Projects V2 as tools for MCP clients.
- Alicense-qualityBmaintenanceMCP server providing maximum practical control over GitHub via REST and GraphQL APIs, exposing 22 tools for repository management, file operations, issues, PRs, Actions, and more.MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Wolfe-Jam/mcp-current-repo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server