F5 MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "tmos_host=${tmos_host}" -e "tmos_username=${tmos_username}" -e "tmos_password=${tmos_password}" f5-mcp -- node "<FULL_PATH_TO_F5_MCP>/dist/index.js"

Replace <FULL_PATH_TO_F5_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:tmos_hosttmos_usernametmos_password
README.md

Interact with F5 devices via iControl REST API for object management.

F5 MCP 서버

F5 장비(TMOS/BIG-IP)에 iControl REST API로 접속하는 MCP(Model Context Protocol) 서버입니다.
가상 서버, 풀, 프로파일, 기본 설정, L4 표준 설정, HA 등 자연어 요청으로 설정할 수 있습니다.

접속 정보: mgmt IP·계정·비밀번호는 파일에 저장하지 않습니다. 모든 도구 호출 시 tmos_host, tmos_username, tmos_password 를 인자로 입력합니다.


목차

  1. 프로젝트 구조
  2. 문서(.md) 안내
  3. 배포 및 설치 가이드
  4. 개발 지침 및 가이드

1. 프로젝트 구조

f5-mcp/
├── F5MCPserver.py          # MCP 서버 진입점. 도구 정의 및 stdio 트랜스포트
├── Tools/
│   ├── F5object.py         # F5 iControl REST API 클라이언트 (CRUD, 기본설정, L4 표준, HA 등)
│   └── settings.py         # 연결 설정 생성 (build_endpoint_settings). 저장소/파일 없음
├── scripts/
│   ├── run_mcp.bat         # Windows용 MCP 실행 (프로젝트 루트에서 python -m F5MCPserver)
│   ├── run_mcp.sh         # macOS/Linux용 MCP 실행
│   └── commit-if-changes.sh # 변경 시 커밋 헬퍼 (선택)
├── explore_configs.py      # DNS/NTP/Syslog 등 조회 스크립트 (CLI 인자로 host/계정 전달)
├── requirements.txt        # Python 의존성 (requests, mcp, python-dotenv, PyYAML)
├── claude_desktop_config.json
├── claude_desktop_config.windows.example.json
├── claude_desktop_config.mac.example.json
└── *.md                    # 가이드 문서: guide_*, prompt_* (아래 §2 참고)
  • 실제 동작: F5MCPserver.py가 MCP 도구를 정의하고, 각 도구는 _resolve_connection(tmos_host, …)로 연결을 검증한 뒤 Tools.F5object.F5_object로 API 호출을 수행합니다.
  • 접속 정보: .env나 장비 목록 파일은 사용하지 않습니다. 호출 시마다 tmos_host, tmos_username, tmos_password(및 선택 tmos_port)를 넘깁니다.

2. 문서(.md) 안내

이름 규칙: guide_ = 사용·설정 가이드, prompt_ = AI 규칙.

파일 설명
README.md (본 문서) 프로젝트 소개, 구조, 문서 목록, 배포·설치, 개발 지침 통합
guide_표준설정_플로우.md 표준 설정 플로우: 기본 설정(Section 0), L4 DB/프로파일(Section 1), One-Arm, 이중화, VLAN/Self IP/Route, SNAT, 프로파일. 적용 전/후 검증 절차 포함
guide_도구_사용법.md 도구 목록·사용 예시·Claude 연동. CRUD, auth user, 기본/L4 표준, HA 툴 정리 및 자연어 시나리오
guide_범용_API.md 범용 TMOS API: tm_get / tm_post / tm_patch / tm_put / tm_delete. path·body로 모든 설정 생성/수정/삭제
config_templates.yaml 설정 YAML 템플릿(connection, basic_settings, vlan, pool, virtual, monitor, profile, policy, irule 등). 사용할 섹션만 채워 사용
guide_YAML_템플릿_사용법.md config_templates.yaml 섹션별 설명 및 MCP 도구 매핑. 구조화된 설정 입력 시 참고
prompt_AI에이전트_규칙.md AI 에이전트용 규칙: 기본설정·L4 표준·HA 시 금지/필수, ask_user 처리, 시나리오별 동작

배포·설치는 본 README의 §3 배포 및 설치 가이드, 개발 시 참고할 규칙은 §4 개발 지침 및 가이드에 정리되어 있습니다.


3. 배포 및 설치 가이드

Windows와 macOS에서 설치·실행·Claude 연동 방법입니다.

3.1 사전 요구사항

  • Python 3.7 이상
    • Windows: python.org에서 설치 시 "Add Python to PATH" 선택
    • macOS: python3 또는 Homebrew 등
  • F5 접속 정보: 관리 IP, 계정(예: admin), 비밀번호 (도구 호출 시마다 입력)

3.2 프로젝트 준비

코드 위치

REM Windows
cd C:\Users\사용자명\경로\f5-mcp
# macOS
cd /Users/사용자명/경로/f5-mcp

가상환경(선택)

REM Windows
python -m venv .venv
.venv\Scripts\activate
# macOS
python3 -m venv .venv
source .venv/bin/activate

