home / mcp / netdetective mcp server

Netdetective MCP Server

Provides access to the Netdetective API via an MCP server using stdio transport.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bach-ai-tools-bachai-netdetective": {
      "command": "uvx",
      "args": [
        "--from",
        "bach-netdetective",
        "bach_netdetective"
      ],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

You run the Netdetective MCP Server to access the Netdetective API from your application using the MCP framework. It uses stdio transport and can be started from a Python package or via the uvx helper, making it easy to integrate into your development or production workflow while keeping credentials secure through environment variables.

How to use

Choose an MCP client that supports stdio-based MCP servers. For this server, you can run it locally with uvx or start it directly in development mode. The API key must be provided to authorize requests to Netdetective.

Start the MCP server using uvx, which automatically handles installation if needed. Use the following command to launch the server for the Netdetective MCP: uvx --from bach-netdetective bach_netdetective.

How to install

Prerequisites: you need Python and pip, and you should have access to the Internet to install the package. You also need the uvx tool for the streamlined startup flow.

Install the Netdetective MCP package from PyPI:

pip install bach-netdetective

Option A: run with uvx (recommended). This will install uvx if it’s not already present and start the MCP server in one step:

uvx --from bach-netdetective bach_netdetective
```

# You can also specify the latest version
uvx --from bach-netdetective@latest bach_netdetective

Option B: run in development mode directly from Python sources. This requires that you have the project checked out locally and you run the server entry point directly:

python server.py

Option C: install the package and run the command as a local script after installation. This allows you to invoke the MCP server with its command name mapping:

pip install bach-netdetective
bach_netdetective

API key and environment setup

The API requires an API key for authentication. Set it in your environment before starting the server.

export API_KEY="your_api_key_here"

Configuration tips

If you use Cursor or Claude Desktop to manage MCP servers, you can configure the Netdetective MCP using the following templates. Replace YOUR_API_KEY_HERE with your actual API key.

{
  "mcpServers": {
    "bach-netdetective": {
      "command": "uvx",
      "args": ["--from", "bach-netdetective", "bach_netdetective"],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
{
  "mcpServers": {
    "bach-netdetective": {
      "command": "uvx",
      "args": ["--from", "bach-netdetective", "bach_netdetective"],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Available tools

query

Query information about an IP address using the /query endpoint.