iTop MCP server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
iTop MCP server
An MCP server for iTop, built and run as a Docker container on your own machine. MCP clients such as LibreChat use it to let users read tickets and CIs from iTop through an AI assistant.
Read-only. The tools only read from iTop. There are no tools that create or change data.
Every call runs with the caller's own iTop token. iTop (with the altioo-oauth-server extension) is the authorization server: it logs the user in and issues the token. The MCP server forwards that token to iTop's REST/JSON API, so each user sees exactly what iTop allows them to see. The server stores no user secrets, issues no tokens and keeps no state between requests.
Plain HTTP on
127.0.0.1. Your existing reverse proxy terminates TLS in front of it.Audit log as JSON lines in a host folder. Tokens never appear in any log.
Based on cdmx-in/itop-mcp (MIT).
Contents
Related MCP server: dms-mcp-server
Prerequisites on the iTop side
Prepare iTop before you start the container:
iTop prerequisites (required for every customer): the altioo-oauth-server extension,
allow_rest_services_via_tokens, the profiles that may use the assistant, the resource entry, web server rewrites and a check list.Example setup: Keycloak and LibreChat (optional): one way to log into iTop through an identity provider and to connect an MCP client.
Test stack (test only, not for production): both manuals on one Docker host, set up automatically, with a command that runs their check lists.
One thing to get exactly right: in config-itop.php, the altioo-oauth-server resource
resources → itop-mcp → url must be identical, character by character, to
MCP_RESOURCE_URL of this server (same scheme, host, port and path, no extra trailing slash). A
mismatch does not show up as a server error. The OAuth flow starts, the user logs in, and iTop then
says "Unknown resource".
Requirements on the Docker host
Docker with the Compose plugin (
docker compose)gitInternet access to Docker Hub and PyPI while building (the image is built on your machine)
A reverse proxy that terminates TLS (see Reverse proxy)
The container must reach iTop over HTTPS
Install
# 1. Get a released version
git clone <repository URL> itop-mcp-server
cd itop-mcp-server
git checkout v0.1.0
# 2. Configure: set ITOP_BASE_URL and MCP_RESOURCE_URL
cp .env.example .env
${EDITOR:-vi} .env
# 3. Prepare the log folder BEFORE the first start
mkdir -p logs && sudo chown 10001:10001 logs
# 4. Build and start
docker compose up -d --build
# 5. Check health
docker compose ps # STATUS shows "(healthy)" after a few seconds
curl -si http://127.0.0.1:8130/mcp -X POST | head -n 1 # HTTP/1.1 401 Unauthorized
curl -s http://127.0.0.1:8130/.well-known/oauth-protected-resource/mcp # your resource URL and issuerStep 3 matters: the container runs as UID 10001 and writes the audit log to ./logs. If the folder
is missing, Docker creates it as root, and the container stops right after starting and restarts in
a loop (see Troubleshooting). If you set MCP_LOG_DIR to another folder,
prepare that one instead.
The metadata path in step 5 is /.well-known/oauth-protected-resource followed by the path of
MCP_RESOURCE_URL (here /mcp). Then put the reverse proxy in front and run the
check list against the public URL.
Configuration
All settings live in .env next to compose.yaml. .env.example lists each one
with a comment. The container refuses to start when a required value is missing or invalid, and
docker logs names the variable.
Server settings (passed into the container):
Variable | Required | Default | Meaning |
| yes | Base URL of your iTop, without a trailing slash, e.g. | |
| yes | Public URL of this server as MCP clients reach it through the reverse proxy, e.g. | |
| no |
| Issuer of the authorization server. Set it only for a non-standard altioo path or a different public iTop host name. |
| no |
| iTop REST API version |
| no |
| Maximum number of rows a single tool call fetches from iTop |
| no | CA bundle inside the container for an internal CA, see Internal CA |
Docker compose settings (read by docker compose itself, only from .env or the shell):
Variable | Default | Meaning |
|
| Host port, published on |
|
| Host folder for the audit log. Must be writable by UID 10001. |
Inside the container (normally leave alone):
Variable | Default | Meaning |
|
| Audit log path inside the container. Keep it in |
|
| Fixed by |
After changing .env, apply it with docker compose up -d.
Reverse proxy (TLS)
The container speaks plain HTTP on 127.0.0.1:8130 (or MCP_PUBLISH_PORT). Your reverse proxy
terminates TLS on the public host name from MCP_RESOURCE_URL and forwards to that port. It must:
forward both
/mcpand/.well-known/oauth-protected-resource/mcp(MCP clients fetch the metadata there); forwarding the whole host is simplestpass the public
Hostheader through. The server only accepts its public host name (fromMCP_RESOURCE_URL) and loopback. A request with any other host gets401without a token and421 Misdirected Requestwith a valid one. Likewise, anOriginheader (sent by browser-based clients) must be the origin ofMCP_RESOURCE_URLor loopback, otherwise the request gets403. Letter case does not matter, and the default port (443forhttps,80forhttp) may be present or left out, both in theHostheader and inMCP_RESOURCE_URL(which must still match theitop-mcpresource in iTop character for character). A non-default port, as inhttps://mcp.example.com:8443/mcp, must be in theHostheader (mcp.example.com:8443).pass the
Authorizationheader through unchanged
nginx:
server {
listen 443 ssl;
http2 on;
server_name mcp.example.com;
ssl_certificate /etc/ssl/mcp.example.com/fullchain.pem;
ssl_certificate_key /etc/ssl/mcp.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8130;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s; # each iTop request may take up to 60 s; raise this if iTop is slow
}
}Apache (mod_proxy, mod_proxy_http, mod_ssl):
<VirtualHost *:443>
ServerName mcp.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/mcp.example.com/fullchain.pem
SSLCertificateKeyFile /etc/ssl/mcp.example.com/privkey.pem
ProxyPreserveHost On
ProxyTimeout 120
ProxyPass / http://127.0.0.1:8130/
ProxyPassReverse / http://127.0.0.1:8130/
</VirtualHost>If the proxy runs on another machine, it cannot reach 127.0.0.1 on the Docker host. In that case
publish the port on an internal interface in a compose.override.yaml and restrict access to the
proxy with your firewall; never expose the plain HTTP port to the network at large.
Internal CA
If iTop's HTTPS certificate is issued by your own certificate authority, mount the CA bundle (PEM)
read-only and point SSL_CERT_FILE at it. Certificate verification is never turned off.
Put the bundle on the host, e.g.
certs/internal-ca.pem, readable by UID 10001 (chmod 644 certs/internal-ca.pem).Create
compose.override.yamlnext tocompose.yaml(socompose.yamlstays unchanged forgit pull; compose reads the override automatically):services: itop-mcp-server: volumes: - ./certs/internal-ca.pem:/etc/itop-mcp/ca.pem:roIn
.env:SSL_CERT_FILE=/etc/itop-mcp/ca.pemdocker compose up -d
The bundle replaces the built-in list of public CAs. It must contain the CA that issued iTop's
certificate (the root, plus intermediates if iTop does not send them). With a wrong bundle, every
request gets 401 and docker logs shows a failed token check
(Token-Pruefung fehlgeschlagen … iTop nicht erreichbar). If the file named in SSL_CERT_FILE
is missing or unreadable in the container, the log shows
Token-Pruefung fehlgeschlagen … No such file or directory (or Permission denied) instead.
Update and rollback
Releases are git tags vX.Y.Z. The image is tagged with the same version (itop-mcp-server:X.Y.Z),
so docker image ls itop-mcp-server shows which versions are built on the host.
Update to a new release:
git fetch --tags
git checkout v0.2.0 # the new tag
docker compose up -d --build
docker compose ps # wait for "(healthy)"If you follow a branch instead of tags, git pull followed by docker compose up -d --build does
the same.
Roll back to the previous release:
git checkout v0.1.0 # the previous tag
docker compose up -d --buildThe server keeps no state, so nothing needs migrating either way. .env, compose.override.yaml,
logs/ and certs/ are not tracked by git and stay as they are. Read the release notes of the new
version for new or changed settings in .env.example.
Audit log
Every tool call appends exactly one line to logs/mcp-itop-audit.log on the host (MCP_LOG_DIR):
also calls the server refuses before they reach iTop, calls where iTop is unreachable or answers
with an error, and calls that are cancelled while they run (for example when the server shuts
down). The file survives container recreation and updates.
{"ts": "2026-11-23T09:14:02", "user": "Jane Doe", "token": "3f9a1c0e7b2d", "tool": "search_tickets", "args": {"text": "printer", "status": "", "class": "UserRequest"}, "ok": true, "info": ""}Field | Meaning |
| Time of the call in the container's time zone (UTC unless you set |
| iTop person the token belongs to; |
| Short, non-reversible hash of the token, to tell sessions apart. Never the token itself. |
| Tool name |
| Tool arguments; long token-like strings are masked as |
|
|
| Empty when |
How ok is decided, for every tool alike:
Refused input (for example an
oql_querythat is not a singleSELECT):okisfalse.No iTop request at all (for example a
smart_query_v2comparison the tool cannot run):okisfalse, andinfostarts withkein iTop-Aufruf:followed by the first line of the answer.One of several iTop requests failed (for example one half of a
smart_query_v2comparison):okisfalseandinfonames the first error, even if the tool still answered. The server cannot tell whether a tool recovered from the error or only wrote it into its text.whoami: the person lookup is the tool's only iTop request, so a failed lookup givesokfalse(anduser?).Cancelled:
okisfalse,infoisabgebrochen. The iTop request may already have run.The lookup of
userfor the audit line is a separate iTop request and does not count.
Rotation is your job. The server only appends and never rotates or deletes the file. Use
logrotate with copytruncate (the server keeps no file handle open between calls, but
copytruncate is the safe choice), and keep the files as long as your audit rules require.
The application log (startup, rejected tokens, errors) goes to stdout:
docker compose logs itop-mcp-server. It contains no tokens either, only the same short hash.
Tools and the per-user token model
The MCP client fetches a token for the user from iTop (OAuth with iTop's login and consent page) and
sends it as Authorization: Bearer … with every request. The server checks the token with iTop on
every request (no cache), then calls iTop's REST/JSON API with it in the Auth-Token header. A
request without a valid token gets 401 with a WWW-Authenticate header that points the client to
the protected-resource metadata and from there to iTop.
An expired or revoked token is refused as soon as iTop refuses it.
All tools are read-only. Results are capped at MCP_MAX_ROWS rows.
Tool | What it does |
| Names the iTop person the assistant is acting as |
| Searches tickets by text (title and reference), status and class ( |
| Reads one ticket by reference (e.g. |
| Runs a single OQL |
| From upstream: turns a natural-language question into an iTop query |
| From upstream: lists the operations of iTop's REST API |
Troubleshooting
The container restarts in a loop, docker compose ps never shows "healthy". Look at
docker compose logs itop-mcp-server. The line iTop MCP-Server auf … is logged before the start-up
checks and does not mean a successful start; look at the lines after it.
Message | Cause and fix |
| With the default configuration: the host folder |
| The required value is missing in |
| Use the full public URL, e.g. |
Every request gets 401, even with a token. docker logs shows why the token check failed:
Token abgelehnt means iTop refused the token (expired, revoked, or the user's profile may not use
tokens); Token-Pruefung fehlgeschlagen … iTop nicht erreichbar means the container cannot reach
iTop (network, proxy, or certificate, see Internal CA).
421 Misdirected Request through the reverse proxy (once the client sends a valid token). The
proxy does not pass the public Host header, or MCP_RESOURCE_URL names another host. See Reverse proxy.
The OAuth flow ends with "Unknown resource" in iTop. MCP_RESOURCE_URL and the itop-mcp
resource in config-itop.php differ. See Prerequisites on the iTop side.
More checks with expected output: check list.
Licences
This repository is licensed under the MIT licence, see
LICENSE.This server is a fork of cdmx-in/itop-mcp, which is under the MIT licence too. The upstream licence is kept in
LICENSE-upstream-itop-mcp. Both licence files are installed into the image.altioo-oauth-server is licensed under the GNU AGPL-3.0-or-later. It is not part of this repository: it runs inside your iTop, and you obtain it from Altioo BV. Read its terms before you install or offer it. The other iTop extensions and their licences are listed in iTop prerequisites → Licences.
Development
The tests run without Docker and without a real iTop: they start the server against a small fake
iTop and talk to it over HTTP like an MCP client. They need Python 3.13 on Linux (requirements.lock
is resolved for Linux); on Windows, run them in a Linux container or VM.
python -m venv .venv
.venv/bin/pip install --no-deps -r requirements.lock -r requirements-build.lock
.venv/bin/pip install --no-deps --no-build-isolation -e .
.venv/bin/pip install pytest==8.4.2
.venv/bin/pytestThe container smoke test needs a Docker host. It builds the image, starts it next to a fake iTop
and checks it from outside, without touching your .env or ./logs:
scripts/smoke-test.shReleasing: set __version__ in src/itop_mcp_server/__init__.py and the image tag in compose.yaml
to the same version (a test checks this), run both test suites, then tag vX.Y.Z.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
One governed MCP endpoint for 40+ business systems. Read-only, source-cited answers.
Unofficial remote MCP server for Less Annoying CRM: OAuth 2.1, read-only grants, 10 tools.
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceA read-only MCP server that enables AI assistants to query ServiceNow instances—incidents, changes, users, CMDB—with malformed query linting and injection protection.7MIT
- AlicenseAqualityBmaintenanceRead-only MCP server that lets AI clients query DMS repositories through a local bridge, supporting tools for health checks, listing connections and items, retrieving item info, and reading documents. Credentials are handled securely via a separate broker.7MIT
- AlicenseNot gradedqualityCmaintenanceA read-only MCP gateway that enables AI agents to retrieve business data (sales, appointments, clients, inventory, etc.) from the AURON Suite backend with role-based access control, audit logging, and rate limiting.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude Code and Copilot Studio to read, and when permitted write or delete, records across every documented resource of the IT Glue API, while password-related data is always refused and stripped. Runs in Docker or over stdio with configurable read/write/delete policies, per-organisation write allow-lists, restricted-record withholding, and Microsoft Entra ID sign-in.MIT