security-crypto
20 Security MCP tools: X.509, SAML, JWT, PGP, SSH, CSP/CORS, SBOM, lockfiles, AES/scrypt.
我该使用它吗
质量与安全性
发现(2)
- LOW在 saml_assertion_decode 中
- LOW在 aes_gcm_encrypt_decrypt 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"security-crypto": {
"url": "https://api.quickcoderhub.com/mcp/security-crypto"
}
}
}远程端点
https://api.quickcoderhub.com/mcp/security-cryptostreamable-http它能做什么
工具清单
工具(20)
🟢x509_certificate_inspect(filePath, text, base64Data)
Inspect an X.509 PEM/DER TLS certificate using Node crypto.X509Certificate for subject, issuer, SANs, expiry, fingerprint256, and key type.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
},
"base64Data": {
"type": "string"
}
}
}🟢saml_assertion_decode(text)
Decode Base64 / URL-encoded / Deflate SAML 2.0 AuthnRequests or Responses and extract Issuer, NameID, Audience, and validity timestamps.
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "SAMLRequest/SAMLResponse base64 or raw XML."
}
}
}⚪jwt_decode_and_audit(token, text, hmacSecret)
Decode JWT header & payload, flag alg=none / weak secrets / expired exp claims, and optionally verify HS256/HS512 signatures.
输入模式
{
"type": "object",
"properties": {
"token": {
"type": "string"
},
"text": {
"type": "string"
},
"hmacSecret": {
"type": "string"
}
}
}🟢pgp_packet_inspect(filePath, text)
Parse ASCII-armored OpenPGP public/private keys or signatures to decode RFC-4880 packet tags, RSA/EdDSA versions, CRC24 armor checksum, and User IDs.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
}
}
}⚪crypto_keypair_generate(algorithm, rsaBits)
Generate fresh Ed25519 or RSA-2048/4096 PKCS#8/SPKI PEM keypairs and SHA-256 public key fingerprints via Node crypto.
输入模式
{
"type": "object",
"properties": {
"algorithm": {
"type": "string",
"enum": [
"ed25519",
"rsa"
],
"default": "ed25519"
},
"rsaBits": {
"type": "integer",
"default": 2048
}
}
}⚪ssh_config_generate_and_audit(alias, hostName, user, port, identityFile, ...)
Generate hardened ~/.ssh/config stanzas (JumpHost/ProxyJump, IdentityFile, IdentitiesOnly, ServerAliveInterval) or audit existing SSH configs.
输入模式
{
"type": "object",
"properties": {
"alias": {
"type": "string",
"default": "prod"
},
"hostName": {
"type": "string",
"default": "10.0.0.10"
},
"user": {
"type": "string",
"default": "ubuntu"
},
"port": {
"type": "integer",
"default": 22
},
"identityFile": {
"type": "string",
"default": "~/.ssh/id_ed25519"
},
"proxyJump": {
"type": "string"
},
"text": {
"type": "string"
}
}
}🟢ssh_known_hosts_inspect(filePath, text)
Inspect ~/.ssh/known_hosts entries for hashed vs plaintext hostnames, deprecated ssh-dss/ssh-rsa keys, and duplicate key fingerprints.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
}
}
}🟢csp_parse_and_audit(policy, text)
Parse, build, or security-audit Content-Security-Policy (CSP) headers for unsafe-inline, unsafe-eval, wildcard sources, and missing frame-ancestors.
输入模式
{
"type": "object",
"properties": {
"policy": {
"type": "string"
},
"text": {
"type": "string"
}
}
}🟢cors_preflight_simulate(requestOrigin, allowOrigin, allowCredentials, method, allowMethods)
Simulate a browser CORS preflight check against Access-Control-Allow-Origin, Allow-Credentials, and Allow-Methods rules and flag RFC misconfigurations.
输入模式
{
"type": "object",
"properties": {
"requestOrigin": {
"type": "string",
"default": "https://app.example.com"
},
"allowOrigin": {
"type": "string",
"default": "*"
},
"allowCredentials": {
"type": "boolean",
"default": false
},
"method": {
"type": "string",
"default": "POST"
},
"allowMethods": {
"type": "string",
"default": "GET, POST, OPTIONS"
}
}
}🟢permissions_policy_audit(policy, text)
Parse or build HTTP Permissions-Policy feature allowlists (camera, microphone, geolocation, usb, payment) and flag wildcard feature exposure.
输入模式
{
"type": "object",
"properties": {
"policy": {
"type": "string"
},
"text": {
"type": "string"
}
}
}🟢referrer_policy_audit(policy, text)
Evaluate HTTP Referrer-Policy values for cross-origin query string/URL leakage risk and recommend strict alternatives.
输入模式
{
"type": "object",
"properties": {
"policy": {
"type": "string",
"default": "strict-origin-when-cross-origin"
},
"text": {
"type": "string"
}
}
}⚪ioc_defang_and_refang(mode, text)
Safely defang or refang malicious IOC URLs, domains, email addresses, and IPv4 indicators (hxxp://, [.], [@]) for SOC reports.
输入模式
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"defang",
"refang"
],
"default": "defang"
},
"text": {
"type": "string"
}
}
}🟢sbom_inspect_and_audit(filePath, text)
Inspect CycloneDX or SPDX JSON Software Bill of Materials (SBOM) to count components, extract PURLs, and summarize license distribution.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
}
}
}⚪spdx_license_compatibility(licenses, text)
Classify SPDX open-source license identifiers (MIT, Apache-2.0, BSD, GPL-3.0, AGPL-3.0) by copyleft tier, patent grant, and commercial risk.
输入模式
{
"type": "object",
"properties": {
"licenses": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
}
}
}⚪package_json_audit(filePath, text)
Audit an npm package.json manifest for unpinned git/http dependencies, risky preinstall/postinstall lifecycle hooks, and missing engines/exports.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
}
}
}⚪lockfile_integrity_audit(filePath, text)
Audit npm package-lock.json (v2/v3) for non-HTTPS registry URLs, missing SHA-512 integrity hashes, and total transitive package footprint.
输入模式
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
},
"text": {
"type": "string"
}
}
}⚪password_kdf_hash_and_verify(password, verifyHash, kdf, text)
Hash and verify passwords using cryptographic scrypt or PBKDF2-SHA512 with random 16-byte salts via Node crypto.
输入模式
{
"type": "object",
"properties": {
"password": {
"type": "string"
},
"verifyHash": {
"type": "string"
},
"kdf": {
"type": "string",
"enum": [
"scrypt",
"pbkdf2"
],
"default": "scrypt"
},
"text": {
"type": "string"
}
}
}⚪aes_gcm_encrypt_decrypt(mode, text, keyHex, ivHex, authTagHex)
Authenticated AES-256-GCM encryption and decryption using Node crypto with random 96-bit IVs and 128-bit GCM auth tags.
输入模式
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"encrypt",
"decrypt"
],
"default": "encrypt"
},
"text": {
"type": "string"
},
"keyHex": {
"type": "string"
},
"ivHex": {
"type": "string"
},
"authTagHex": {
"type": "string"
}
}
}🟢hmac_sign_and_verify(text, secret, algorithm, verifyHex)
Compute or timing-safe verify HMAC-SHA256 / HMAC-SHA512 message authentication codes.
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"secret": {
"type": "string",
"default": "secret-key"
},
"algorithm": {
"type": "string",
"enum": [
"sha256",
"sha512"
],
"default": "sha256"
},
"verifyHex": {
"type": "string"
}
}
}⚪bip39_entropy_mnemonic(bits, entropyHex)
Generate 128-bit or 256-bit cryptographic entropy with its exact BIP-39 SHA-256 checksum bits and 11-bit word indices.
输入模式
{
"type": "object",
"properties": {
"bits": {
"type": "integer",
"enum": [
128,
256
],
"default": 128
},
"entropyHex": {
"type": "string"
}
}
}社区
证据