FIWARE Context Bridge
STDIOBridge between Context Broker and other services, implementing basic operations.
Bridge between Context Broker and other services, implementing basic operations.
This is a first implementation of a FIWARE Model Context Protocol (MCP) Server that provides a bridge between the Context Broker and other services. The server implements basic operations for interacting with a FIWARE Context Broker.
git clone <repository-url> cd FIWARE_MCP_01
pip install -r requirements.txt
mcp install server.py # Custom name mcp install server.py --name "FIWARE MCP Server" # Environment variables, if any mcp install server.py -v API_KEY=abc123 -v DB_URL=postgres://... mcp install server.py -f .env
Start the MCP server:
python server.py # or mcp run server.py
The server will start on 127.0.0.1:5001
by default.
CB_version
query_CB
publish_to_CB
# Example entity data entity_data = { "id": "urn:ngsi-ld:TemperatureSensor:001", "type": "TemperatureSensor", "temperature": { "type": "Property", "value": 25.5 }, "@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" } # Publish to Context Broker result = publish_to_CB(entity_data=entity_data)
The server can be configured by modifying the following parameters in server.py
:
The server includes comprehensive error handling for:
Feel free to submit issues and enhancement requests!
This project is licensed under the Apache License 2.0.