FIWARE Context Broker
About
Bridges AI assistants with FIWARE Context Brokers, enabling natural language interaction with IoT data for querying, publishing, and updating information in NGSI-LD format.
Details
- Author
- dncampo
- Repository
- dncampo/FIWARE-MCP-Server
- GitHub stars
- 2
- Downloads
- 201
- License
- Apache License 2.0
- Categories
- AI, Design, Developer Tools, Search, Knowledge Base, Infrastructure, Other
Jump to
- Context Broker version checking
- Query capabilities for the Context Broker
- Entity publishing and updating
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
FIWARE Context BrokerCommand (node, npx, python, etc.)uvArguments-
Argument 1
run -
Argument 2
--with -
Argument 3
requests>=2.31.0 -
Argument 4
--with -
Argument 5
fastmcp>=0.3.0 -
Argument 6
python -
Argument 7
PATH\TO\FIWARE-MCP-Server\server.py
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
By default, running the script starts the server in STDIO mode. Use --http to start an HTTP server.
- STDIO (default):
python server.py
- HTTP mode:
python server.py --http
- HTTP host/port (optional):
python server.py --http --host 127.0.0.1 --port 5001
When running with --http, the server binds to the provided host/port and uses stateless HTTP sessions for compatibility with streamable HTTP clients.
CB_version
Checks the version of the Context Broker. Default parameters: address='localhost', port=1026. Returns: JSON string with version information.
query_CB
Queries the Context Broker. Parameters: address (default: 'localhost'), port (default: 1026), query (default: ''). Returns: JSON string with query results.
publish_to_CB
Publishes or updates entities in the Context Broker. Parameters: address (default: 'localhost'), port (default: 1026), entity_data (required: dictionary with entity information). Returns: JSON string with operation status.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"fiware context broker": {
"cwd": "optional",
"env": {},
"args": [
"run",
"--with",
"requests>=2.31.0",
"--with",
"fastmcp>=0.3.0",
"python",
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
],
"shell": false,
"command": "uv"
}
}
}
Linux
{
"cwd": "optional",
"env": [],
"args": [
"run",
"--with",
"requests>=2.31.0",
"--with",
"fastmcp>=0.3.0",
"python",
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
],
"shell": false,
"command": "uv"
}
Macos
{
"cwd": "optional",
"env": [],
"args": [
"run",
"--with",
"requests>=2.31.0",
"--with",
"fastmcp>=0.3.0",
"python",
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
],
"shell": false,
"command": "uv"
}
Windows
{
"cwd": "optional",
"env": [],
"args": [
"run",
"--with",
"requests>=2.31.0",
"--with",
"fastmcp>=0.3.0",
"python",
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
],
"shell": false,
"command": "uv"
}
FIWARE MCP Server


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.
Objectives
- Create a basic MCP server implementation for FIWARE
- Provide simple tools for Context Broker interaction
- Demonstrate basic intent CRUD operations with the Context Broker
- Serve as a foundation for more complex MCP implementations
Features
- Context Broker version checking
- Query capabilities for the Context Broker
- Entity publishing and updating
Prerequisites
- Python 3.7 or higher
- pip (Python package installer)
- Access to a FIWARE Context Broker instance
Installation
1. Clone this repository:
git clone <repository-url>
cd FIWARE_MCP_01
2. Install the required dependencies:
pip install -r requirements.txt
Claude Desktop integration
Claude Desktop should launch the server via STDIO. Do not use “mcp install” or “mcp run” with this server.
Example configuration (adjust paths for your environment):
{
"mcpServers": {
"CB-assistant": {
"command": "uv",
"args": [
"run",
"--with",
"requests>=2.31.0",
"--with",
"fastmcp>=0.3.0",
"python",
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
]
}
}
}
Alternative if dependencies are installed with pip:
{
"mcpServers": {
"CB-assistant": {
"command": "python",
"args": [
"PATH\\TO\\FIWARE-MCP-Server\\server.py"
]
}
}
}
Usage
By default, running the script starts the server in STDIO mode. Use --http to start an HTTP server.
- STDIO (default):
python server.py
- HTTP mode:
python server.py --http
- HTTP host/port (optional):
python server.py --http --host 127.0.0.1 --port 5001
When running with --http, the server binds to the provided host/port and uses stateless HTTP sessions for compatibility with streamable HTTP clients.
Redirecting with ngrok (HTTP mode)
To use LLMs via external APIs (for example the OpenAI Responses API) you may need to expose your local MCP server to the Internet. Use ngrok to create a public HTTPS tunnel to the server when running in HTTP mode.
1. Sign up at https://ngrok.com and install the ngrok client for your OS.
2. Add your ngrok auth token to the client (follow ngrok's OS-specific setup). For example:
- ngrok (v3) config command: ngrok config add-authtoken <YOUR_AUTH_TOKEN>
3. Start your MCP server in HTTP mode (if not already running). Example:
- python server.py --http --host 127.0.0.1 --port 5001
4. Start an ngrok tunnel that forwards to your HTTP server:
- ngrok http http://127.0.0.1:5001
(replace host/port if you configured them differently)
5. Once ngrok is running it will display one or more public forwarding URLs. The MCP endpoint will be reachable at:
- {PUBLIC_URL}/mcp
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




