networkx-mcp-server

Bright-L01/networkx-mcp-server

3.3

If you are the rightful owner of networkx-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

NetworkX MCP Server is a production-ready server that leverages the Model Context Protocol to provide advanced graph analysis capabilities using NetworkX.

NetworkX MCP Server is designed to expose the powerful graph analysis features of NetworkX through the Model Context Protocol (MCP). This server is ideal for applications that require sophisticated graph operations, such as social network analysis, transportation systems, and dependency graphs. By integrating with MCP, the server allows AI assistants and other tools to perform complex graph operations seamlessly. It supports a wide range of graph types, including directed, undirected, multi-graphs, and weighted graphs, and offers advanced algorithms for tasks like shortest path finding, centrality measures, and community detection. The server also provides rich visualization options and enterprise features like Redis persistence, monitoring, and security controls, making it suitable for both research and production environments.

Features

  • Comprehensive suite of 39+ graph tools for creation, analysis, and visualization.
  • Support for multiple graph types, including directed, undirected, multi-graphs, and weighted graphs.
  • Advanced algorithms for shortest paths, centrality measures, community detection, and more.
  • Rich visualizations with matplotlib, Plotly, or pyvis.
  • Enterprise features like Redis persistence, monitoring, audit logging, and security controls.

Usages

usage with Claude Desktop

{
  "mcpServers": {
    "networkx": {
      "command": "python",
      "args": ["-m", "networkx_mcp.server"]
    }
  }
}

usage with VS Code

{
  "mcp": {
    "servers": {
      "networkx": {
        "command": "python",
        "args": ["-m", "networkx_mcp.server"]
      }
    }
  }
}

docker deployment

yaml
version: '3.8'
services:
  networkx-mcp:
    image: networkx-mcp-server:latest
    ports:
      - "8765:8765"
    environment:
      - REDIS_URL=redis://redis:6379
    depends_on:
      - redis
  
  redis:
    image: redis:alpine
    ports:
      - "6379:6379"

Tools

  1. create_graph

    Create new graphs

  2. add_nodes

    Manage nodes

  3. add_edges

    Manage edges

  4. shortest_path

    Find shortest paths between nodes

  5. centrality_measures

    Calculate node importance