의존성 설치

REM Windows
pip install -r requirements.txt
# macOS
pip install -r requirements.txt

3.3 접속 정보

접속 정보는 파일이나 .env에 기록하지 않습니다.
Claude 등에서 MCP 도구를 쓸 때마다 tmos_host(관리 IP), tmos_username, tmos_password 를 인자로 넣습니다. tmos_port(기본 443)는 선택입니다.

3.4 실행 방법

터미널에서 확인용

  • Windows: python -m F5MCPserver 또는 scripts\run_mcp.bat
  • macOS: python3 -m F5MCPserver 또는 ./scripts/run_mcp.sh (필요 시 chmod +x scripts/run_mcp.sh)

Claude Desktop에서 MCP로 사용

  1. 설정 파일 위치
    • Windows:
      %APPDATA%\Claude\claude_desktop_config.json
      풀 경로: C:\Users\사용자명\AppData\Roaming\Claude\claude_desktop_config.json
      • 폴더/파일이 없으면: C:\Users\사용자명\AppData\Roaming\ 아래에 Claude 폴더를 만들고, 그 안에 claude_desktop_config.json 파일을 생성하면 됩니다.
      • Microsoft Store(MSIX) 설치본을 쓰는 경우, 앱이 실제로 읽는 경로는 다음일 수 있습니다.
        C:\Users\사용자명\AppData\Local\Packages\Claude_xxxxx\LocalCache\Roaming\Claude\claude_desktop_config.json
        (Packages 아래 폴더명에 Claude가 포함된 것을 찾아 사용. MCP가 안 먹히면 이 경로에 설정 파일을 두고 수정해 보세요.)
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 설정 예시 (Windows)command에 run_mcp.bat 절대 경로
{
  "mcpServers": {
    "f5-mcp": {
      "command": "C:\\Users\\사용자명\\경로\\f5-mcp\\scripts\\run_mcp.bat",
      "args": [],
      "env": {}
    }
  }
}
  1. 설정 예시 (macOS)command에 run_mcp.sh 절대 경로
{
  "mcpServers": {
    "f5-mcp": {
      "command": "/Users/사용자명/경로/f5-mcp/scripts/run_mcp.sh",
      "args": [],
      "env": {}
    }
  }
}
  1. 설정 저장 후 Claude Desktop 완전 종료 → 다시 실행 → 새 채팅에서 F5 도구 사용

설정 예시 파일: claude_desktop_config.windows.example.json, claude_desktop_config.mac.example.json (경로만 실제로 바꿔 사용).

Mac / Windows 동작 (같은 코드)
이 서버는 Mac과 Windows에서 동일한 코드로 동작합니다. OS에 따라 도구 목록이 달라지거나, 특정 도구만 "비활성화"되는 설정은 없습니다.
tm_get_tool, tm_post_tool, tm_patch_tool, tm_put_tool, tm_delete_tool을 비롯해 모든 도구가 항상 등록되어 있으며, 설정 파일에

Tools (5)

tm_getRetrieve F5 configuration objects using TMOS API GET requests.
tm_postCreate new F5 configuration objects using TMOS API POST requests.
tm_patchUpdate existing F5 configuration objects using TMOS API PATCH requests.
tm_putReplace F5 configuration objects using TMOS API PUT requests.
tm_deleteDelete F5 configuration objects using TMOS API DELETE requests.

Environment Variables

tmos_hostrequiredThe management IP address of the F5 device.
tmos_usernamerequiredThe username for F5 device authentication.
tmos_passwordrequiredThe password for F5 device authentication.

Configuration

claude_desktop_config.json
{"mcpServers": {"f5-mcp": {"command": "/path/to/scripts/run_mcp.sh", "args": []}}}

Try it

List all virtual servers currently configured on the F5 device at 192.168.1.10.
Create a new pool named 'web_pool' with members 10.0.0.1 and 10.0.0.2 on the F5 device.
Update the monitor profile for the 'app_pool' to use a custom HTTP health check.
Delete the virtual server named 'old_service_vs' from the F5 configuration.

Frequently Asked Questions

What are the key features of F5 MCP Server?

Direct interaction with F5 BIG-IP TMOS via iControl REST API.. Supports full CRUD operations (Create, Read, Update, Delete) for network objects.. Enables management of virtual servers, pools, profiles, and iRules.. Supports L4 standard configurations, HA settings, and VLAN/Route management.. Stateless design: credentials are provided per-request rather than stored in files..

What can I use F5 MCP Server for?

Automating the deployment of new virtual servers and pools via natural language.. Performing bulk updates to F5 profiles or iRules across multiple environments.. Querying current network configuration status for troubleshooting purposes.. Managing F5 high-availability (HA) settings and synchronization tasks..

How do I install F5 MCP Server?

Install F5 MCP Server by running: pip install -r requirements.txt

What MCP clients work with F5 MCP Server?

F5 MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep F5 MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare