Sensifai NGSI MCP – Community Edition
Officialby Sensifai-BV
README.md
# Sensifai NGSI MCP – Community Edition
**English** | [Deutsch](README.de.md) | [Français](README.fr.md)
[](LICENSE)
[](https://github.com/Sensifai-BV/ngsi-mcp-community/actions/workflows/ci.yml)


Sensifai NGSI MCP is an open-source [Model Context Protocol](https://modelcontextprotocol.io) server that connects AI assistants to FIWARE context data. Claude, ChatGPT, Gemini, VS Code, Cursor and Ollama-based agents can use it to discover NGSI-LD and NGSI-v2 brokers, query entities and their history, inspect IoT Agents and devices, and walk digital-twin relationships. Every call goes through OAuth 2.1, role and tenant checks and an audit log. Writes are possible, but only after an administrator turns them on, and each write needs explicit confirmation and a human approval in the web console.
## Features
- **Brokers:** Orion-LD, Scorpio and Stellio (NGSI-LD), Orion (NGSI-v2) with QuantumLeap time series, and FIWARE IoT Agents. Each broker's capabilities are probed, never assumed.
- **36 MCP tools and 3 resources:** discovery, entity and geo queries, temporal queries and aggregations, subscriptions, live broker events, governed writes, IoT device diagnostics, relationship graphs and asset hierarchies, offline Smart Data Models, query planning, change preview and verification.
- **Governed writes:** read-only by default, with permission switches per installation and per broker. Viewers can never write, and every write needs a single-use human approval bound to the SHA-256 of the payload.
- **Security:** OAuth 2.1 resource server for `/mcp` (audience binding, JWKS, scopes `ngsi:read`/`ngsi:write`), OIDC console sign-in with PKCE, tenant isolation, SSRF protection with connect-time IP checks, secret references instead of stored credentials, and an offline JSON-LD context allowlist.
- **Web console** in English, German and French for connections, permissions, approvals, team, audit and settings.
- **Operations:** Docker, Docker Compose and Helm, PostgreSQL with Alembic migrations, Prometheus metrics, OpenTelemetry and structured JSON logs.
- **Architecture:** Python 3.13/3.14, FastAPI, the official MCP SDK and a hexagonal design (`domain`, `ports`, `application`, `adapters`).
## Quickstart
```bash
git clone https://github.com/Sensifai-BV/ngsi-mcp-community.git
cd ngsi-mcp-community
docker compose -f deploy/compose/docker-compose.yml up -d postgres
uv sync && uv run alembic upgrade head
(cd web && npm ci && npm run build)
# set the environment variables from docs/en/quickstart.md, then:
uv run contextbridge --transport http
```
Open <http://127.0.0.1:8000>, sign in through your OIDC provider, add a broker under **Connections**, and point your AI client at `http://127.0.0.1:8000/mcp`. A single developer without an identity provider can let Claude Desktop or an IDE run the server locally over STDIO (`contextbridge --transport stdio` with `MCP_AUTH_MODE=stdio_local`).
The **[Quickstart](docs/en/quickstart.md)** has the full walkthrough, including Docker Compose and Claude Desktop.
## Documentation
| | |
|---|---|
| [Overview and architecture](docs/en/index.md) | [Features](docs/en/features.md) |
| [Quickstart](docs/en/quickstart.md) | [MCP tools reference](docs/en/mcp-tools.md) |
| [Installation (Compose, Helm, OIDC)](docs/en/installation.md) | [Connecting AI clients](docs/en/connecting-ai-clients.md) |
| [Configuration](docs/en/configuration.md) | [Security](docs/en/security.md) |
| [Operations](docs/en/operations.md) | [Editions](docs/en/editions.md) |
| [FAQ and troubleshooting](docs/en/faq.md) | |
## Editions
- **Community Edition** (this repository): Apache-2.0, free to self-host. It is the complete read, temporal and governed-write bridge for one team: 1 organization, 1 workspace, 5 seats, 3 brokers and 1 IoT Agent, with unlimited MCP calls and a 30-day audit retention period.
- **Business Edition**: commercial, hosted by Sensifai or self-hosted under license. It adds four-eyes approvals (the approver must be a different person), federated queries across many brokers, IoT device actuation, ABAC attribute redaction, external OPA and ODRL policies, audit export, unlimited organizations, brokers and seats, and support from Sensifai.
See [Editions](docs/en/editions.md), or contact us at <https://sensifai.com/en/contact>.
## Contributing
Contributions are welcome. [CONTRIBUTING.md](CONTRIBUTING.md) covers the development setup, coding standards and pull-request process. This project follows a [Code of Conduct](CODE_OF_CONDUCT.md).
## Security
Please do not report vulnerabilities in public issues. Email **security@sensifai.com** instead, as described in [SECURITY.md](SECURITY.md).
## License
Licensed under the [Apache License, Version 2.0](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues