fiware-mcp-server
A First FIWARE Model Context Protocol Server
Documentation
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
cd FIWARE_MCP_012. Install the required dependencies:
pip install -r requirements.txtClaude 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 5001When 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:
3. Start your MCP server in HTTP mode (if not already running). Example:
4. Start an ngrok tunnel that forwards to your HTTP server:
(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:
Note: Keep your auth token secure. The public URL stays active while ngrok is running and will cease to be reachable when you stop the tunnel.
Available Tools
1. CB_version
2. query_CB
3. publish_to_CB
Example Usage
# 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)Configuration
The server can be configured by modifying the following parameters in `server.py`:
- Host address (HTTP mode only)
- Port number (HTTP mode only)
- Timeout settings
Error Handling
The server includes comprehensive error handling for:
- Network connectivity issues
- Invalid responses from the Context Broker
- Malformed entity data
- Server shutdown
Contributing
Feel free to submit issues and enhancement requests!
License
This project is licensed under the Apache License 2.0.
Frequently asked questions
What is fiware-mcp-server?
fiware-mcp-server is A First FIWARE Model Context Protocol Server
How do I install fiware-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is fiware-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/dncampo/FIWARE-MCP-Server and has 3 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP