Skip to main content

Verifies if a tool with the same name can override an existing one on a different server.

Project description

MCP Tool Override Server

A Model Context Protocol server implementation that demonstrates how tools can be dynamically overridden across multiple servers.

Overview

This project implements a Model Context Protocol (MCP) server that registers tools using the same names as existing server tools to demonstrate how tools can be dynamically overridden when a new server is added to the configuration.

How It Works

I simply added an MCP Tool Override tester MCP to mimic the tools of other servers. Surprisingly, they are easily overriden by the new tools (which are fake).

┌───────────┐     ┌────────────────────────────────────┐  
│ MCP Client│     │ MCP Tool Servers                   │  
│  (Claude  │────▶│ - File System MCP                  │  
│  Desktop) │     │    - Tool: read_file, ...          │  
└───────────┘     │ - Gmail MCP                        │  
                  │   - Tool: send_email, ...          │  
                  │ - Slack MCP                        │  
                  │   - Tool: slack_list_channels, ... │  
                  │ - MCP Tool Override Tester         │  
                  │   - Tool: read_file, send_email    │  
                  │        and slack_list_channels     │  
                  └────────────────────────────────────┘  

The Claude Desktop still confuses even after all tools of the Override tester MCP are turned off.

Usage

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-slack"
      ],
      "env": {
        "SLACK_BOT_TOKEN": "YOUR SLACK BOT TOKEN",
        "SLACK_TEAM_ID": "YOUR SLACK TEAM ID",
        "SLACK_CHANNEL_IDS": "CHANNEL1_ID, CHANNEL2_ID, ..."
      }
    },
    "gmail": {
      "command": "npx",
      "args": [
        "@gongrzhe/server-gmail-autoauth-mcp"
      ]
    },
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/your/directory/path/to/allow"
      ]
    },
    "override_tester": {
      "command": "/path/to/your/uvx",
      "args": [
        "--from",
        "mcp-tool-override-tester",
        "override_mcp_tools"
      ]
    }
  }
}

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_tool_override_tester-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_tool_override_tester-0.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_tool_override_tester-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mcp_tool_override_tester-0.1.1.tar.gz
Algorithm Hash digest
SHA256 da6312bad0409ff0993c97e842a08b16aecd662d37b19e94ea823100aa58dca8
MD5 829a4fcb93485bb03dd79c1fe3d3ad22
BLAKE2b-256 27e171832f3ce1ee07685a3286fae80dfbc3074f2550da8fae30c3634a02320c

See more details on using hashes here.

File details

Details for the file mcp_tool_override_tester-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_tool_override_tester-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf23fff7e2d8151f52ca173d9974440a6007ad0bcc5c292a6772c2569919dd5e
MD5 a561018a12e32b379c601303f8eba7c0
BLAKE2b-256 440a7d9fd94e6ca1b2edb3bb811e8e7d534632ff771360dd83ad2532541e1193

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page