toolkit-mcp-server
公共托管服务器: https://toolkit.caseyjhand.com/mcp
工具
七个工具。其中五个始终可用,无需任何配置——纯计算工具加上一个无 SSRF 风险的 IP 查询工具。另外两个会探测服务器主机,在 tools/list 中默认不出现,除非你主动启用,且默认关闭(fail-closed)。
工具 | 描述 |
| 生成加密摘要(sha256/sha512/sha1/md5),或对值进行常量时间比较,与预期摘要进行比对。 |
| 生成加密随机标识符——UUIDv4、UUIDv7 或 ULID——可单个生成,也可批量生成最多 1000 个。 |
| 将文本或 URL 编码为 QR 码,输出格式为 SVG 标记、base64 PNG 或终端可渲染字符串。 |
| 对值进行编码或解码,支持 base64、base64url、hex 或 URL 百分比编码,可双向操作。 |
| 将公共 IP 或主机名解析为地理和网络元数据——国家、城市、坐标、ASN、时区。 |
| 受限,默认关闭。 只读网络诊断,从服务器主机执行——ping、traceroute、TCP 连接性或出口 IP 检测。 |
| 受限,默认关闭。 报告服务器主机系统状态的某个方面——操作系统、CPU、内存、平均负载或网络接口。 |
toolkit_hash_value
生成摘要,或对值进行常量时间验证,与预期值比对。
operation:generate(小写十六进制摘要)或compare(通过timingSafeEqual进行时序安全检查)算法:
sha256(默认)和sha512用于安全场景;sha1和md5仅用于校验和和文件完整性兼容——绝不可用于密码或签名inputEncoding将value视为utf8(默认)、hex或base64,因此二进制数据可跳过一轮解码往返典型用法:将下载文件与供应商发布的校验和进行匹配
toolkit_generate_id
从平台 CSPRNG 生成加密随机标识符——这是生成不可预测 ID 的正确来源,不同于模型自行构造的值。
type:uuid_v4(随机,默认)、uuid_v7(按创建时间排序,可排序)或ulid(26 个字符的 Crockford base32,按字典序可排序)count可在一次调用中批量生成最多 1000 个;返回的ids数组始终恰好包含count个值uuid_v7和ulid批次是单调递增的——即使在同一毫秒内也严格递增——因此ids保持按创建顺序排序只读——生成操作不改变任何状态——但绝不幂等,因此客户端不会缓存或去重一个批次
toolkit_generate_qr
将文本或 URL 编码为 QR 码。
format:svg(内联标记)、png_base64(带有mimeType和byteLength的栅格字节)或terminal(Unicode 块字符字符串)errorCorrection(L/M/Q/H)在数据容量与容错能力之间权衡;margin设置静区宽度;scale设置栅格输出的每模块像素数返回的
version(1–40)反映编码数据的密度png_base64还会作为 MCP 图像内容块提供,因此读取content[]的客户端无需解码structuredContent即可渲染二维码渲染的 PNG 每边限制在 2048 像素以内——
(modules + 2 × margin) × scale——因此高密度符号在较大scale下会被拒绝,并返回带有raster_too_large类型的错误,提示一个合适的 scale 值;svg和terminal无此限制data最大为 2953 字节——绝对上限(版本 40,L 级,字节模式);在更高的errorCorrection级别下可用容量更低,因此超出容量的输入会被拒绝,并返回带有data_too_large类型的错误,而非通用失败
toolkit_encode_value
对值进行编码或解码,支持双向操作。
encoding:base64、base64url(URL 安全字母表)、hex或url(百分比编码)operation:encode(原始 UTF-8 → 编码)或decode(编码值 → 文本)格式错误的解码输入返回带有
decode_failed类型的错误及恢复提示,而非静默尽力解码
toolkit_geolocate_ip
将公共 IP 或主机名解析为地理和网络元数据。
返回国家、地区、城市、纬度/经度、ASN、所属组织及时区
proxy、hosting和mobile标志用于指示地址是否为代理/VPN/Tor 出口、数据中心网络或移动运营商——其中任何一个为true表示坐标描述的是基础设施,而非个人。当提供商未报告时,这些字段不存在主机名首先通过 DNS 解析;
resolvedIp回显实际定位的 IP,source指明提供方名称无 SSRF——服务器调用的是提供方,永远不会调用目标地址;解析后的 IP 会再次检查是否为私有地址,私有/保留地址会被拒绝(它们没有公共地理定位信息)
尽力而为且受限于提供方:VPN、代理、移动 NAT 和任播都会影响 IP 定位,精度最多到城市级别,缺失字段报告为未知而非编造
提供方提供的字符串会被截断并去除控制字符后才进入响应,因此注册中心控制的文本(
org、isp、as)不会淹没或影响模型上下文格式默认无需密钥(ip-api 免费版,使用明文 HTTP——参见
TOOLKIT_GEO_BASE_URL);结果按解析后的 IP 缓存于内存中,并有固定条目上限
toolkit_check_network
受限——仅在 TOOLKIT_ENABLE_NET_DIAGNOSTICS=true 时注册。只读网络诊断,从服务器主机执行。
mode:ping(ICMP 往返)、traceroute(到目标的跃点路径)、connectivity(向target的port进行原始 TCP 连接)或public_ip(主机自身的出口 IP)无响应的主机报告为
reachable: false——这是一个有效结果,而非错误诊断的是服务器自身的网络,因此在本地或自托管部署中很有用;要访问私有/保留/内部目标,还需
TOOLKIT_ALLOW_PRIVATE_NETWORK=true,这默认会阻止云元数据端点
toolkit_check_system
受限——仅在 TOOLKIT_ENABLE_SYSTEM_INFO=true 时注册。报告服务器主机系统状态的某个方面,只读。
what:os、cpu、memory、load或interfaces每次调用只填充一个方面对象,与
what匹配描述的是运行此服务器的主机,而非调用客户端——在本地或自托管部署中有意义;默认关闭,因为
os和interfaces会暴露主机拓扑和版本细节
Related MCP server: IT Tools MCP Server
功能特性
基于 @cyanheads/mcp-ts-core 构建:
声明式工具定义——每个工具一个文件,框架负责注册和验证
统一错误处理——处理函数抛出错误,框架捕获、分类并格式化
类型化错误契约——每个可能失败的工具都会声明其失败原因,并附带代理可操作的恢复提示
可插拔认证:
none、jwt、oauth结构化日志,可选 OpenTelemetry 追踪
STDIO 和 Streamable HTTP 传输
工具包特有:
默认关闭的防护机制——两个探测主机的工具在
tools/list中不出现,除非显式启用,因此托管实例不会暴露 SSRF 或信息泄露面双层网络防护——即使启用了诊断,私有/保留/回环/链路本地目标(包括云元数据端点)也保持阻断,直到第二个标志允许它们
CSPRNG 支持的原语——标识符和摘要来自平台加密源,哈希比较通过
timingSafeEqual实现常量时间比较无 SSRF 的地理定位——服务器调用提供方,然后在查询前再次检查 DNS 解析后的 IP 是否在私有范围,因此主机名无法将请求走私到内部地址
对代理友好的输出:
来源追溯——地理定位回显解析后的 IP 并指明提供方名称;上游缺失字段报告为未知,绝不编造
故障但有效的结果——不可达主机返回
reachable: false而非错误,因此调用者基于数据进行分支判断,而非异常文本类型化失败原因——解码失败、缺失摘要和被阻止的私有目标各自携带结构化的原因及下一步恢复提示
快速开始
公共托管实例
公共实例地址为 https://toolkit.caseyjhand.com/mcp——无需安装。通过 Streamable HTTP 将任何 MCP 客户端指向该地址:
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "streamable-http",
"url": "https://toolkit.caseyjhand.com/mcp"
}
}
}自托管 / 本地
将以下内容添加到您的 MCP 客户端配置文件中。无需 API 密钥——五个始终可用的工具和默认的无密钥地理定位层开箱即用。
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/toolkit-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}或者使用 npx(无需 Bun):
{
"mcpServers": {
"toolkit-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/toolkit-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}或者使用 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"]
}
}
}要启用受限制的主机探测工具,请将相应的标志添加到 env(或 Docker 的 -e):
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"TOOLKIT_ENABLE_NET_DIAGNOSTICS": "true",
"TOOLKIT_ENABLE_SYSTEM_INFO": "true"
}对于 Streamable HTTP,设置传输方式并启动服务器:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp前提条件
Bun v1.3.2 或更高版本(或 Node.js v24+)。
无需 API 密钥——地理定位默认使用无密钥的 ip-api 免费版。
安装
克隆仓库:
git clone https://github.com/cyanheads/toolkit-mcp-server.git进入目录:
cd toolkit-mcp-server安装依赖:
bun install配置
每个变量都是可选的。服务器特定的选项在启动时通过 src/config/server-config.ts 中的 Zod 模式进行验证。
变量 | 描述 | 默认值 |
| 注册受门控的 |
|
| 注册受门控的 |
|
| 启用网络诊断时,允许私有/保留/回环目标。这是第二道显式门控。 |
|
| 地理定位端点的 API 密钥(如果需要)。 | 无 |
| 兼容 ip-api 的地理定位端点的基础 URL。默认是明文 HTTP——ip-api 的 HTTPS 端点不属于无密钥免费套餐,如果没有付费密钥,会返回 |
|
| 内存中地理定位缓存的 TTL(秒)。 |
|
| 每分钟最大地理定位请求数。 |
|
| 传输方式: |
|
| HTTP 服务器的端口。 |
|
| 认证模式: |
|
| 日志级别(RFC 5424)。 |
|
| 启用 OpenTelemetry 检测(跨度、指标、完成日志)。 |
|
请参阅 .env.example 获取完整的可选覆盖列表。
运行服务器
本地开发
构建并运行:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:http运行检查和测试:
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 -e MCP_TRANSPORT_TYPE=http -p 3010:3010 toolkit-mcp-serverDockerfile 默认使用 HTTP 传输、无状态会话模式,并将日志记录到 /var/log/toolkit-mcp-server。OpenTelemetry 对等依赖项默认安装——使用 --build-arg OTEL_ENABLED=false 构建以省略它们。
项目结构
目录 | 用途 |
|
|
| 使用 Zod 进行服务器特定的环境变量解析和验证。 |
| 工具定义( |
| 地理定位服务——DNS 解析、带重试/退避的提供商调用、标准化、内存缓存。 |
| 网络诊断服务,以及共享的目标验证器和私有范围分类器。 |
| 单元测试和集成测试,镜像 |
开发指南
请参阅 CLAUDE.md / AGENTS.md 获取开发指南和架构规则。简要说明:
处理程序抛出异常,框架捕获——工具逻辑中不使用
try/catch使用
ctx.log进行请求范围的日志记录,使用ctx.state进行租户范围的存储在
src/index.ts的createApp()数组中注册新工具两个主机探测工具在其启用标志后注册;网络目标门控在 DNS 解析后验证——切勿为无法定位或无法访问的目标伪造结果
贡献
欢迎提交 Issue 和 Pull Request。提交前请运行检查和测试:
bun run devcheck
bun run test许可证
Apache-2.0——详情请参阅 LICENSE。
Available Tools
5 toolstoolkit_encode_valuetoolkit-mcp-server: encode valueARead-onlyIdempotentInspect
Encode or decode a value across base64, base64url, hex, or URL (percent) encoding, in either direction. Set operation to "encode" to transform raw UTF-8 text into the chosen encoding, or "decode" to recover the original bytes from an encoded value. Decoded bytes come back as UTF-8 text by default; set outputEncoding to "hex", "base64", or "base64url" (unpadded, the form JWK members, JWS signatures, and PKCE code challenges use) to receive them re-encoded instead, which is lossless for binary data and transcodes between encodings (a base64 digest to hex, or hex key bytes to base64url, for example). Decoding never substitutes replacement characters: bytes that are not valid UTF-8 text are reported as a recoverable error that points at outputEncoding. Whitespace in hex, base64, and base64url values is ignored, so line-wrapped MIME bodies and PEM bodies decode as-is (drop PEM's -----BEGIN/END----- lines, which are not base64). base64url uses the URL-safe alphabet (- and _ instead of + and /); url applies encodeURIComponent and percent-decoding. A value that is malformed for the chosen encoding is reported as a recoverable error, not a silent best-effort.
Inputs: value (required), encoding (required), operation (required), outputEncoding. Returns: error, result, encoding, operation, +1 more
toolkit_generate_idtoolkit-mcp-server: generate idARead-onlyInspect
Mint cryptographically-random identifiers using the platform CSPRNG — the correct source for IDs that must be unpredictable, unlike model-generated values. type selects the format: uuid_v4 (random, the default), uuid_v7 (time-ordered, sortable by creation), or ulid (26-char Crockford-base32, lexicographically sortable). Set count to mint a batch in one call (up to 1000); the returned ids array always contains exactly count values and is never truncated. For uuid_v7 and ulid, a batch is monotonic — strictly increasing even within the same millisecond — so the ids array stays in sorted creation order; ids minted in the same millisecond are separated by random gaps, so no id in a batch can be derived from another. IDs from this tool feed into toolkit_generate_qr (pass ids[0] as data) to create a scannable code.
Inputs: type, count. Returns: ids, type, count, error
toolkit_generate_qrtoolkit-mcp-server: generate QR codeARead-onlyIdempotentInspect
Encode text or a URL into a QR code. data is the content to encode (a link, a generated identifier such as toolkit_generate_id's ids[0], or any string). format selects the output: svg returns inline SVG markup sized in pixels, png_base64 returns base64-encoded PNG bytes (with mimeType and byteLength), and terminal returns plain Unicode half-block characters (no escape codes) for a monospace display, drawn for a dark background: light modules, quiet zone included, are blocks and dark modules are spaces. errorCorrection (L/M/Q/H) trades data capacity for damage tolerance, margin sets the quiet-zone width in modules, and scale sets pixels per module for svg and png_base64, so both are (modules + 2 × margin) × scale pixels per side. The returned version (1–40) reflects how dense the encoded data is. png_base64 rejects an image past 2048 px per side with a typed raster_too_large error, so a dense symbol needs a lower scale; svg is vector markup and carries no such limit.
Inputs: data (required), scale, format, margin, +1 more. Returns: error, format, content, version, +2 more
toolkit_geolocate_iptoolkit-mcp-server: geolocate IPARead-onlyIdempotentInspect
Resolve a public IP or dotted hostname to country, region, city, coordinates, ASN, AS holder and name, organization, ISP, timezone, and proxy/hosting/mobile flags. Supply target for one lookup or targets for an ordered batch, never both; blank target and empty targets are unset. Batches process the first 100 positions (duplicates retained) and disclose every remainder in unprocessedTargets; at most 1000 inputs are accepted. Each batch position reports its result or an error with recovery, so cached and local outcomes survive quota refusals. The provider is called directly, never the target. Hostnames are DNS-resolved and resolvedIp names the located address. Private/reserved addresses have no public geolocation. Results are best-effort, city-level at best; VPNs, proxies, mobile NAT, and anycast defeat IP-to-location. Read proxy, hosting, and mobile before trusting coordinates: true describes infrastructure, not the user. org can name a customer or sub-allocation rather than the network operator; read isp, asHolder, and asName for the operator. Absent metadata remains unknown. Provider-supplied names are third-party registry text; content[] escapes them so they read as literal text, never as Markdown. source names the provider. Single and batch quotas are independent; cache hits consume neither quota.
Inputs: target, targets. Returns: asn, isp, org, city, +18 more
toolkit_hash_valuetoolkit-mcp-server: hash valueARead-onlyIdempotentInspect
Generate a cryptographic digest or HMAC of a value, or verify a value against an expected digest. Set operation to "generate" for a digest, or "compare" to constant-time-check value against the expected digest — compare is timing-safe and avoids manual string equality checks. Omitting operation compares when expected is supplied and generates otherwise. Algorithm defaults to sha256; sha384 and sha512 are also secure, while md5 and sha1 are exposed ONLY for checksum and file-integrity compatibility and for verifying existing HMAC-SHA1 signatures, and must not be used for passwords, new signatures, or any other security purpose. Set secret to compute HMAC(algorithm, secret, value) instead of a plain digest, for generate and compare alike — the check behind webhook signatures such as GitHub's X-Hub-Signature-256 (pass the header value as expected) and HS256 JWT signatures; secretEncoding says how secret is written (utf8 default, hex, base64, or base64url for a JWK k), the result carries hmac: true, and the secret is never echoed back. digestEncoding selects the generated digest form: lowercase hex (default), base64, base64url (unpadded, the JWS signature form), or sri (-, the npm lockfile integrity and Subresource Integrity form, sha256/sha384/sha512 only, plain digests only). expected is recognized by its shape at the algorithm's digest length, so a published checksum can be pasted as-is: a bare hex, base64, or base64url digest; SRI, which may hold several space-separated entries as an npm integrity field can and matches when any entry for algorithm does; one checksum-file line as sha256sum, shasum, md5, or openssl dgst prints it ( , or SHA256 () = ); or a digest prefixed sha256: or sha256= (OCI and release-asset digests, webhook signature headers). A tag or prefix naming another algorithm fails rather than being ignored, a multi-line checksum file must be cut to the one line for the file, and with secret an SRI value or a tagged line fails, since both carry plain digests. inputEncoding controls how value is read before hashing (utf8 default, or hex/base64 for raw binary data) so binary blobs need no decode round-trip. The canonical use is matching a download against a vendor-published checksum or a lockfile integrity entry.
Inputs: value (required), secret, expected, algorithm, +4 more. Returns: hmac, error, digest, matches, +3 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a clearly different job: hashing, reversible encoding, ID minting, QR rendering, and IP geolocation. The only mild overlap is between hash and encode, since both accept base64/hex encodings and one can transcode digests, but the descriptions make the digest-vs-reversible-transform boundary explicit.
Every tool uses the same toolkit_ prefix followed by a snake_case verb_noun pair: hash_value, encode_value, generate_id, generate_qr, geolocate_ip. The pattern is fully predictable.
Five tools is a sensible size for a general utility server, and each tool carries a distinct capability rather than a thin variant of another. The grouping is inherently a grab bag, so the set is slightly arbitrary in membership but not padded.
Each individual tool covers its sub-domain well: hash does generate and compare/HMAC, encode does both directions with multiple transcodes, id supports three formats with batches, qr supports three output formats, and geolocate supports single and batch. As a general toolkit there are predictable gaps (no time/date or JWT-decode style utilities), but nothing that blocks the advertised workflows.
Maintenance
Related MCP Connectors
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.2-
- AlicenseBqualityFmaintenanceA comprehensive Model Context Protocol server providing access to 70+ IT tools for developers and system administrators, including encoding/decoding, text manipulation, hashing, and network utilities.2100216 npm21TypeScriptMIT
- FlicenseNot gradedqualityDmaintenanceA secure Model Context Protocol server providing HTTP endpoints for AI agent tool execution, including file system operations, shell commands, and LLM-based code generation.1-
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing network diagnostic tools for AI agents, including connectivity testing, batch operations, local network info, and pcap analysis.346MIT