{"_id":"@alexma03/utcp-code-mode-mcp","_rev":"5-2433536e8e66278f0f13499725cce124","name":"@alexma03/utcp-code-mode-mcp","dist-tags":{"latest":"1.2.4"},"versions":{"1.2.0":{"name":"@alexma03/utcp-code-mode-mcp","version":"1.2.0","keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"author":{"name":"Alexma03"},"license":"MIT","_id":"@alexma03/utcp-code-mode-mcp@1.2.0","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"bin":{"mcp-bridge":"dist/index.js"},"dist":{"shasum":"6ca2d1cd3349b20ad1a20a79ba9a8c0f474f2e29","tarball":"https://registry.npmjs.org/@alexma03/utcp-code-mode-mcp/-/utcp-code-mode-mcp-1.2.0.tgz","fileCount":6,"integrity":"sha512-HSWwK6aZFT/7EX/PbUMHtUc82meWPiI5KSqn5TYmBmzR8+7ZgyWefkeDJD0c5PDiM5NeeImv/IZipov7z0hDJg==","signatures":[{"sig":"MEYCIQDqpJl0hwyR8kcNh44QFLFj1jYTxiF4MhJOkXWt4nzruAIhANlATPctPpmsqS2i0KqZF8SkFQ027Zy1CdqfSllnNkHO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36514},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.14.0 <25"},"gitHead":"97f8055784030184a8917378a6de581d7ae7f22d","scripts":{"build":"node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/code-mode-mcp"},"_npmVersion":"11.9.0","description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"3.25.76","dotenv":"16.0.0","@alexma03/utcp-cli":"workspace:*","@alexma03/utcp-mcp":"workspace:*","@alexma03/utcp-sdk":"workspace:*","@alexma03/utcp-file":"workspace:*","@alexma03/utcp-http":"workspace:*","@alexma03/utcp-text":"workspace:*","@alexma03/utcp-code-mode":"workspace:*","@modelcontextprotocol/sdk":"1.20.2","@alexma03/utcp-dotenv-loader":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.0.4","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-code-mode-mcp_1.2.0_1773650900385_0.3360698943497733","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@alexma03/utcp-code-mode-mcp","version":"1.2.1","keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"author":{"name":"Alexma03"},"license":"MIT","_id":"@alexma03/utcp-code-mode-mcp@1.2.1","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"bin":{"utcp-code-mode-mcp":"dist/index.js"},"dist":{"shasum":"e10892b21981700e66578df0d7893c1678937ce5","tarball":"https://registry.npmjs.org/@alexma03/utcp-code-mode-mcp/-/utcp-code-mode-mcp-1.2.1.tgz","fileCount":6,"integrity":"sha512-zWj1oQB1bqNb0npWh+0rgSglTYRWFy9MpAepSNP58bIJXN6IP7Jt9IwYAjFSUZOllWC0pQAt5BaZv58nwocOAQ==","signatures":[{"sig":"MEQCIDFGBWw7i3789YaNGFmcc1cl27fC2RWaiWn7JQFr/4N5AiBOAtJrNY19Qk0NRMSN6pcpNqSB1dBG83ha3R63tCnszg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34902},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.14.0 <25"},"gitHead":"e836da75819768e8584255bfb61e7bdee947b035","scripts":{"build":"node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/code-mode-mcp"},"_npmVersion":"11.9.0","description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"3.25.76","dotenv":"16.0.0","@alexma03/utcp-cli":"^1.1.0","@alexma03/utcp-mcp":"^1.1.1","@alexma03/utcp-sdk":"^1.1.0","@alexma03/utcp-file":"^1.1.0","@alexma03/utcp-http":"^1.1.1","@alexma03/utcp-text":"^1.1.0","@alexma03/utcp-code-mode":"^1.2.11","@modelcontextprotocol/sdk":"1.20.2","@alexma03/utcp-dotenv-loader":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.0.4","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-code-mode-mcp_1.2.1_1773651436047_0.6114102152331444","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@alexma03/utcp-code-mode-mcp","version":"1.2.2","keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"author":{"name":"Alexma03"},"license":"MIT","_id":"@alexma03/utcp-code-mode-mcp@1.2.2","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"bin":{"utcp-code-mode-mcp":"bin/utcp-code-mode-mcp.js"},"dist":{"shasum":"27babd1fb77126669a4947abf4c21c9952fcda03","tarball":"https://registry.npmjs.org/@alexma03/utcp-code-mode-mcp/-/utcp-code-mode-mcp-1.2.2.tgz","fileCount":7,"integrity":"sha512-spNjNZC0Xu9+xtS+VJKz1Es0WvOx68K400g2r639ASQkKE7yaeziXw7ugMamDTYKMAb/ZrSqLeEiOqALASMuKA==","signatures":[{"sig":"MEYCIQDvmpAdb68GSe/Ot1uIs2VjCjAqZ9WBrUQwyPzYHZlFzwIhAOQYpfMNqvd1ro3aPgC2xdSoZo9qsxvX54fOBX1YbqkA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35004},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.14.0 <25"},"gitHead":"e836da75819768e8584255bfb61e7bdee947b035","scripts":{"build":"node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/code-mode-mcp"},"_npmVersion":"11.9.0","description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"3.25.76","dotenv":"16.0.0","@alexma03/utcp-cli":"^1.1.0","@alexma03/utcp-mcp":"^1.1.1","@alexma03/utcp-sdk":"^1.1.0","@alexma03/utcp-file":"^1.1.0","@alexma03/utcp-http":"^1.1.1","@alexma03/utcp-text":"^1.1.0","@alexma03/utcp-code-mode":"^1.2.11","@modelcontextprotocol/sdk":"1.20.2","@alexma03/utcp-dotenv-loader":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.0.4","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-code-mode-mcp_1.2.2_1773651573600_0.12584959934236517","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@alexma03/utcp-code-mode-mcp","version":"1.2.3","keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"author":{"name":"Alexma03"},"license":"MIT","_id":"@alexma03/utcp-code-mode-mcp@1.2.3","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"bin":{"utcp-code-mode-mcp":"bin/utcp-code-mode-mcp.js"},"dist":{"shasum":"df0c46e4f035a38214f92458a7ec4784f88e9d08","tarball":"https://registry.npmjs.org/@alexma03/utcp-code-mode-mcp/-/utcp-code-mode-mcp-1.2.3.tgz","fileCount":7,"integrity":"sha512-eQV/MJoXbso8QznHSLeC6cmjFO6F7SrimnjW3Sj48BsoLup07Jy1lBJr6uzyIoouvwgsSeaVJUttD72R/PF4YQ==","signatures":[{"sig":"MEUCIHe2lVjSGt44nh9EqKoMvA04CeDBrHLAqZqje9BHTgt2AiEA+9MW11hvKy1C92JyAF+Xc9gs/hsu6y2fo/GOte03RU4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33037},"main":"dist/index.js","type":"module","_from":"file:alexma03-utcp-code-mode-mcp-1.2.3.tgz","types":"./dist/index.d.ts","engines":{"node":">=24.14.0 <25"},"scripts":{"build":"node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc","start":"node dist/index.js"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"_resolved":"/private/var/folders/mw/dp007xzd5sz9vkhkjfz0fdh40000gn/T/6030893cd785133dc5ffc3582d576eb2/alexma03-utcp-code-mode-mcp-1.2.3.tgz","_integrity":"sha512-eQV/MJoXbso8QznHSLeC6cmjFO6F7SrimnjW3Sj48BsoLup07Jy1lBJr6uzyIoouvwgsSeaVJUttD72R/PF4YQ==","repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/code-mode-mcp"},"_npmVersion":"11.9.0","description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"3.25.76","dotenv":"16.0.0","@alexma03/utcp-cli":"^1.1.2","@alexma03/utcp-mcp":"^1.1.2","@alexma03/utcp-sdk":"^1.1.1","@alexma03/utcp-file":"^1.1.2","@alexma03/utcp-http":"^1.1.3","@alexma03/utcp-text":"^1.1.2","@alexma03/utcp-code-mode":"^1.2.13","@modelcontextprotocol/sdk":"1.20.2","@alexma03/utcp-dotenv-loader":"^1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.0.4","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-code-mode-mcp_1.2.3_1773735261895_0.8317046525555098","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@alexma03/utcp-code-mode-mcp","version":"1.2.4","description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","type":"module","main":"dist/index.js","bin":{"utcp-code-mode-mcp":"bin/utcp-code-mode-mcp.js"},"keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"author":{"name":"Alexma03"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Alexma03/alexma03-utcp.git","directory":"packages/code-mode-mcp"},"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"engines":{"node":">=24.14.0 <25"},"publishConfig":{"access":"public"},"devDependencies":{"@types/node":"^20.0.0","typescript":"5.0.4"},"dependencies":{"@modelcontextprotocol/sdk":"1.20.2","@alexma03/utcp-cli":"^1.1.2","@alexma03/utcp-code-mode":"^1.2.14","@alexma03/utcp-dotenv-loader":"^1.1.2","@alexma03/utcp-file":"^1.1.2","@alexma03/utcp-http":"^1.1.3","@alexma03/utcp-mcp":"^1.1.2","@alexma03/utcp-sdk":"^1.1.1","@alexma03/utcp-text":"^1.1.2","dotenv":"16.0.0","zod":"3.25.76"},"scripts":{"build":"node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc","start":"node dist/index.js"},"types":"./dist/index.d.ts","_id":"@alexma03/utcp-code-mode-mcp@1.2.4","_integrity":"sha512-c2SwlWNKaK0pKsehcOPZldN7w0d+g9SesLYKSTCcFYTCbAgsOm2JiqJsmHxZ9l/FQOr7RdEB4ACPqYwhxLRxTw==","_resolved":"/private/var/folders/mw/dp007xzd5sz9vkhkjfz0fdh40000gn/T/ef6f9958504928283c4a2c5a78dcaf8a/alexma03-utcp-code-mode-mcp-1.2.4.tgz","_from":"file:alexma03-utcp-code-mode-mcp-1.2.4.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-c2SwlWNKaK0pKsehcOPZldN7w0d+g9SesLYKSTCcFYTCbAgsOm2JiqJsmHxZ9l/FQOr7RdEB4ACPqYwhxLRxTw==","shasum":"509bfb66614c3b84b1d06fb46d6c19636ddc67d3","tarball":"https://registry.npmjs.org/@alexma03/utcp-code-mode-mcp/-/utcp-code-mode-mcp-1.2.4.tgz","fileCount":7,"unpackedSize":34811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBW7OGHG8e0BkbxNmo0XgqF2P7iwqHBZ7jKJ5K1/KUDVAiBIkPJsy8i+slKkL96hv3dybEZGUs6ZZgxvc9xKE55yKw=="}]},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"directories":{},"maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utcp-code-mode-mcp_1.2.4_1774116793230_0.28072283210898563"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T08:48:20.272Z","modified":"2026-03-21T18:13:13.556Z","1.2.0":"2026-03-16T08:48:20.512Z","1.2.1":"2026-03-16T08:57:16.189Z","1.2.2":"2026-03-16T08:59:33.743Z","1.2.3":"2026-03-17T08:14:22.037Z","1.2.4":"2026-03-21T18:13:13.435Z"},"bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"author":{"name":"Alexma03"},"license":"MIT","homepage":"https://github.com/Alexma03/alexma03-utcp#readme","keywords":["utcp","mcp","code-mode","typescript","model-context-protocol","universal-tool-calling-protocol","bridge","tools","ai","code-execution"],"repository":{"type":"git","url":"git+https://github.com/Alexma03/alexma03-utcp.git","directory":"packages/code-mode-mcp"},"description":"Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"readme":"# @alexma03/utcp-code-mode-mcp\n\nMCP server for UTCP Code Mode. It exposes MCP tools that let an MCP client discover UTCP tools, inspect their TypeScript interfaces, register manuals dynamically, and execute TypeScript code with direct tool access.\n\nThis project is a fork of `universal-tool-calling-protocol`:\nhttps://github.com/universal-tool-calling-protocol\n\n## Installation\n\nYou can run it directly with `npx`:\n\n```bash\nnpx -y @alexma03/utcp-code-mode-mcp\n```\n\nYou can also install it locally:\n\n```bash\nnpm install @alexma03/utcp-code-mode-mcp\n```\n\n## MCP Client Configuration\n\nIf you want to use the published package from an MCP client such as Windsurf, configure it like this:\n\n```json\n{\n  \"alexma03-utcp-code-mode\": {\n    \"command\": \"npx\",\n    \"args\": [\n      \"-y\",\n      \"@alexma03/utcp-code-mode-mcp\"\n    ],\n    \"env\": {\n      \"UTCP_CONFIG_FILE\": \"/Users/alex03/.utcp_config.json\"\n    }\n  }\n}\n```\n\nThe `UTCP_CONFIG_FILE` environment variable should point to the UTCP configuration file that defines manuals, loaders, repositories, and search strategy.\n\n## Runtime Requirements\n\n- Node `>=24.14.0 <25`\n- On macOS arm64, Node 25+ is explicitly rejected\n- `npx` must be available in the environment where the MCP client runs\n\n## UTCP Configuration\n\nThe bridge loads UTCP configuration in this order:\n\n1. `UTCP_CONFIG_FILE`\n2. `.utcp_config.json` in the current working directory\n3. `.utcp_config.json` next to the installed package\n\nExample `.utcp_config.json`:\n\n```json\n{\n  \"load_variables_from\": [\n    {\n      \"variable_loader_type\": \"dotenv\",\n      \"env_file_path\": \".env\"\n    }\n  ],\n  \"manual_call_templates\": [\n    {\n      \"name\": \"openlibrary\",\n      \"call_template_type\": \"http\",\n      \"http_method\": \"GET\",\n      \"url\": \"https://openlibrary.org/static/openapi.json\",\n      \"content_type\": \"application/json\"\n    }\n  ],\n  \"post_processing\": [\n    {\n      \"tool_post_processor_type\": \"filter_dict\",\n      \"only_include_keys\": [\n        \"name\",\n        \"description\"\n      ],\n      \"only_include_tools\": [\n        \"openlibrary.*\"\n      ]\n    }\n  ],\n  \"tool_repository\": {\n    \"tool_repository_type\": \"in_memory\"\n  },\n  \"tool_search_strategy\": {\n    \"tool_search_strategy_type\": \"tag_and_description_word_match\"\n  }\n}\n```\n\n## Exposed MCP Tools\n\nThis MCP server exposes these tools:\n\n- `register_manual`\n- `deregister_manual`\n- `search_tools`\n- `list_tools`\n- `get_required_keys_for_tool`\n- `tools_info`\n- `call_tool_chain`\n\n## What `call_tool_chain` Does\n\n`call_tool_chain` executes TypeScript code with direct access to registered tools as hierarchical functions. Your code runs inside an async function, so top-level `await` is fully supported.\n\nExamples:\n\n```typescript\n// Simple call — both sync and await styles work\nreturn some_manual.some_tool({ query: \"example\" });\nreturn await some_manual.some_tool({ query: \"example\" });\n\n// Chaining multiple tools\nconst user = some_manual.get_user({});\nconst workspaces = some_manual.get_workspaces({ userId: user.id });\nreturn workspaces;\n\n// Async IIFE also works (though not needed since top-level await is supported)\nconst result = await (async () => {\n  const data = await some_manual.some_tool({ query: \"example\" });\n  return data;\n})();\nreturn result;\n\n// Console output is captured in the logs array\nconsole.log(\"debug info\");\nreturn some_manual.some_tool({ query: \"example\" });\n```\n\nYou can combine multiple tool calls inside the same execution and return structured results.\n\n## Tool Naming\n\nUTCP tools are mapped into TypeScript-friendly access paths. A tool with a UTCP name like:\n\n```text\nmy_manual.server.echo\n```\n\nis exposed in code-mode as a hierarchical TypeScript path derived from that name.\n\n## Notes\n\n- `stdout` is reserved for MCP stdio transport, so informational logs are redirected away from normal stdout behavior\n- The package initializes core UTCP plugins and imports HTTP, text, MCP, CLI, dotenv-loader, and file integrations\n- If the runtime is unsupported, the process exits with a clear error\n\n## Development\n\nBuild:\n\n```bash\nnpm run build\n```\n\nStart from source build output:\n\n```bash\nnpm start\n```\n\nDry-run package contents:\n\n```bash\nnpm pack --dry-run\n```\n","readmeFilename":"README.md"}