MCP server: VS Code
Install @cloakapi/mcp-server 0.6.2 from npm and run cloakapi-mcp, as described in MCP server. Version 0.5.1 remains on npm and bundles @cloakapi/sdk 1.5.0. Versions 0.4.0 and 0.4.1 were withdrawn, and their downloads answer HTTP 410.
Edit the configuration file
VS Code reads MCP servers from an mcp.json file with a servers object:
.vscode/mcp.jsonin a workspace, for that workspace- your user configuration, for all workspaces: run MCP: Open User Configuration from the Command Palette
Add the cloakapi entry:
{ "servers": { "cloakapi": { "type": "stdio", "command": "cloakapi-mcp", "args": [], "env": { "CLOAKAPI_API_KEY": "cloak_your_key_here" } } }}To keep the key out of a workspace file, let VS Code ask for it once and store it:
{ "inputs": [ { "type": "promptString", "id": "cloakapi-key", "description": "CloakAPI API key", "password": true } ], "servers": { "cloakapi": { "type": "stdio", "command": "cloakapi-mcp", "args": [], "env": { "CLOAKAPI_API_KEY": "${input:cloakapi-key}" } } }}If VS Code cannot start the server by name, use absolute paths for node and the server script, as shown in If the client cannot find the command: set command to the path of node and args to the path of bin.js.
Start and check
Run MCP: List Servers from the Command Palette, select cloakapi, and start or restart it there. Its output log shows startup errors.
Then open Chat in agent mode. The cloakapi tools appear in the tools list. Ask:
Use the cloakapi detect_pii tool on: "Please email Jane Doe at jane.doe@example.com or call +1 415 555 0134."The result reports "entity_count": 3.
Your prompts and the files the chat reads go to the chat’s model as usual, and tool results join the conversation. For the full tool list and what each tool sends, see What leaves the device and what does not.