Skip to content

Support Tool Allowlists / Tool Profiles in codebase-memory-mcp #1100

Description

@ZaituDev

What problem does this solve?


Currently, codebase-memory-mcp advertises its complete tool surface to every MCP client.

As the number of available tools grows, many users only need a subset of the functionality exposed by the server.

Common examples include:

  • Reducing cognitive load for LLMs by exposing only relevant tools
  • Creating specialized assistants focused on architecture exploration
  • Creating assistants focused on code search and navigation
  • Limiting available capabilities for particular workflows
  • Reducing tool-selection errors when many tools have overlapping purposes
  • Creating simpler and more focused MCP environments

Today, users must either:

  • Expose all tools
  • Rely on client-side filtering
  • Create MCP proxy servers
  • Maintain custom forks

All of these solutions move tool-selection concerns outside the server itself.

As codebase-memory-mcp continues to grow, this becomes increasingly difficult to manage.


Proposed solution

Allow users to specify which tools should be advertised by the MCP server.

Example:

{
  "mcpServers": {
    "codebase-memory-mcp": {
      "command": "codebase-memory-mcp",
      "enabled_tools": [
        "search_graph",
        "get_architecture",
        "trace_path",
        "search_code"
      ]
    }
  }
}

Alternatively, support named profiles:

{
  "mcpServers": {
    "codebase-memory-mcp": {
      "command": "codebase-memory-mcp",
      "profile": "architecture"
    }
  }
}

with profiles defined separately.

The server would only advertise the selected tools during MCP capability negotiation.

Benefits:

  • Smaller and cleaner tool surfaces
  • Reduced LLM tool-selection complexity
  • Easier workflow specialization
  • Better multi-agent support
  • No need for proxy servers
  • No need for custom forks
  • Future tools remain opt-in rather than automatically appearing everywhere

Alternatives considered

Client-side filtering

Many MCP clients support filtering or tool allowlists.

However, filtering behavior varies by client and is not enforced at the server level.

MCP proxy servers

A proxy can selectively re-expose tools, but introduces additional infrastructure and maintenance burden.

Forking codebase-memory-mcp

Provides complete control but increases maintenance costs and makes upgrades more difficult.

Exposing all tools

Works for small tool sets, but becomes harder to manage as the number of tools grows and workflows become more specialized.


Confirmations

  • I searched existing issues and this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then closeeditor/integrationEditor compatibility and CLI integrationenhancementNew feature or requestpriority/normalStandard review queue; useful PR with ordinary maintainer urgency.ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions