AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

PhpIPAM MCP

mcp-0xekho-phpipam-mcp · by 0xEkho

phpIPAM Open source IP address management - MCP

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add mcp-0xekho-phpipam-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-0xekho-phpipam-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
8mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of PhpIPAM MCP? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

phpIPAM MCP Server

[](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://modelcontextprotocol.io/) [](https://www.docker.com/)

Complete Model Context Protocol server for phpIPAM - Professional IP address management and network infrastructure automation through AI assistants.

Manage your entire IP infrastructure through natural language conversations with Claude or other MCP-compatible AI assistants.

🌟 Features

  • 63 Comprehensive Tools - Complete phpIPAM API coverage
  • 10 Core Modules - Sections, Subnets, Addresses, VLANs, VRFs, Devices, Locations, and more
  • Natural Language Interface - Interact with your network through AI assistants
  • Production Ready - Docker deployment, health checks, comprehensive logging
  • Advanced Search - Find resources by IP, hostname, MAC address, or tags
  • Real-time Usage Stats - Monitor subnet utilization and capacity
  • Network Planning - Plan allocations, find free IPs, manage hierarchies

📑 Table of Contents

  • [Quick Start](#-quick-start)
  • [Installation](#-installation)
  • [Usage Examples](#-usage-examples)
  • [Available Tools](#-available-tools)
  • [Configuration](#-configuration)
  • [Deployment](#-deployment)
  • [Development](#-development)

🚀 Quick Start

Docker Deployment (Recommended)

# Clone repository
git clone https://github.com/0xEkho/phpIPAM-MCP.git
cd phpIPAM-MCP/deploy

# Configure credentials
cp .env.example .env
nano .env  # Add your phpIPAM URL and credentials

# Start server
docker-compose up -d

# Verify health
curl http://localhost:8081/healthz

Python Installation

# Install
pip install -e .

# Set environment variables
export PHPIPAM_URL="https://ipam.example.com"
export PHPIPAM_APP_ID="mcp-server"
export PHPIPAM_APP_CODE="your_app_code_token"

# Run server
phpipam-mcp-server

📥 Installation

Prerequisites

  • Python 3.11+ or Docker
  • phpIPAM instance with API access
  • API application configured with "SSL with App Code token" security

phpIPAM API Setup

  1. Login to phpIPAM as administrator
  2. Navigate to AdministrationphpIPAM settingsAPI
  3. Click Create API application
  4. Configure:
  • App ID: mcp-server (or your choice)
  • App permissions: Read/Write as needed
  • App security: SSL with App code token
  1. Save and copy the App Code token

From Source

git clone https://github.com/0xEkho/phpIPAM-MCP.git
cd phpIPAM-MCP
pip install -r requirements.txt
pip install -e .

💡 Usage Examples

Browse practical examples in the [examples/](examples/) directory:

  • [List Sections](examples/01listsections.md) - Explore network organization
  • [Subnet Management](examples/02subnetmanagement.md) - Manage subnets and usage
  • [IP Address Search](examples/03ipaddress_search.md) - Find IPs by various criteria
  • [VLAN Management](examples/04vlanmanagement.md) - Audit and manage VLANs
  • [IP Reservation](examples/07ipreservation.md) - Reserve and allocate IPs

Example: Search for an IP

Natural language (with Claude): > "Find all information about IP address 192.168.1.100"

MCP Tool Call:

{
  "tool": "phpipam.addresses.search",
  "args": {
    "search_term": "192.168.1.100"
  }
}

Example: Reserve an IP

Natural language (with Claude): > "Reserve IP 10.0.1.50 with hostname web-server-01 for the production web server"

MCP Tool Call:

{
  "tool": "phpipam.addresses.create",
  "args": {
    "subnet_id": "42",
    "ip": "10.0.1.50",
    "hostname": "web-server-01",
    "description": "Production web server",
    "owner": "IT Team"
  }
}

🛠️ Available Tools

63 Comprehensive Tools

| Module | Tools | Description | |--------|-------|-------------| | Sections | 6 | Organize IP address space into sections | | Subnets | 11 | Complete subnet lifecycle management | | Addresses | 11 | IP address allocation and tracking | | VLANs | 10 | VLAN and L2 domain management | | VRFs | 7 | Virtual routing and forwarding | | Devices | 8 | Network device inventory | | Locations | 6 | Physical location tracking | | Nameservers | 2 | DNS nameserver management | | Tools | 2 | Global search and utilities |

Key Operations

Sections

  • phpipam.sections.list - List all sections
  • phpipam.sections.get - Get section details
  • phpipam.sections.get_subnets - List subnets in section
  • phpipam.sections.create/update/delete - Manage sections

Subnets

  • phpipam.subnets.list - List all subnets
  • phpipam.subnets.get - Get subnet with usage stats
  • phpipam.subnets.search - Search by CIDR
  • phpipam.subnets.get_first_free - Find next available IP
  • phpipam.subnets.get_slaves - List child subnets
  • phpipam.subnets.create/update/delete - Manage subnets

Addresses

  • phpipam.addresses.search - Search by IP or hostname
  • phpipam.addresses.search_mac - Search by MAC address
  • phpipam.addresses.create - Reserve IP addresses
  • phpipam.addresses.update/delete - Manage addresses
  • phpipam.addresses.ping - Ping an IP address
  • phpipam.addresses.tags.* - Manage address tags

VLANs

  • phpipam.vlans.list - List all VLANs
  • phpipam.vlans.get_subnets - Subnets in VLAN
  • phpipam.vlans.domains.* - Manage L2 domains
  • phpipam.vlans.create/update/delete - Manage VLANs

VRFs, Devices, Locations

  • Complete CRUD operations for each resource type
  • Search and filtering capabilities
  • Relationship tracking (devices ↔ addresses, locations ↔ subnets)

See [examples/](examples/) for detailed usage of each tool.

⚙️ Configuration

Environment Variables

# Required
PHPIPAM_URL=https://ipam.example.com
PHPIPAM_APP_ID=mcp-server
PHPIPAM_APP_CODE=your_app_code_token

# Optional
PHPIPAM_VERIFY_SSL=true
PHPIPAM_TIMEOUT=30
LOG_LEVEL=INFO

Configuration File

Alternatively, use config.yaml:

phpipam:
  url: "https://ipam.example.com"
  app_id: "mcp-server"
  app_code: "your_app_code_token"
  verify_ssl: true
  timeout: 30

server:
  host: "0.0.0.0"
  port: 8081
  log_level: "INFO"

MCP Client Configuration

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "phpipam": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "PHPIPAM_URL=https://ipam.example.com",
        "-e", "PHPIPAM_APP_ID=mcp-server",
        "-e", "PHPIPAM_APP_CODE=your_token",
        "phpipam-mcp-server"
      ]
    }
  }
}

Or with Python:

{
  "mcpServers": {
    "phpipam": {
      "command": "python",
      "args": ["-m", "phpipam_server.main"],
      "env": {
        "PHPIPAM_URL": "https://ipam.example.com",
        "PHPIPAM_APP_ID": "mcp-server",
        "PHPIPAM_APP_CODE": "your_token"
      }
    }
  }
}

🐳 Deployment

Complete deployment guide available in [deploy/README.md](deploy/README.md).

Docker Compose

cd deploy
docker-compose up -d

Docker Build

docker build -t phpipam-mcp-server -f deploy/Dockerfile .
docker run -d -p 8081:8081 \
  -e PHPIPAM_URL="..." \
  -e PHPIPAM_APP_ID="..." \
  -e PHPIPAM_APP_CODE="..." \
  phpipam-mcp-server

Health Check

curl http://localhost:8081/healthz

🔧 Development

Setup Development Environment

# Clone and install
git clone https://github.com/0xEkho/phpIPAM-MCP.git
cd phpIPAM-MCP
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
pip install -e ".[dev]"

Run Tests

pytest tests/
pytest --cov=phpipam_server tests/

Code Quality

# Format
black phpipam_server/
isort phpipam_server/

# Lint
ruff check phpipam_server/
mypy phpipam_server/

Project Structure

phpIPAM-MCP/
├── phpipam_server/          # Main application code
│   ├── main.py             # FastAPI server
│   ├── api_client.py       # phpIPAM API client
│   ├── config.py           # Configuration management
│   ├── tools.py            # MCP tools implementation
│   ├── tool_definitions.py # Tool metadata
│   └── modules/            # API modules (10 modules)
├── deploy/                  # Docker deployment
│   ├── Dockerfile
│   ├── docker-compose.yml
│   └── README.md
├── examples/                # Usage examples (.md files)
├── tests/                   # Test suite
├── requirements.txt         # Python dependencies
├── pyproject.toml          # Package configuration
└── README.md               # This file

🔒 Security

  • Authentication: App code token-based (static, no expiration)
  • Transport: HTTPS required for production
  • Permissions: Configure appropriate API permissions in phpIPAM
  • Environment: Store credentials securely, never commit secrets
  • Docker: Runs as non-root user
  • SSL Verification: Enabled by default

🤝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ for network automation and AI-assisted IPAM operations

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.