
TMF620 Product Catalog
STDIOMCP server for TMF620 Product Catalog Management API integration
MCP server for TMF620 Product Catalog Management API integration
(The last version was a quick prototype. Here's a cleaner implementation)
A modern TMF620 Product Catalog Management system with MCP (Model Context Protocol) support for AI agents, built with Python and uv
for fast, reliable dependency management.
uv
for fast dependency resolution and packagingThe system consists of two main components:
mock_tmf620_api_fastapi.py
)tmf620_mcp_server.py
)AI Agent → MCP Server → TMF620 API → Catalog Data
↑ ↓ ↓
Tools HTTP Calls JSON Response
Install uv
for fast dependency management:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows (PowerShell) powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Or with pip pip install uv
# Install dependencies uv sync # Start both services (two terminals) uv run tmf620-mock-server # Terminal 1 uv run tmf620-mcp-server # Terminal 2
# Windows start uv run tmf620-mock-server start uv run tmf620-mcp-server # Linux/Mac uv run tmf620-mock-server & uv run tmf620-mcp-server &
# Install dependencies pip install -r requirements.txt # Start services manually python mock_tmf620_api_fastapi.py # Terminal 1 python tmf620_mcp_server.py # Terminal 2
The system uses JSON configuration files:
config.json
- MCP Server & API Connection{ "mcp_server": { "host": "localhost", "port": 7701, "name": "TMF620 Product Catalog API" }, "tmf620_api": { "url": "http://localhost:8801/tmf-api/productCatalogManagement/v4" } }
mock_server_config.json
- Mock Server Settings{ "server": { "host": "localhost", "port": 8801, "protocol": "http" }, "features": { "enable_cors": true, "enable_docs": true, "enable_mcp": true } }
Add the following to your Claude Desktop configuration:
{ "mcpServers": { "tmf620-mcp": { "command": "uv", "args": ["run", "tmf620-mcp-server"], "cwd": "/path/to/tmf620-mcp-server" } } }
Or using traditional Python:
{ "mcpServers": { "tmf620-mcp": { "command": "python", "args": ["tmf620_mcp_server.py"], "cwd": "/path/to/tmf620-mcp-server" } } }
The MCP server provides these tools for AI agents:
list_catalogs
: List all product catalogsget_catalog
: Get a specific catalog by IDlist_product_offerings
: List product offerings (optionally filtered by catalog)get_product_offering
: Get a specific product offering by IDcreate_product_offering
: Create a new product offeringlist_product_specifications
: List all product specificationsget_product_specification
: Get a specific product specification by IDcreate_product_specification
: Create a new product specificationhealth
: Check server and API connection healthfrom tmf620_client import get_catalogs, get_product_offerings # Get all catalogs catalogs = get_catalogs() for catalog in catalogs: print(f"Catalog: {catalog['name']}") # Get offerings for a specific catalog offerings = get_product_offerings("cat-001") for offering in offerings: print(f"Offering: {offering['name']}")
Once you have the MCP server configured with your AI agent, you can ask natural language questions and the AI will automatically use the appropriate tools:
"Show me all the product catalogs"
→ AI calls tmf620.list_catalogs
"Get details for catalog cat-001"
→ AI calls tmf620.get_catalog with catalog_id=cat-001
"What product offerings are in the electronics catalog?"
→ AI calls tmf620.list_product_offerings with catalog_id
"Create a new premium service offering in catalog cat-001"
→ AI calls tmf620.create_product_offering with appropriate parameters
"Is the TMF620 system healthy?"
→ AI calls tmf620.health
Note: The AI automatically selects and calls the right tools based on your requests. No special commands needed - just ask naturally! See the "Using with Claude Desktop" section above for MCP server setup instructions.
# Test with client script uv run tmf620_client.py # Or use curl with correct port curl http://localhost:8801/tmf-api/productCatalogManagement/v4/catalog
# Check health (note: correct port 7701) curl http://localhost:7701/health
# Build wheel package uv build # Install from wheel uv pip install dist/tmf620_mcp_server-1.0.0-py3-none-any.whl
# Create production environment uv venv production source production/bin/activate # Linux/Mac # or production\Scripts\activate # Windows # Install production dependencies uv sync --frozen # Run with production server uv run uvicorn mock_tmf620_api_fastapi:app --host 0.0.0.0 --port 8801
FROM python:3.11-slim WORKDIR /app COPY . . RUN pip install uv RUN uv sync --frozen EXPOSE 8801 7701 CMD ["sh", "-c", "uv run tmf620-mock-server & uv run tmf620-mcp-server & wait"]
uv sync --group dev
# Format code uv run black . # Lint code uv run ruff check .
mock_tmf620_api_fastapi.py
tmf620_mcp_server.py
config.json
curl http://localhost:7701/health
curl http://localhost:8801/tmf-api/productCatalogManagement/v4/catalog
uv
for fast, reliable dependency managementThis project is licensed under the MIT License.