AI Agent Integration
By registering NodeCrypto with an AI agent such as Claude Code or Codex, you can build cryptographic workflows in natural language. The agent reads the node catalog, authors a workflow draft, verifies it against test vectors, and saves it as an .ncw file. You then open that file in the web app to inspect and review it on the canvas.
- NodeCrypto runs as a lightweight local program (an MCP server) launched by the agent on your own computer. It makes no network connections and opens no network ports.
- Requirements: Node.js 20 or later, and an MCP-compatible AI agent.
- The agent is given five tools:
guide(authoring guide),catalog(node lookup),validate(validation),run(execution and expected-value comparison), andexpand(saving.ncwfiles).
Installation
Every MCP client uses the exact same server command. It downloads and runs the npm package @curealls/nodecrypto; on one line it is:
npx -y @curealls/nodecrypto mcp
What each part means. In a configuration file, the leading npx is the command and the rest is the args array. Only the place where you register it differs by client.
npx: the npm package runner that ships with Node.js.-y: skips the "Ok to proceed?" prompt when downloading the package. The agent needs this to start the server unattended.@curealls/nodecrypto: the package name published on npm.mcp: runs the package in MCP server mode.
Step 1. Prerequisite: check Node.js
Node.js 20 or later is required. There is no separate NodeCrypto installer. Open a terminal (PowerShell on Windows, Terminal on macOS/Linux) and run both commands:
node --version
npx --version
If a version of v20.0.0 or higher is printed, you are ready. If a command is not found or the version is below 20, install the LTS release from https://nodejs.org/ and open a new terminal.
Step 2. Check that the package runs (recommended)
This step is optional. Even if you do not install the package beforehand, npx -y downloads it automatically when the agent first starts the server. Running it in advance is still recommended: otherwise the connection may be delayed or time out during those first few seconds, and you learn about network or Node.js problems before registering. A downloaded package stays in the cache and is reused.
npx -y @curealls/nodecrypto --version
Check that a version is printed.
Step 3. Register with your agent
Claude Code
Register the server with a single terminal command. Everything after -- is the command used to launch the server. Run only the one line that fits your purpose.
For the current project only (default):
claude mcp add --transport stdio nodecrypto -- npx -y @curealls/nodecrypto mcp
For all projects:
claude mcp add --transport stdio --scope user nodecrypto -- npx -y @curealls/nodecrypto mcp
Saved in the project's .mcp.json and shared with your team:
claude mcp add --transport stdio --scope project nodecrypto -- npx -y @curealls/nodecrypto mcp
Then verify with:
claude mcp list
nodecryptoshould appear asConnected. Inside Claude Code, you can also check with/mcp.- If you registered it by mistake, run
claude mcp remove nodecryptoand register again.
Codex
OpenAI Codex (CLI and IDE extension) registers the server with a single terminal command. Everything after -- is the command used to launch the server.
codex mcp add nodecrypto -- npx -y @curealls/nodecrypto mcp
Then verify with:
codex mcp list
nodecryptoshould appear in the list. Inside Codex, you can also check with/mcp.- The command writes an entry to the configuration file
~/.codex/config.toml(Windows:%USERPROFILE%\.codex\config.toml). To edit the file by hand instead, add the following.
[mcp_servers.nodecrypto]
command = "npx"
args = ["-y", "@curealls/nodecrypto", "mcp"]
- Restart Codex after changing the configuration. If you registered it by mistake, run
codex mcp remove nodecryptoand register again.
VS Code, Cursor, and Other Clients
Add the same command to your client's MCP configuration file. The file location and top-level JSON key vary by client.
| Client | Configuration File | Top-Level Key |
|---|---|---|
| VS Code | .vscode/mcp.json in the workspace, or "MCP: Add Server" in the Command Palette | servers |
| Cursor | .cursor/mcp.json in the project, or ~/.cursor/mcp.json in your home directory | mcpServers |
VS Code example:
{
"servers": {
"nodecrypto": {
"command": "npx",
"args": ["-y", "@curealls/nodecrypto", "mcp"]
}
}
}
Cursor uses the same mcpServers structure as Claude Code's .mcp.json. For any other MCP client, look for where it registers a "standard I/O (stdio) server: command npx, arguments -y @curealls/nodecrypto mcp".
Windows
- First verify in a terminal that
node --versionreports 20 or higher and thatnpx -y @curealls/nodecrypto --versionruns cleanly. The agent can only launch the server if these work in your environment. - When writing file paths in JSON configuration files, escape backslashes as
\\(for example,C:\\Users\\me\\workflows). - If the server fails to start with an error stating that
npxcannot be found, see Troubleshooting below.
Verifying the Connection
Try asking your agent:
If the agent invokes the catalog tool of nodecrypto and shows nodes such as symmetric-aes-encrypt, the connection is working. If the agent asks for permission the first time it calls a tool, approve it.
Usage Example
The agent typically works through the following five steps:
guide: Reads the authoring guide.catalog: Searches for the required nodes and inspects their exact port and property definitions rather than guessing node types or port names.validate: Checks the draft workflow for structural or type errors and fixes any issues.run: Executes the workflow and compares the output against the expected test vector values (expect).expand: Saves the verified workflow as an.ncwfile and reports the saved file path.
Agents typically attach per-node memos explaining which RFC section or test vector was used and why specific parameter values were chosen, making it much easier to review the workflow on the canvas.
Saving and Opening Workflows
Where Files Are Saved
- The default output folder is
nodecrypto-workflowsinside your home directory (created automatically if it does not exist). The file name is derived from the workflow name with a.ncwextension. - Changing the default folder: add
--out-dir <folder>to the server arguments (e.g.,"args": ["-y", "@curealls/nodecrypto", "mcp", "--out-dir", "D:\\workflows"]), or set theNODECRYPTO_OUT_DIRenvironment variable. If both are set,--out-dirtakes precedence. - In practice, the agent often chooses the path itself. When the agent knows the absolute path of your current project workspace, it will typically save the file there instead of the default folder. If you want it saved in the default folder, ask the agent: "Save it to the default location without specifying a path."
- Specifying a path per request: you can ask "Save it to
D:\work\hmac.ncw" and the agent will save it to that exact location. Only the.ncwextension is permitted. - Once saved, the agent reports the absolute file path. If it does not mention the path, ask: "What is the full path of the saved file?"
Overwriting Existing Files
If a file with the same name already exists, it is overwritten by default. If you do not want existing files overwritten, include "Do not overwrite if the file already exists; let me know instead" in your prompt. The agent will call expand with overwrite: false, which aborts saving and reports when the file already exists.
Opening in the Web App
- Open the NodeCrypto web app (https://nodecrypto.dev/).
- Click "File > Open" in the menu and select the saved
.ncwfile. - The workflow opens in a new tab. Because an opened file tab is not yet persisted to browser storage, use "Save As" if you want to keep a copy in your workspace.
The web app does not connect directly to the AI agent; the .ncw file is the bridge between the two.
Security Precautions
- Do not blindly trust a workflow generated by an agent. Inspect every node, wire connection, and parameter on the web app canvas, and verify the rationale recorded in the node memos.
- Passing an expected-value check (
expect) is only meaningful if the test vector itself is authentic. Verify the source of the test vector (such as the RFC section number). - Keep tool-call confirmation prompts enabled in your client, especially for
expand, which writes files to disk and overwrites by default—verify the target path before approving.
Upgrading
NodeCrypto MCP runs through npx rather than a global install, so there is no installer to update. If your registration does not pin a version of @curealls/nodecrypto, the latest version is used when you restart the agent after a new release. However, npx keeps previously downloaded packages in its cache and may reuse them, so an older version can keep running even after a restart.
- Check which version actually runs.
npx -y @curealls/nodecrypto --version - Force a download of the latest version to compare.
npx -y @curealls/nodecrypto@latest --version - To always use the latest version, change the registered arguments to
-y @curealls/nodecrypto@latest mcp. To pin a specific version, write the version number instead, such as@0.2.5. With a pinned version you must edit this number yourself to upgrade. - If an older version still runs, clear the
npxcache. Find the cache location withnpm config get cacheand delete the_npxfolder inside it; the next run downloads the package again. - Fully quit and restart the agent. The server is a process started by the agent, so a restart is required for the new version to take effect.
If you installed globally with npm install -g @curealls/nodecrypto, update it with npm update -g @curealls/nodecrypto.
Uninstalling
Removing the registration from your client is enough. Once it is removed, the agent no longer starts the server.
1. Remove the registration from your client
- Claude Code: remove it with the same scope you used when registering, then confirm that
nodecryptono longer appears inclaude mcp list.
If you registered withclaude mcp remove nodecrypto claude mcp remove nodecrypto --scope user claude mcp remove nodecrypto --scope project--scope project, you can also delete thenodecryptoentry from the project's.mcp.jsonby hand. - Codex: run
codex mcp remove nodecrypto. You can also delete the[mcp_servers.nodecrypto]entry from~/.codex/config.tomlby hand. - VS Code: delete the
nodecryptoentry fromserversin.vscode/mcp.json. - Cursor: delete the
nodecryptoentry frommcpServersin.cursor/mcp.jsonor~/.cursor/mcp.json.
2. Clean up the cache and global install (optional)
- To remove the package left in the
npxcache, delete the_npxfolder inside the cache folder shown bynpm config get cache. - If you installed globally, run
npm uninstall -g @curealls/nodecrypto.
3. Saved workflow files
.ncw files the agent saved. If you no longer need them, delete them yourself from the save location (default: the nodecrypto-workflows folder in your home directory).Troubleshooting
| Symptom | What to Check |
|---|---|
| Tools do not appear | Check the JSON syntax (commas and quotes) in your configuration file. In Codex, restart it for config changes to take effect. Check the server status with codex mcp list (Codex) or claude mcp list (Claude Code). |
npx cannot be found | Check whether node --version and npx --version work in a terminal. If they work in a terminal but fail inside the agent, the agent's launch environment does not have npx on its PATH. Specify the full absolute path to npx in command, or reinstall Node.js and restart the agent. On Windows, also check that the %APPDATA%\npm folder exists. |
| Disconnects immediately after connecting | Verify that Node.js is version 20 or higher. Run npx -y @curealls/nodecrypto mcp directly in a terminal: if it waits silently for input without printing an error, the server is working properly (press Ctrl+C to exit). If it prints an error message, follow that message. You can also inspect the client's MCP logs for server stderr output. |
| Cannot find where the file was saved | Ask the agent: "Tell me the full path of the saved file." If no custom path was used, check the nodecrypto-workflows folder inside your home directory. |
| Opened file shows old content | Saving again with the same file name overwrites the file on disk, but any tab already open in the web app does not reload automatically. Re-open the file via "File > Open". |