phpipam-mcp-server
Enables interaction with phpIPAM IP address management (IPAM) system, providing tools to manage IP sections, subnets, addresses, VLANs, and more through natural language.
README
phpIPAM MCP Server
Model Context Protocol server for phpIPAM IP address management and network infrastructure.
Installation
Prerequisites
- Python 3.10+
- phpIPAM instance with API access
- App configured in phpIPAM with "SSL with App Code token" security
From PyPI (when published)
pip install phpipam-mcp-server
From Source
git clone https://github.com/InfraMCP/phpipam-mcp-server.git
cd phpipam-mcp-server
pip install -e .
Development Installation
pip install -e ".[dev]"
Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"phpipam": {
"command": "phpipam-mcp-server",
"env": {
"PHPIPAM_URL": "https://ipam.example.com/",
"PHPIPAM_APP_ID": "your_app_id",
"PHPIPAM_APP_CODE": "your_app_code_token"
}
}
}
}
Available Tools
list_sections(include_fields="")
List all IP sections from phpIPAM.
include_fields: Comma-separated fields or "all" for complete data
get_section_subnets(section_id, include_usage=True, include_fields="", limit=20)
Get subnets within a specific section.
section_id: Section ID to queryinclude_usage: Include usage statistics (default: True)include_fields: Field filtering optionslimit: Maximum results to return (default: 20, max: 100)
search_addresses(ip_or_hostname, limit=10)
Search for IP addresses or hostnames.
ip_or_hostname: IP address or hostname to search forlimit: Maximum results to return (default: 10, max: 50)
get_subnet_details(subnet_id, include_addresses=False, address_limit=10)
Get detailed subnet information.
subnet_id: Subnet ID to queryinclude_addresses: Include IP addresses in subnet (default: False)address_limit: Maximum addresses to show (default: 10, max: 50)
list_vlans(domain_id=None, limit=20)
List VLANs from phpIPAM.
domain_id: Optional domain ID filterlimit: Maximum results to return (default: 20, max: 100)
list_vrfs(limit=20)
List VRF instances from phpIPAM.
limit: Maximum results to return (default: 20, max: 100)
list_locations(limit=20)
List physical locations for network infrastructure.
limit: Maximum results to return (default: 20, max: 100)
list_nameservers(limit=20)
List DNS nameservers with configuration details.
limit: Maximum results to return (default: 20, max: 100)
search_subnets(query, limit=10)
Search subnets by CIDR, description, or other criteria.
query: Search term (CIDR, description, etc.)limit: Maximum results to return (default: 10, max: 50)
Write Operations
create_subnet(section_id, subnet, mask, *, description="", vlan_id=None)
Create a new subnet in phpIPAM.
section_id: Section ID where subnet will be createdsubnet: Network address (e.g., "192.168.1.0")mask: Subnet mask (e.g., "24")description: Optional description for the subnetvlan_id: Optional VLAN ID
reserve_ip_address(subnet_id, ip=None, hostname="", description="", owner="")
Reserve an IP address in a subnet.
subnet_id: Subnet ID where IP will be reservedip: Specific IP address to reserve (optional - will find first available)hostname: Hostname for the IP addressdescription: Description for the IP addressowner: Owner of the IP address
update_ip_address(address_id, hostname=None, description=None, owner=None)
Update an existing IP address record.
address_id: ID of the IP address to updatehostname: New hostname (optional)description: New description (optional)owner: New owner (optional)
delete_ip_address(address_id)
Delete/release an IP address reservation.
address_id: ID of the IP address to delete
update_subnet(subnet_id, description=None, vlan_id=None, vrf_id=None)
Update an existing subnet.
subnet_id: ID of the subnet to updatedescription: New description (optional)vlan_id: New VLAN ID (optional)vrf_id: New VRF ID (optional)
delete_subnet(subnet_id)
Delete a subnet (WARNING: This will delete all IP addresses in the subnet).
subnet_id: ID of the subnet to delete
Configuration
phpIPAM Setup
- Create an API application in phpIPAM admin interface
- Set security to "SSL with App Code token"
- Note the App ID and App Code
- Set appropriate permissions for the application
Authentication
This server uses static app code token authentication:
- No token expiration
- Simple configuration
- Secure over HTTPS
Development
Code Quality
# Run pylint
python -m pylint src/phpipam_mcp_server/
# Run tests (when available)
python -m pytest
# Format code
python -m black src/
python -m isort src/
Project Structure
src/phpipam_mcp_server/
├── __init__.py # Package initialization
└── server.py # Main MCP server implementation
API Documentation
See the docs/ directory for detailed API documentation:
api-overview.md- General API informationcontrollers.md- Available endpoints and data structuresexamples.md- Request/response examplesmcp-design.md- MCP server design and architecture
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make changes with tests
- Run code quality checks
- Submit a pull request
Support
- GitHub Issues: https://github.com/InfraMCP/phpipam-mcp-server/issues
- Documentation: https://github.com/InfraMCP/phpipam-mcp-server#readme
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。