drupertifranco/mcp-api-sros
If you are the rightful owner of mcp-api-sros and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project is a FastAPI and MCP Server application that interfaces with Claude LLM to manage IP prefixes on a Nokia SROS device.
FastAPI IP Router
This project is a FastAPI and MCP Server application that provides an interface with Claude LLM for managing IP prefixes on a Nokia SROS device. It allows users to add and delete IP prefixes through HTTP endpoints. The application is designed for future integration with n8n for workflow automation.
Project Structure
fastapi-ip-router
āāā mcp
ā āāā server.py
āāā src
ā āāā main.py # Entry point of the FastAPI application
ā āāā routers
ā ā āāā ip_router.py # API routes for adding and deleting IP addresses
ā āāā services
ā ā āāā sros_service.py # Logic for connecting to the SROS device
ā āāā types
ā āāā index.py # Custom types and data models
āāā requirements.txt # Project dependencies
āāā README.md # Project documentation
Setup Instructions
-
Clone the repository:
git clone <repository-url> cd fastapi-ip-router
Setup you proyect
In file:
fastapi-ip-router āāā src ā āāā services ā ā āāā sros_service.py # Logic for connecting to the SROS device
Put your credencial and IP of router
conn = connect(host="########PUT_YOUR_IP_HERE########", username="########PUT_YOUR_USER_HERE########", password="########PUT_YOUR_PASSWORD_HERE########", hostkey_verify=False)
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn src.main:app --reload
-
Inspector MCP
uv run mcp dev server.py
Usage
-
Get Public IP:
- Endpoint:
get
- Request Body:
{ N/A }
- Endpoint:
-
Add IP Prefix:
- Endpoint:
POST /ip-prefix
- Request Body:
{ "prefix-name": "xyz" "prefix": "1.1.1.1/32" }
- Endpoint:
-
Delete IP Prefix:
- Endpoint:
DELETE /ip-prefix
- Request Body:
{ "prefix-name": "xyz" "prefix": "1.1.1.1/32" }
- Endpoint:
LM studio config MCP
- MCP Config
{ "mcpServers": { "Demo": { "command": "uv", "args": [ "run", "C:/Users/.../fastapi-ip-router/mcp/server.py" ] } } }
Future Integration with n8n or LLM
This FastAPI application is designed to be easily integrated with n8n, allowing for automated workflows that can manage IP prefixes on the SROS device. Further documentation on integration will be provided as the project evolves.