Add Agent-Scoped MCP Server Access

Resolved 💬 4 comments Opened Oct 11, 2025 by AchilleasDrakou Closed Oct 11, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When configuring MCP servers globally (e.g., Linear, GitHub, etc.), all MCP tools are loaded into every conversation's context window, even when they're only needed by specialized agents. This unnecessarily consumes token budget and clutters the main conversation context with dozens of tools that aren't relevant to the current task.

Proposed Solution

Add a restrictToAgents configuration option to MCP server definitions that limits which agents have access to specific MCP servers:

Example:

  {
    "mcpServers": {
      "mcp_name": {
        "type": "stdio",
        "command": "npx",
        "args": ["@xyz"],
        "env": {
          "API_KEY": "..."
        },
        "restrictToAgents": ["agent-name"]
      }
    }
  }

Alternative Solutions

Project based mcp setup.
But none at the global level

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

I want the project-manager agent to have full Linear API access (issues, projects, cycles, etc.) but don't need those 50+ Linear tools visible in my main coding conversations. The MCP should be globally installed but context-scoped to specific agents.

Additional Context

Benefits:

  1. Reduced context window usage - MCP tools only load when relevant agents are invoked
  2. Cleaner main conversation - Users don't see 50+ Linear/GitHub tools when just editing code
  3. Better separation of concerns - Project management tools stay with project-manager agent, database tools with data agents,

etc.

  1. Cost efficiency - Lower token usage across conversations

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