io.github.cyanheads/toolkit-mcp-server
io.github.cyanheads/toolkit-mcp-server · 18 stars · TypeScript · Apache-2.0
MCP server Generate IDs, QR codes, and hashes, encode values, geolocate IPs, plus gated host diagnostics.
Install
The repo has no one-line install. Follow its README.
Published as
- npm
@cyanheads/toolkit-mcp-serverstdio · Streamable HTTP - Remote
https://toolkit.caseyjhand.com/mcpStreamable HTTP
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
MCP_LOG_LEVELOptional | Env var | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). |
TOOLKIT_ENABLE_NET_DIAGNOSTICSOptional | Env var | Register the gated toolkit_check_network tool. Off by default — leave off for hosted/shared deployments. |
TOOLKIT_ENABLE_SYSTEM_INFOOptional | Env var | Register the gated toolkit_check_system tool. Off by default — only meaningful on a local deployment. |
TOOLKIT_ALLOW_PRIVATE_NETWORKOptional | Env var | With network diagnostics enabled, permit private/reserved/loopback targets. The second explicit gate; off by default. |
TOOLKIT_GEO_API_KEYOptional · Secret | Env var | API key for the geolocation endpoint, if it requires one. The default ip-api tier is keyless. |
TOOLKIT_GEO_BASE_URLOptional | Env var | Base URL for an ip-api-compatible geolocation endpoint. Default is the keyless ip-api endpoint, which is plaintext HTTP. |
TOOLKIT_GEO_CACHE_TTL_SECONDSOptional | Env var | Geolocation cache TTL in seconds. Geolocation is stable, so repeats are cached. |
TOOLKIT_GEO_RATE_LIMIT_PER_MINOptional | Env var | Max geolocation requests per minute; excess requests are rejected with a retryable rate-limit error. Default 45 matches the ip-api free tier. |
MCP_TRANSPORT_TYPEOptional | Env var | Selects the HTTP transport. |
MCP_HTTP_HOSTOptional | Env var | The hostname for the HTTP server. |
MCP_HTTP_PORTOptional | Env var | The port to run the HTTP server on. |
MCP_HTTP_ENDPOINT_PATHOptional | Env var | The endpoint path for the MCP server. |
MCP_AUTH_MODEOptional | Env var | Authentication mode to use: 'none', 'jwt', or 'oauth'. |
Files
@cyanheads/toolkit-mcp-server
Generate random IDs, QR codes, and hashes, encode and decode values, and geolocate IPs, plus gated network and system diagnostics, via MCP. STDIO or Streamable HTTP.
7 ToolsPublic Hosted Server: https://toolkit.caseyjhand.com/mcp
Overview
Developer utilities that run in-process: generate identifiers, QR codes, and cryptographic digests, and encode or decode values. Geolocating a public IP or hostname is the one outbound call, and two host-diagnostic tools stay off unless enabled. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
| Tool | Description |
|---|---|
toolkit_hash_value |
Generate a digest (sha256/sha384/sha512/sha1/md5) as hex, base64, or SRI, or constant-time-compare a value against an expected digest |
toolkit_generate_id |
Mint cryptographically random UUIDv4, UUIDv7, or ULID identifiers, up to 1000 per call |
toolkit_generate_qr |
Encode text or a URL as a QR code in SVG, base64 PNG, or terminal half-blocks |
toolkit_encode_value |
Encode or decode base64, base64url, hex, or URL percent-encoding |
toolkit_geolocate_ip |
Resolve a public IP or hostname to country, city, coordinates, ASN, and timezone |
toolkit_check_network |
Gated, off by default. Ping, traceroute, TCP connectivity, or egress-IP check from the server host |
toolkit_check_system |
Gated, off by default. OS, CPU, memory, load average, or network interfaces of the server host |
Capability reference
toolkit_hash_value tool
valueread perinputEncoding(utf8default,hex,base64);algorithmissha256(default),sha384, orsha512, withsha1andmd5for checksum compatibility only;operationisgenerateorcompare, and when omitted it compares ifexpectedis sentgeneratereturnsdigestindigestEncoding(hexdefault,base64, orsrifor the SHA-2 algorithms) pluslengthInBytes;comparereturnsmatchesagainstexpected, given as hex, base64, or SRI, including a multi-entry npmintegrityvalue- A bad
expectedfails asexpected_malformed,expected_length_mismatch(the hint names the algorithm that length fits), orexpected_algorithm_mismatch
toolkit_generate_id tool
typeisuuid_v4(default),uuid_v7, orulid;countis 1–1000 (default 1)idsalways holds exactlycountvalues;uuid_v7andulidbatches are strictly increasing even within one millisecond, with random gaps so no id is derivable from another
toolkit_generate_qr tool
dataup to 2953 UTF-8 bytes aterrorCorrectionL, less atM(default),Q, andH;formatissvg(default),png_base64, orterminal;margin0–20 modules (default 4),scale1–32 px per module (default 4)- Returns
content, the symbolversion(1–40),mimeTypefor image formats, andbyteLengthfor PNG;png_base64also arrives as an MCP image block, andterminalis plain Unicode half-blocks drawn for a dark background - Over-capacity input fails as
data_too_largewith its byte count; a PNG over 2048 px per side fails asraster_too_largewith a scale that fits, whilesvgandterminalhave no pixel cap
toolkit_encode_value tool
operation(encodeordecode) andencoding(base64,base64url,hex,url) are required; whitespace inhex,base64, andbase64urlinput is ignored, so wrapped MIME and PEM bodies decode as-is- Decode returns
resultasutf8text unlessoutputEncodingasks forhexorbase64, which returns the bytes losslessly and transcodes between encodings; malformed input fails asdecode_failed, and binary bytes asdecode_not_utf8rather than with replacement characters
toolkit_geolocate_ip tool
targetis an IPv4/IPv6 address or a dotted hostname, DNS-resolved first; private or reserved addresses fail asprivate_target, unresolvable hostnames asunresolvable_host- Returns
country,countryCode,region,city,latitude/longitude,asn,org, andtimezonewithresolvedIpandsource; atrueinproxy,hosting, ormobilemeans the location describes infrastructure, not a person - Keyless ip-api free tier over plaintext HTTP by default (
TOOLKIT_GEO_BASE_URL,TOOLKIT_GEO_API_KEY); results are cached per resolved IP and provider calls are rate-limited
toolkit_check_network tool
modeisping,traceroute,connectivity, orpublic_ip;targetis required except forpublic_ip, andport(1–65535) forconnectivity;count1–10 pings (default 3),timeoutMs100–30000 (default 3000)- A silent host is
reachable: false, not an error;pingaddsrttMs,sent,received, andpacketLossPercent,connectivityaddsoutcome(open,refused,timeout,unreachable), andtraceroutereturnshops; an unresolvable host or a ping/traceroute binary that can't run fails asunreachable - Registered only when
TOOLKIT_ENABLE_NET_DIAGNOSTICS=true; private and reserved targets fail asprivate_target_blockedunlessTOOLKIT_ALLOW_PRIVATE_NETWORK=true
toolkit_check_system tool
whatisos,cpu,memory,load, orinterfaces; exactly one matching facet object is populatedmemory.availableBytesis the allocation headroom andlimitBytesappears under a container memory limit;totalBytes,freeBytes, andusedBytesare raw OS figures that count reclaimable cache as used- Registered only when
TOOLKIT_ENABLE_SYSTEM_INFO=true, sinceosandinterfacesdisclose host topology and version details
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Toolkit-specific:
- Hashing, ID minting, QR encoding, and encode/decode run in-process on
node:cryptoand theqrcodelibrary, with no upstream calls - Geolocation calls the provider, never the target, and checks the DNS-resolved IP against private ranges, so a hostname can't reach an internal address
- Fail-closed gating:
toolkit_check_networkandtoolkit_check_systemare absent fromtools/listunless enabled. Both report on the server's host, not the caller's, so they belong on local or self-hosted deployments - Two-tier network gate: with diagnostics on, private, loopback, link-local, and reserved targets (the cloud-metadata endpoint included) stay blocked until
TOOLKIT_ALLOW_PRIVATE_NETWORK=true
Agent-friendly output:
- Provenance: geolocation echoes
resolvedIpandsource, and omits fields the provider didn't report instead of inventing them - Response shaping: provider strings are capped at 256 characters and stripped of control characters, so registry-controlled text like
orgcan't flood or format a model's context - Discriminated outputs:
operation,format,mode, andwhatecho what ran, and only that branch's fields are populated - Typed failures: every declared failure carries a
reasonand a recovery hint, and conflicting inputs (expectedwithgenerate,outputEncodingwithencode) are rejected by name, not ignored
Getting started
Public Hosted Instance
A public instance is available at https://toolkit.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "streamable-http",
"url": "https://toolkit.caseyjhand.com/mcp"
}
}
}
Self-Hosted / Local
Add the following to your MCP client configuration file. No API key is required.
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/toolkit-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/toolkit-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/toolkit-mcp-server:latest"]
}
}
}
To enable the gated host-probing tools, add their flags to env (or -e for Docker):
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"TOOLKIT_ENABLE_NET_DIAGNOSTICS": "true",
"TOOLKIT_ENABLE_SYSTEM_INFO": "true"
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http # Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.4.0 or higher (or Node.js v24+).
- No API key needed — geolocation uses the keyless ip-api free tier by default.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/toolkit-mcp-server.git
- Navigate into the directory:
cd toolkit-mcp-server
- Install dependencies:
bun install
Configuration
All variables are optional.
| Variable | Description | Default |
|---|---|---|
TOOLKIT_ENABLE_NET_DIAGNOSTICS |
Register the gated toolkit_check_network tool. Leave off for hosted or shared deployments. |
false |
TOOLKIT_ENABLE_SYSTEM_INFO |
Register the gated toolkit_check_system tool. |
false |
TOOLKIT_ALLOW_PRIVATE_NETWORK |
With network diagnostics on, permit private, reserved, loopback, and link-local targets. | false |
TOOLKIT_GEO_API_KEY |
API key for the geolocation endpoint, if it requires one. | none |
TOOLKIT_GEO_BASE_URL |
Base URL for an ip-api-compatible endpoint. The keyless default is plaintext HTTP; ip-api's HTTPS endpoint needs a paid key. | http://ip-api.com |
TOOLKIT_GEO_CACHE_TTL_SECONDS |
In-memory geolocation cache TTL in seconds. | 3600 |
TOOLKIT_GEO_RATE_LIMIT_PER_MIN |
Max geolocation provider requests per minute; cache hits don't count, and excess requests fail with a retryable rate-limit error. | 45 |
MCP_TRANSPORT_TYPE |
Transport: stdio or http. |
stdio |
MCP_HTTP_PORT |
Port for the HTTP server. | 3010 |
MCP_SESSION_MODE |
HTTP session mode: stateless, stateful, or auto. The server declares stateless; an explicit value overrides it. |
stateless |
MCP_AUTH_MODE |
Auth mode: none, jwt, or oauth. |
none |
MCP_LOG_LEVEL |
Log level (RFC 5424). | info |
OTEL_ENABLED |
Enable OpenTelemetry. | false |
See .env.example for the full list of optional overrides.
Running the server
Local development
-
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:http
-
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security, changelog sync bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t toolkit-mcp-server . docker run --rm -p 3010:3010 toolkit-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/toolkit-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts |
createApp() entry point — registers the five always-on tools, and the two gated tools only behind their flags. |
src/config |
Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools |
Tool definitions (*.tool.ts). Seven tools, five always-on and two gated. |
src/services/geo |
Geolocation service — DNS resolution, provider call with retry, normalization, in-memory cache. |
src/services/network |
Network-diagnostic service plus the shared target schema and private-range classifier. |
tests/ |
Vitest suites for tools (tests/tools) and services (tests/services). |
Development guide
See CLAUDE.md / AGENTS.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools in the
createApp()arrays insrc/index.ts; a host-probing tool registers only behind an enable flag - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck bun run test
License
Apache-2.0 — see LICENSE for details.
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 18
- License
- Apache-2.0
- Language
- TypeScript
- Last push
- 2026-10-07
- Forks
- 10
- MCP Registry
- io.github.cyanheads/toolkit-mcp-server
- Topics
- cryptography, developer-tools, geolocation, mcp, model-context-protocol, networking, system-utilities, typescript, cyanheads, base64, encoding, qr-code, ulid, utilities, uuid
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k