jwk_convert
Convert public keys between PEM, JWK and OpenSSH formats and compute their identifiers — what an agent needs to publish a JWKS, configure an OIDC / JWT verifier or pin a key. Accepts SPKI or PKCS#1 PEM, X.509 certificates (PEM or base64 DER), OpenSSH public keys, a JWK or a whole JWKS. Returns th...
This record as markdown: /tools/com-it-scorptech-x402/jwk-convert.md
What jwk_convert does on ScorpTech x402 API
AI agents use jwk_convert to create or update resources in ScorpTech x402 API, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your ScorpTech x402 API environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
alg | string | — | JWS / JWE algorithm to set on the JWK, e.g. RS256, ES256, EdDSA |
key | string | object | Yes | PEM (PUBLIC KEY, RSA PUBLIC KEY or CERTIFICATE), base64 DER, an OpenSSH public key line, or a JWK / JWKS (as an object or JSON string) |
kid | string | — | Key ID to set (default: keep the JWK kid, else the RFC 7638 thumbprint) |
use | string | — | Public key use to set on the JWK |
Parameters from the server's own tool schema.
Why jwk_convert is rated Medium
An AI agent can call jwk_convert faster than any human can review: one bad instruction and it creates or modifies resources in ScorpTech x402 API by the hundred, each call as confident as the last.
Attacks that exploit this kind of access
The rule that runs jwk_convert safely
PolicyLayer is an MCP gateway: it sits between your AI agents and ScorpTech x402 API, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For jwk_convert, this is the rule to start with:
jwk_convert stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect ScorpTech x402 API, apply this rule, and every jwk_convert call is checked against it from then on.
Questions about jwk_convert
Convert public keys between PEM, JWK and OpenSSH formats and compute their identifiers — what an agent needs to publish a JWKS, configure an OIDC / JWT verifier or pin a key. Accepts SPKI or PKCS#1 PEM, X.509 certificates (PEM or base64 DER), OpenSSH public keys, a JWK or a whole JWKS. Returns the public JWK (RSA, EC P-256 / P-384 / P-521 / secp256k1, OKP Ed25519 / Ed448 / X25519 / X448), RFC 7638 thumbprint (and RFC 9278 thumbprint URI), SPKI PEM, OpenSSH line with its SHA256 fingerprint, the pin-sha256 SPKI hash, x5t / x5t#S256 for certificates, suggested JWS algorithms and weak-key warnings. Public keys only: private keys are refused, never processed. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/jwk-convert. It is categorised as a Write tool in the ScorpTech x402 API MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
jwk_convert accepts 4 parameters: alg, key, kid, use. Required: key. The full parameter table on this page comes from the server's own tool schema.
Register the ScorpTech x402 API MCP server in PolicyLayer and add a rule for jwk_convert: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches ScorpTech x402 API. Nothing to install.
jwk_convert is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the jwk_convert rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for jwk_convert. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
jwk_convert is provided by the ScorpTech x402 API MCP server (https://scorptech.it.com/api/x402/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on ScorpTech x402 API, and thousands of servers like it.
This server
Across the catalogue