Skip to main content
Glama
5dSimon

RIB iTWO 4.0 MCP Server

by 5dSimon

RIB iTWO 4.0 MCP Server

Read-only MCP server for accessing the SQL Server database of a RIB iTWO 4.0 instance.

Tools

  • list_schemas – list all schemas

  • list_tables(schema) – tables/views of a schema

  • search_tables(keyword) – search tables across all schemas by name

  • describe_table(schema, table) – columns, types, nullability

  • run_query(sql) – any SELECT statement (read-only enforced)

Related MCP server: mcp-sqlserver-readonly

Setup

  1. Install ODBC driver: Install Microsoft ODBC Driver 18 for SQL Server for Windows.

  2. Create DB user: Create a login on the SQL Server with the db_datareader role (read-only) for the iTWO database. Server-side permissions are the actual safeguard – the query filtering in the server is only an additional layer of protection.

  3. Install dependencies:

    cd "C:\Users\schol\Desktop\MCP Datenbank"
    python -m venv .venv
    .venv\Scripts\Activate.ps1
    pip install -e .
  4. Configuration: Copy .env.example to .env and enter your credentials.

    Copy-Item .env.example .env
  5. Test locally:

    python -m rib_itwo_mcp.server

Deployment on Coolify

The server runs as an HTTP service (transport streamable-http) so that Claude can connect remotely. The ODBC driver is bundled in the Dockerfile; a DB client does not need to be installed on the Coolify host itself.

  1. Push the repo to Git (GitHub/GitLab etc.).

  2. In Coolify, create a new Application from this repo, build pack: Dockerfile.

  3. Set environment variables in Coolify (from .env.example):

    • DB_SERVER, DB_NAME, DB_USER, DB_PASSWORD

    • DB_DRIVER=ODBC Driver 18 for SQL Server

    • DB_TRUST_SERVER_CERTIFICATE=yes (or no, if a valid certificate is available)

    • DB_ALLOWED_SCHEMAS, DB_MAX_ROWS optional

    • MCP_AUTH_TOKENrequired, a long random secret (openssl rand -hex 32), since otherwise the endpoint is openly accessible on the network

  4. Expose port 8000 or map the Coolify proxy/domain to it. The health check path is /health.

  5. Deploy. The SQL Server must be reachable from the Coolify host over the network (adjust firewall/security group if necessary, port 1433).

Add as a connector in Claude (remote/HTTP)

Once the app is reachable at e.g. https://rib-itwo-mcp.deine-domain.de:

claude mcp add --transport http rib-itwo https://rib-itwo-mcp.deine-domain.de/mcp --header "Authorization: Bearer <dein-MCP_AUTH_TOKEN>"

(In the Claude Desktop/web interface, enter it accordingly as a "Custom Connector" with URL + bearer token.)

Locally as a stdio connector (alternative without Coolify)

For purely local use without HTTP, MCP_TRANSPORT=stdio can be set:

claude mcp add rib-itwo -e MCP_TRANSPORT=stdio -- "C:\Users\schol\Desktop\MCP Datenbank\.venv\Scripts\python.exe" -m rib_itwo_mcp.server

Security

  • run_query allows only single SELECT/WITH statements, blocks multiple statements as well as write/administrative keywords.

  • Additionally, the DB user itself should only have read permissions (db_datareader), so that the protection does not rely solely on query filtering.

  • Optionally, access can be restricted to specific schemas via DB_ALLOWED_SCHEMAS.

  • DB_MAX_ROWS limits the result set per query.

  • For HTTP deployment (Coolify), MCP_AUTH_TOKEN is the only access barrier in front of the endpoint — if no token is set, the server is open to anyone with network access. Additionally, ensure TLS via the Coolify proxy/a domain so that the token is not transmitted in plain text.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-only SQL Server MCP server enabling safe database queries, table listing, and schema inspection with built-in security protections.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying multiple SQL Server, Azure SQL, or Synapse databases through a single MCP interface, with support for read-only targets and various authentication methods.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables read-only SQL querying and schema inspection across MSSQL, PostgreSQL, and MySQL databases via MCP tools.
    -