
f5-rahm/f5-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
AI Step-by-Step docker compose project for testing mcpo and mcp
概要
A Model Context Protocol (MCP) server for F5 BIG-IP devices, served through mcpo. This setup provides AI assistants with the ability to query F5 BIG-IP objects like pools, nodes, virtual servers, and other LTM components. This repository contains: - : A FastMCP-based server that provides tools for querying F5 BIG-IP devices - : Configuration to serve the MCP server through mcpo for easy integration with AI clients - : Complete containerized environment for both components - Docker and Docker Compose - F5 BIG-IP device with REST API access - Network connectivity between the containers and your F5 device 3. Create f5mcp/.env file with F5 credentials: Create .env file in the main directory with mcpo API key: 4. : The docker-compose.yml should be configured to use the main .env file for the mcpo service. If needed, add env_file: .env to the mcpo service definition.
README
以下は原文 README の抜粋です。原文を見る。
F5 MCP Server with mcpo
A Model Context Protocol (MCP) server for F5 BIG-IP devices, served through mcpo. This setup provides AI assistants with the ability to query F5 BIG-IP objects like pools, nodes, virtual servers, and other LTM components.
Overview
This repository contains:
- F5 MCP Server: A FastMCP-based server that provides tools for querying F5 BIG-IP devices
- mcpo Integration: Configuration to serve the MCP server through mcpo for easy integration with AI clients
- Docker Setup: Complete containerized environment for both components
Prerequisites
- Docker and Docker Compose
- F5 BIG-IP device with REST API access
- Network connectivity between the containers and your F5 device
Quick Start
-
Clone and prepare the environment:
git clone https://github.com/f5-rahm/f5-mcp cd f5-mcp -
Create the external Docker network:
docker network create labnet -
Configure environment variables:
Create
f5mcp/.envfile with F5 credentials:F5_HOST=192.168.1.100 F5_USER=admin F5_PASS=your-passwordCreate
.envfile in the main directory with mcpo API key:MCPO_API_KEY=your-mcpo-api-key-here -
Start the services:
docker-compose up -dNote: The docker-compose.yml should be configured to use the main
.envfile for the mcpo service. If needed, addenv_file: .envto the mcpo service definition.
Project Structure
.
├── f5mcp/
│ ├── Dockerfile
│ ├── main.py # MCP server implementation
│ ├── requirements.txt
│ └── .env # F5 credentials (create this)
├── docker-compose.yml # Service definitions
├── mcpo-config.json # mcpo configuration
├── .env # mcpo API key (create this)
└── README.md
Testing the MCP Server
1. Direct HTTP Testing
Test the MCP server directly using curl or any HTTP client:
Initialize a session:
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {}
},
"clientInfo": {
"name": "test-client",
"version": "1.0.0"
}
}
}'
List available tools:
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}'
Test the obj_list tool:
# List all pools
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
インストール
docker run --rm --network labnet curlimages/curl:latest \設定
{
"mcpServers": {
"f5mcp": {
"type": "streamable-http",
"url": "http://f5mcp:8081/mcp",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream"
}
}
}
}