@alexma03/utcp-code-mode-mcp
v1.2.3
Published
Model Context Protocol (MCP) server for UTCP Code Mode - Execute TypeScript code with direct tool access
Downloads
179
Maintainers
Readme
@alexma03/utcp-code-mode-mcp
MCP 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.
This project is a fork of universal-tool-calling-protocol:
https://github.com/universal-tool-calling-protocol
Installation
You can run it directly with npx:
npx -y @alexma03/utcp-code-mode-mcpYou can also install it locally:
npm install @alexma03/utcp-code-mode-mcpMCP Client Configuration
If you want to use the published package from an MCP client such as Windsurf, configure it like this:
{
"alexma03-utcp-code-mode": {
"command": "npx",
"args": [
"-y",
"@alexma03/utcp-code-mode-mcp"
],
"env": {
"UTCP_CONFIG_FILE": "/Users/alex03/.utcp_config.json"
}
}
}The UTCP_CONFIG_FILE environment variable should point to the UTCP configuration file that defines manuals, loaders, repositories, and search strategy.
Runtime Requirements
- Node
>=24.14.0 <25 - On macOS arm64, Node 25+ is explicitly rejected
npxmust be available in the environment where the MCP client runs
UTCP Configuration
The bridge loads UTCP configuration in this order:
UTCP_CONFIG_FILE.utcp_config.jsonin the current working directory.utcp_config.jsonnext to the installed package
Example .utcp_config.json:
{
"load_variables_from": [
{
"variable_loader_type": "dotenv",
"env_file_path": ".env"
}
],
"manual_call_templates": [
{
"name": "openlibrary",
"call_template_type": "http",
"http_method": "GET",
"url": "https://openlibrary.org/static/openapi.json",
"content_type": "application/json"
}
],
"post_processing": [
{
"tool_post_processor_type": "filter_dict",
"only_include_keys": [
"name",
"description"
],
"only_include_tools": [
"openlibrary.*"
]
}
],
"tool_repository": {
"tool_repository_type": "in_memory"
},
"tool_search_strategy": {
"tool_search_strategy_type": "tag_and_description_word_match"
}
}Exposed MCP Tools
This MCP server exposes these tools:
register_manualderegister_manualsearch_toolslist_toolsget_required_keys_for_tooltools_infocall_tool_chain
What call_tool_chain Does
call_tool_chain executes TypeScript code with direct access to registered tools as hierarchical functions.
Example shape:
return await some_manual.some_tool({
query: "example"
});You can combine multiple tool calls inside the same execution and return structured results.
Tool Naming
UTCP tools are mapped into TypeScript-friendly access paths. A tool with a UTCP name like:
my_manual.server.echois exposed in code-mode as a hierarchical TypeScript path derived from that name.
Notes
stdoutis reserved for MCP stdio transport, so informational logs are redirected away from normal stdout behavior- The package initializes core UTCP plugins and imports HTTP, text, MCP, CLI, dotenv-loader, and file integrations
- If the runtime is unsupported, the process exits with a clear error
Development
Build:
npm run buildStart from source build output:
npm startDry-run package contents:
npm pack --dry-run