IP Fabric MCP Server

IP Fabric MCP Server

Enables AI assistants to query IP Fabric network inventory and snapshots through natural language, using tools to fetch devices, interfaces, routing tables, and more.

Category
访问服务器

README

MCP server for IP Fabric

MCP server to interact with IP Fabric via the python SDK, initially inspired by the MCP Server for Obsidian.

⚠️ Disclaimer — Unofficial & Experimental

This is NOT an official IP Fabric product or project.

This MCP server was built as a personal experiment to explore, test, and learn about the Model Context Protocol (MCP) and how it can interact with IP Fabric through its Python SDK. It is not developed, maintained, endorsed, or supported by IP Fabric in any official capacity.

🚀 An official IP Fabric MCP server is currently being developed and tested by the IP Fabric team. If you are looking for an official, production-ready integration, please reach out to your Solution Architect for the latest updates on availability and features.

What this means for you:

  • Do not use this in production environments. This project may contain bugs, incomplete features, or breaking changes at any time.
  • No guarantees. There is no warranty, SLA, or official support associated with this project.
  • No affiliation. This repository is not affiliated with, endorsed by, or connected to IP Fabric's official MCP server efforts.
  • Use at your own risk. You are responsible for any consequences of using this code in your environment.

If you have questions about IP Fabric's official MCP server, please contact your Solution Architect or reach out to the IP Fabric team directly.

This project exists purely for educational and experimental purposes. Contributions and feedback are welcome, but please set your expectations accordingly! 🧪

Components

Tools

The server implements multiple tools to interact with IP Fabric:

  • ipf_get_filter_help: Provides help information for using filters in queries
  • ipf_get_snapshots: Lists all available snapshots in IP Fabric
  • ipf_set_snapshot: Sets the active snapshot for subsequent queries
  • ipf_get_devices: Gets device inventory data with optional filters
  • ipf_get_interfaces: Gets interface inventory data with optional filters
  • ipf_get_hosts: Gets host inventory data with optional filters
  • ipf_get_sites: Gets site inventory data with optional filters
  • ipf_get_vendors: Gets vendor inventory data with optional filters
  • ipf_get_routing_table: Gets routing table data with optional filters
  • ipf_get_managed_ipv4: Gets managed IPv4 data with optional filters
  • ipf_get_vlans: Gets VLAN data with optional filters
  • ipf_get_neighbors: Gets neighbor discovery data with optional filters
  • ipf_get_available_columns: Gets available columns for specific table types
  • ipf_get_connection_info: Gets IP Fabric connection information and status

Example prompts

It's good to first instruct Claude to use IP Fabric. Then it will always call the tools.

Use prompts like this:

  • "Show me all available snapshots in IP Fabric"
  • "Set the snapshot to the latest one and show me all devices"
  • "Get all Cisco devices from the inventory"
  • "Show me all interfaces on router 'core-01'"
  • "Find all routes to 192.168.1.0/24"
  • "Get devices with hostname containing 'switch'"
  • "Show me the routing table for devices in site 'headquarters'"
  • "What columns are available for the devices table?"

Configuration

Environment Variables

The server uses environment variables for configuration. Copy the .env.sample file to .env and update the values accordingly:

cp .env.sample .env

Required Environment Variables

IP Fabric Configuration
# IP Fabric Configuration
IPF_URL=https://ipfabric-server.domain
IPF_TOKEN=your_api_token_here
AI Model Configuration

Choose one of the following AI providers and set the AI_MODEL and AI_API_KEY variables accordingly.

Here are some examples:

# OpenAI (default)
AI_MODEL="gpt-4o"
AI_API_KEY=sk-proj-xxx

# Anthropic
AI_MODEL="anthropic/claude-sonnet-4-0"
AI_API_KEY=sk-ant-api...

# Google Gemini
AI_MODEL="gemini/gemini-2.5-flash"
AI_API_KEY=xxx

Optional Environment Variables

LangSmith Tracing (Optional)
# Enable tracing with LangSmith
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT="https://eu.api.smith.langchain.com"
LANGCHAIN_API_KEY=lsv2_xx_123..._123...
LANGSMITH_PROJECT="ipf-mcp-2025-07"

