- Home
- MCP servers
- Networking
Networking
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"apoorvbrooklyn-networking-mcp": {
"command": "python",
"args": [
"mcp_server.py"
],
"env": {
"DB_NAME": "pm_counters_db",
"DB_USER": "postgres",
"SFTP_HOST": "localhost",
"DB_PASSWORD": "postgres",
"GROQ_API_KEY": "YOUR_GROQ_API_KEY",
"SFTP_PASSWORD": "sftp_password",
"SFTP_USERNAME": "sftp_user"
}
}
}
}You deploy and run a self-contained PM Counter Monitoring System that fetches PM counters from a remote SFTP location, stores them in PostgreSQL, and exposes access through an API and an MCP interface. This setup lets you monitor telecom performance metrics, query current and historical data, and integrate with clients via MCP endpoints or a REST API.
How to use
You can operate the system in two main ways: as an HTTP API server and as an MCP server. Start the MCP server to enable MCP protocol-based requests for metrics like interface counters, system counters, CPU and memory utilization, and a latest metrics summary. Use the HTTP API to retrieve the same data through standard REST endpoints. The Streamlit frontend provides a chat-like interface to query current and historical metrics. Route your client requests to the appropriate endpoints depending on your preferred integration style.
How to install
Prerequisites: Python and a working PostgreSQL database. You will also need access to a remote SFTP location or local test data.
# Step 1: Install Python dependencies
pip install -r requirements.txt
# Step 2: Prepare environment (see example values below)
cp .env.example .env
Additional setup notes
Configure your environment with the following settings. These are the variables you need to provide, and you can keep defaults for testing if applicable.
# Required for RAG system
GROQ_API_KEY=your_groq_api_key_here
# Database settings
DB_NAME=pm_counters_db
DB_USER=postgres
DB_PASSWORD=postgres
# SFTP settings
SFTP_HOST=localhost
SFTP_USERNAME=sftp_user
SFTP_PASSWORD=sftp_password
SFTP_REMOTE_PATH=/path/to/xml/files
Usage flow and endpoints
The system automatically fetches XML files from the remote SFTP location on a defined interval, parses them, and writes data to PostgreSQL. You can access the REST API to retrieve metrics and processed data, or use the MCP interface for programmatic access from MCP clients.
MCP methods and API endpoints
MCP Methods: use these to query metrics via the MCP protocol.
System components
Key components include an SFTP client for file transfer, a job server for periodic processing, an XML parser, a PostgreSQL database, data storage layer, a FastAPI-based API server, an MCP server, and a Streamlit frontend for interactive querying.
Notes
TheGroq API key is required for the RAG system. Without it, the system falls back to simple pattern matching.
Available tools
get_interface_counters
Retrieve performance counters for a specific network interface from the MCP API.
get_system_counters
Query overall system performance counters such as CPU, memory, and uptime via MCP.
get_cpu_utilization
Request current CPU utilization statistics from MCP endpoints.
get_memory_utilization
Request current memory utilization statistics from MCP endpoints.
get_latest_metrics
Fetch a summary of the latest metrics across all elements.