it-tools-mcp
# it-tools-mcp
[](https://github.com/izbz/it-tools-mcp/actions/workflows/ci.yml)
A REST API and [MCP](https://modelcontextprotocol.io) server for a self-hosted [IT-Tools](https://github.com/CorentinTh/it-tools) instance, either the original or the extended [sharevb fork](https://github.com/sharevb/it-tools). AI assistants such as Claude, and your own scripts, can use your IT-Tools: hash text, decode JWTs, calculate subnets, explain cron expressions, and find any tool on your instance.
IT-Tools is a static web app. Every tool runs in the browser and there is no backend to call. This project adds the missing API:
- **35 tools that run on the server** and return results directly (listed in [Tools](#tools)).
- **A live catalog** of every tool on your instance (about 480 on the sharevb fork, about 90 on the original). It's read from the instance's own JavaScript bundles, so it is searchable by keyword and returns a link to open each tool. It refreshes on its own, so it stays in step when you upgrade IT-Tools.
- **One set of tool definitions** behind a REST API, an OpenAPI 3.1 spec, and an MCP server (Streamable HTTP and stdio).
- **Optional bearer-token auth**, a small Docker image with a health check, and a deploy script for Proxmox LXCs.
> Not affiliated with the IT-Tools project. IT-Tools is by [Corentin Thomasset](https://github.com/CorentinTh/it-tools); the extended fork is by [sharevb](https://github.com/sharevb/it-tools).
## Contents
- [Compatibility](#compatibility)
- [Quick start (Docker Compose)](#quick-start-docker-compose)
- [Run with Node](#run-with-node)
- [Deploy on Proxmox (LXC + Docker)](#deploy-on-proxmox-lxc--docker)
- [Connect an MCP client](#connect-an-mcp-client)
- [Tools](#tools)
- [REST API](#rest-api)
- [Configuration](#configuration)
- [How the catalog works](#how-the-catalog-works)
- [Security notes](#security-notes)
- [Development](#development)
## Compatibility
| IT-Tools build | Server-side tools | Catalog search and links |
|---|---|---|
| [sharevb/it-tools](https://github.com/sharevb/it-tools), the extended fork | ✅ | ✅ Tested with 483 tools |
| [CorentinTh/it-tools](https://github.com/CorentinTh/it-tools), the original | ✅ | ✅ Tested with 86 tools (it-tools.tech) |
The 35 server-side tools never need IT-Tools. The instance is only read for the catalog and for the links in results. Results link only to pages your build has: on the original, for example, `mac_address_format` comes back without a link. Instances served under a subpath (e.g. `https://example.lan/it-tools`) work too; include the subpath in `ITTOOLS_URL`.
## Quick start (Docker Compose)
Needs Docker with Compose, on a machine that can reach your IT-Tools instance.
```bash
git clone https://github.com/izbz/it-tools-mcp.git
cd it-tools-mcp
cp .env.example .env
```
Edit `.env`:
```ini
ITTOOLS_URL=http://192.168.1.50:8080 # your IT-Tools address, as seen from the container
API_TOKEN=paste-a-long-random-string # e.g. the output of: openssl rand -hex 24
```
Start it and check it:
```bash
docker compose up -d --build
```
```bash
curl http://localhost:8080/healthz
```
`healthz` should report `"status":"ok"` and the number of tools loaded into the catalog. If the count is 0 or there's an error, the container can't reach `ITTOOLS_URL`; see [Troubleshooting](#troubleshooting).
On older hosts with Compose v1, use `docker-compose` instead of `docker compose`.
## Run with Node
Needs Node.js 22 or newer.
```bash
npm ci
npm run build
```
```bash
ITTOOLS_URL=http://192.168.1.50:8080 API_TOKEN=change-me npm start
```
The server listens on `0.0.0.0:8080`; set `PORT` and `HOST` to change that. Use `npm run dev` to run from source with auto-reload.
## Deploy on Proxmox (LXC + Docker)
This runs the server in a small unprivileged Debian LXC next to IT-Tools. It needs about 200 MB of RAM and 1.5 GB of disk.
**1. Create the container.** Run this in the Proxmox node's shell, picking a free ID (`pvesh get /cluster/nextid`) and the Debian 12 template name that `pveam available --section system` shows:
```bash
pveam download local debian-12-standard_12.7-1_amd64.tar.zst
```
```bash
pct create 120 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
--hostname it-tools-mcp --cores 1 --memory 1024 --swap 512 \
--rootfs local-lvm:6 --net0 name=eth0,bridge=vmbr0,ip=dhcp \
--unprivileged 1 --features nesting=1,keyctl=1 --onboot 1
```
`nesting=1,keyctl=1` is what lets Docker run inside an unprivileged LXC.
**2. Install Docker** from Debian's own repositories:
```bash
pct start 120
```
```bash
pct exec 120 -- sh -c 'apt-get update && apt-get install -y docker.io docker-compose openssl'
```
**3. Deploy.** Run this from your clone, on any machine that can `ssh` to the Proxmox node with a key:
```bash
PVE_HOST=root@pve.example.lan CTID=120 ITTOOLS_URL=http://192.168.1.50:8080 ./scripts/deploy-proxmox.sh
```
The script copies the code to `/opt/it-tools-mcp` in the LXC, then builds and starts the container. On the first run it writes `.env` with your `ITTOOLS_URL` and a new random `API_TOKEN`. To print the token:
```bash
ssh root@pve.example.lan "pct exec 120 -- sed -n 's/^API_TOKEN=//p' /opt/it-tools-mcp/.env"
```
To update later, pull the latest code and run the same command; `ITTOOLS_URL` can be left out. The existing `.env`, and so the token, is kept. To rotate the token, delete `/opt/it-tools-mcp/.env` in the LXC and deploy again with `ITTOOLS_URL` set.
**4. Give it a stable address** (optional). Reserve the LXC's IP in your DHCP server, or set a static `ip=` on `net0`. Then add a DNS name for it, for example a local DNS record in Pi-hole or your router.
## Connect an MCP client
The MCP endpoint is `http://<host>:8080/mcp` (Streamable HTTP, stateless). Every client gets the same 38 tools.
### Claude Code
```bash
claude mcp add --scope user --transport http it-tools http://<host>:8080/mcp \
--header "Authorization: Bearer <your API_TOKEN>"
```
Then `claude mcp list` should show `it-tools ... ✔ Connected`. The tools appear in new sessions.
### Claude Desktop (chat)
Claude Desktop runs local MCP servers over stdio. Point it at your built copy (`npm ci && npm run build` first). Add this to `claude_desktop_config.json` (on macOS, `~/Library/Application Support/Claude/`; on Windows, `%APPDATA%\Claude\`):
```json
{
"mcpServers": {
"it-tools": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/it-tools-mcp/dist/stdio.js"],
"env": { "ITTOOLS_URL": "http://192.168.1.50:8080" }
}
}
}
```
Use absolute paths; `which node` prints the Node path. Quit and reopen Claude Desktop to load it. In this mode the tools run on your computer, so no token is needed.
### Other MCP clients
Any client that supports Streamable HTTP can connect to `/mcp` with an `Authorization: Bearer <token>` header. Clients that only support stdio can run `node dist/stdio.js` with `ITTOOLS_URL` set.
### claude.ai on the web and mobile
Custom connectors on claude.ai are called from Anthropic's servers, so they can't reach an address on your LAN. The server would need a public HTTPS URL, for example through a Cloudflare Tunnel or a reverse proxy. At the time of writing, those connectors also authenticate with OAuth rather than a fixed bearer header, which this server doesn't implement.
## Tools
### Catalog tools
| Tool | What it does |
|---|---|
| `search_it_tools` | Search every tool on your instance by keywords, optionally within a category. Returns titles, descriptions and URLs. Entries that list a `nativeTool` can be run directly through that tool. |
| `list_it_tools_categories` | List the categories with how many tools each holds. |
| `get_it_tool_link` | Get one tool's details and URL by its key, e.g. `docker-run-to-docker-compose-converter`. |
### Server-side tools
Each result includes an `itToolsUrl` that links to the same tool on your instance.
| Group | Tools |
|---|---|
| Crypto | `hash_text` (MD5, SHA-1/2/3, RIPEMD-160), `hmac`, `bcrypt` (hash or compare), `totp` (generate, verify, create a secret and `otpauth://` URI), `generate_rsa_key_pair`, `encrypt_text` (AES-256-GCM with a passphrase) |
| Generators | `generate_uuid` (v4, v7, nil), `generate_ulid`, `generate_token` (passwords and tokens from chosen character sets), `generate_qr_code` (PNG image and SVG), `generate_mac_address` |
| Encoding and text | `base64`, `url_encode`, `html_entities`, `jwt_decode` (header, payload, expiry; no signature check), `number_base_convert` (any size, bases 2 to 36), `basic_auth_header`, `case_convert`, `text_to_binary` |
| Network | `ipv4_subnet` (network, broadcast, host range, mask, membership test), `ipv4_convert`, `url_parse`, `http_status`, `user_agent_parse`, `mac_address_format` |
| Date and time | `date_convert` (ISO, Unix seconds/ms, RFC 2822, any time zone), `cron_describe` (plain English and next run times) |
| Data | `json_format`, `json_yaml_convert`, `json_to_csv`, `text_stats`, `regex_test`, `chmod_calc`, `color_convert` (hex, RGB, HSL, CMYK), `roman_numeral` |
`GET /api/tools` returns every tool with its full JSON Schema.
## REST API
When `API_TOKEN` is set, every `/api` and `/mcp` request needs `Authorization: Bearer <token>`. `/`, `/healthz` and `/openapi.json` are always open.
| Method and path | What |
|---|---|
| `GET /healthz` | Health, version and catalog status |
| `GET /openapi.json` | OpenAPI 3.1 spec (import it into Postman, Bruno, etc.) |
| `GET /api/tools` | List the server-side tools with their input schemas |
| `POST /api/tools/{name}` | Run a tool, with a JSON body of its inputs |
| `GET /api/catalog?q=&category=&limit=` | Search the catalog; an empty `q` lists everything |
| `GET /api/catalog/categories` | Categories with counts |
| `GET /api/catalog/{key}` | One catalog entry |
| `POST /api/catalog/refresh` | Re-read the catalog from IT-Tools now |
| `POST /mcp` | MCP endpoint |
Examples:
```bash
curl -s http://localhost:8080/api/tools/ipv4_subnet \
-H "Authorization: Bearer $API_TOKEN" -H 'content-type: application/json' \
-d '{"cidr":"10.0.0.0/27","contains":["10.0.0.40"]}'
```
```json
{
"ok": true,
"result": {
"cidr": "10.0.0.0/27", "netmask": "255.255.255.224", "network": "10.0.0.0",
"broadcast": "10.0.0.31", "firstHost": "10.0.0.1", "lastHost": "10.0.0.30",
"usableHosts": 30, "contains": { "10.0.0.40": false }, "...": "..."
},
"itToolsUrl": "http://192.168.1.50:8080/ipv4-subnet-calculator"
}
```
```bash
curl -s "http://localhost:8080/api/catalog?q=docker%20compose&limit=5" -H "Authorization: Bearer $API_TOKEN"
```
Invalid input returns HTTP 400 with `{"ok": false, "error": "...", "issues": {...}}`. Unknown fields are rejected.
## Configuration
| Variable | Default | |
|---|---|---|
| `ITTOOLS_URL` | *(required)* | Base URL of your IT-Tools instance. The server won't start without it. |
| `API_TOKEN` | *(unset)* | If set, `/api` and `/mcp` need `Authorization: Bearer <token>`. |
| `CATALOG_TTL` | `3600` | Seconds to cache the catalog before reading it again. |
| `PORT` | `8080` | Listen port. With Docker, change the published port in `docker-compose.yml` instead. |
| `HOST` | `0.0.0.0` | Listen address. |
## How the catalog works
IT-Tools has no catalog endpoint, so the server reads what the browser would load:
1. It fetches the instance's `index.html` to find the app's content-hashed JavaScript bundles.
2. It reads each tool's path, keywords and category, plus the English title and description, from those bundles. The two builds lay them out differently:
- **sharevb fork** (`split`): tools are in a `tools.store-*.js` chunk with their category inline, and the messages are in `i18n.plugin-*.js`.
- **Original** (`single`): everything is in the main `index-*.js`. Categories come from a separate list, and the English messages are picked out from among all the bundled languages.
3. It caches the result for `CATALOG_TTL` seconds. If a refresh fails, it keeps serving the last good copy.
The server loads the catalog at startup and logs the count. `/healthz` reports the count and which layout it found (`format`). The parsing is in `src/bundle-parser.ts`, and `test/catalog.test.ts` covers both layouts with small samples. A big upstream change to how IT-Tools builds its bundles could break parsing. The catalog tools would then return a clear error, and the server-side tools would keep working.
## Security notes
- Every tool is read-only and works only on its inputs. Nothing runs shell commands or touches files. The only outbound requests go to `ITTOOLS_URL`.
- Set `API_TOKEN` for anything beyond a single trusted machine. The token is compared in constant time. On plain HTTP it can be read off the network, so put a TLS reverse proxy in front if that matters on your LAN.
- `jwt_decode` doesn't verify signatures; it says so in every result (`signatureVerified: false`).
- `regex_test` runs the pattern it's given. A pathological pattern can keep the server busy, which is another reason to require a token.
- Request bodies are capped at 5 MB.
## Troubleshooting
- **`ITTOOLS_URL is not set`**: create `.env` from `.env.example`, or pass the variable.
- **The catalog count is 0, or catalog tools return "Could not read the IT-Tools catalog"**: the server can't reach `ITTOOLS_URL`. Inside Docker, names known only to your router or Pi-hole may not resolve. Use the IP, or uncomment `extra_hosts` in `docker-compose.yml`. Test it with `docker exec it-tools-mcp wget -qO- http://<your IT-Tools address>/ | head`.
- **`No IT-Tools app script found`**: `ITTOOLS_URL` doesn't point at IT-Tools. Check that it opens IT-Tools in a browser, including any subpath.
- **`Found the IT-Tools app ... but no tools in its bundles`**: this IT-Tools build lays its bundles out in a way the parser doesn't know yet. Please open an issue with your IT-Tools version. The server-side tools keep working meanwhile.
- **401 from `/api` or `/mcp`**: the `Authorization: Bearer` header is missing or doesn't match `API_TOKEN`.
## Development
```bash
npm ci
npm run dev # run from source with auto-reload
npm test # unit tests
npm run typecheck
npm run build
```
`ITTOOLS_URL=http://… npm test` also runs a live test against your instance. It checks that the catalog parses and, on the sharevb fork, that every server-side tool links to a page that exists.
### Adding a tool
Add a `defineTool` to a file in `src/tools/` and list it in `src/tools/index.ts`. It then appears in REST, OpenAPI and MCP:
```ts
defineTool({
name: 'slugify', // MCP tool name and REST route
title: 'Slugify a string',
description: 'Make a URL-safe slug from text.',
itToolsPath: '/slugify-string', // matching page on IT-Tools, if any
input: { text: z.string() }, // zod schema, validated for REST and MCP
run: ({ text }) => ({
result: text.normalize('NFKD').replace(/[\u0300-\u036f]/g, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, ''),
}),
}),
```
Call `fail('message')` for bad input: REST answers 400 and MCP returns `isError`. A result that contains `image: { mimeType, data }` is sent to MCP clients as an image.
### Layout
```
src/
index.ts HTTP server entry (REST + MCP)
stdio.ts stdio MCP entry for desktop clients
app.ts Express routes, auth, OpenAPI
mcp.ts MCP server: native tools + catalog tools
catalog.ts loads, caches and searches the IT-Tools catalog
bundle-parser.ts pulls the tool list out of IT-Tools' JavaScript bundles
config.ts environment settings
tools/ tool definitions, grouped by topic
scripts/ Proxmox deploy helpers
test/ vitest tests
```
## License
[MIT](LICENSE)
TDQS
Scored across 38 tools
Tools are organized around clearly distinct utility functions. Cryptography tools (hash_text, hmac, bcrypt, encrypt_text) are related but differentiated by purpose, as are generators (uuid/ulid/token/mac) and encoders/parsers, and the three meta-tools search/list/get are also distinct.
All names are snake_case and readable, but conventions vary: some are verb_noun (generate_uuid, search_it_tools), many are noun_verb (url_encode, json_format, date_convert), and several are bare nouns (hmac, base64, http_status). There is no single predictable pattern.
38 tools is heavy for an MCP surface; while each maps to a distinct IT-Tools utility and the broad toolkit scope justifies many, the selection burden is high and it exceeds the typical 3–15 range.
The surface covers a wide range of common IT utilities plus search/list/get meta-tools pointing to the full IT-Tools instance, so agents can reach non-native tools. Some utilities such as diff, lorem ipsum, or Docker conversion are only available via browser links, which is a minor gap.