Configuration Methods

  1. Add to server config (preferred)

    {
      "mcp-ipf": {
        "command": "/path/to/uv",
        "args": [
          "--directory",
          "<path_to_this_repo>",
          "run",
          "--env-file",
          ".env",
          "src/mcp_ipf/server.py"
        ],
        "env": {
          "IPF_TOKEN": "<your_api_token_here>",
          "IPF_URL": "<your_ip_fabric_host>",
          "AI_MODEL": "<your_ai_model>",
          "AI_API_KEY": "<your_ai_api_key>"
        }
      }
    }
    

    Sometimes Claude has issues detecting the location of uv / uvx. You can use which uvx to find and paste the full path in above config in such cases.

  2. Use .env file in the working directory with the required variables (copy from .env.sample):

    cp .env.sample .env
    # Edit .env with your actual values
    

Quickstart

Prerequisites

IP Fabric API Access

You need IP Fabric API access with a valid API token. Get this from your IP Fabric instance:

  1. Log into your IP Fabric instance
  2. Go to Settings → API tokens
  3. Create a new API token
  4. Copy the token for use in configuration

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

!!! note it's recommended to use the full path to uv in the configuration, as sometimes Claude has issues detecting the location of uv. Use which uv to find the full path and paste it in the command field of the configuration.

<details> <summary>Development/Unpublished Servers Configuration</summary>

  {
    "mcpServers": {
      "mcp-ipf": {
        "command": "/path/to/uv",
        "args": [
          "--directory",
          "<path_to_this_repo>",
          "run",
          "--env-file",
          ".env",
          "src/mcp_ipf/server.py"
        ],
        "env": {
          "IPF_TOKEN": "<your_api_token_here>",
          "IPF_URL": "<your_ip_fabric_host>"
        }
      }
    }
  }

</details>

Raycast AI - MCP Servers

  1. Open Raycast, type mcp and select Install Server

    Screenshot of Raycast search after typing

  2. Fill the form with the following details:

    • command: /path/to/uv

      If unsure, use which uv to find the full path.

    • arguments: --directory <path_to_this_repo> run --env-file .env src/mcp_ipf/server.py

    Screenshot of Raycast MCP server installation process

  3. Now you can install the server with +

Using the CLI

To use the CLI application, after setting up your environment variables:

uv run python cli_app.py

Using Streamlit

...coming soon...

Development

Project Structure

playground-mcp-ipf/
├── src/
│   └── mcp_ipf/
│       ├── __init__.py      # Package entry point
│       ├── server.py        # MCP server implementation
│       ├── tools.py         # Tool handlers
├── .env                      # Environment variables (copy from .env.sample)
├── .env.sample              # Sample environment variables
├── cli_app.py               # CLI application using the MCP server
├── pyproject.toml
└── README.md

Running

Run the server directly during development:

uv run mcp-ipf

Adding New Tools

To add new IP Fabric tools:

  1. Create a new tool handler class in tools.py
  2. Add the tool class to the tool_classes list in server.py
  3. The tool will be automatically registered and available

Supported AI Models

The server supports multiple AI providers through LiteLLM:

  • OpenAI: gpt-4o, gpt-4o-mini, gpt-3.5-turbo, etc.
  • Anthropic: anthropic/claude-sonnet-4-0, anthropic/claude-haiku-3-5, etc.
  • Google Gemini: gemini/gemini-2.5-flash, gemini/gemini-pro, etc.

See the respective provider documentation for full model lists:

Troubleshooting

Common Issues

  1. Connection errors: Verify your IPF_URL and IPF_TOKEN are correct
  2. SSL certificate issues: Check your IP Fabric server's SSL configuration
  3. Permission errors: Ensure your API token has sufficient permissions in IP Fabric
  4. Snapshot issues: Use ipf_get_snapshots to see available snapshots, then ipf_set_snapshot to select one
  5. Environment variable issues: Ensure your .env file is properly configured and accessible

Getting Help

  • Check the server logs: tail -f ~/Library/Logs/Claude/mcp-server-mcp-ipf.log
  • Use the MCP Inspector for debugging
  • Verify your IP Fabric API token has the necessary permissions
  • Ensure your IP Fabric instance is accessible from your machine

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选