-
Notifications
You must be signed in to change notification settings - Fork 0
Add TypeScript Universal Tool Calling Protocol (UTCP) support with backward compatibility #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: chr33s <[email protected]>
Co-authored-by: chr33s <[email protected]>
chr33s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot refactor server.ts to split the mcp code into mcp.ts, keeping only the shared implementation in server.ts. Then rename utcp-adapter.ts to utcp.ts
…apter.ts to utcp.ts Co-authored-by: chr33s <[email protected]>
Refactoring completed successfully! I've split the server code into three focused modules:
All imports have been updated across cli.ts, worker.ts, and tests.ts. The refactoring maintains full functionality with all 37 tests passing. Commit: 2cb88da |
chr33s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot consolidate mcp.ts, utcp.ts into server.ts
Co-authored-by: chr33s <[email protected]>
Consolidation completed successfully! I've moved all code from mcp.ts and utcp.ts into server.ts and updated all imports across the codebase. The single file now contains shared utilities, MCP implementation, and UTCP implementation while maintaining all functionality. All 37 tests pass and code quality checks are clean. Commit: 8181189 |
This PR implements complete support for the TypeScript Universal Tool Calling Protocol (UTCP) while maintaining 100% backward compatibility with the existing Model Context Protocol (MCP) implementation.
Overview
The repository now supports both protocols:
Key Features Added
UTCP Server Implementation
--transport utcpoption that starts an HTTP serverGET /utcpreturns UTCP manual with available toolsPOST /tools/{tool_name}for calling specific toolslist_doc_sourcesandfetch_docs) available in UTCP formatUsage Examples
UTCP Client Integration
The server works with standard UTCP clients:
Implementation Details
Architecture
src/utcp-adapter.ts) - Converts MCP tools to UTCP formatTool Compatibility
Both protocols expose identical functionality:
list_doc_sourcesPOST /tools/list_doc_sourcesfetch_docsPOST /tools/fetch_docsBackward Compatibility
Testing & Quality
Documentation Updates
examples/directory with usage patterns for both protocolssample_providers.jsonfor UTCP client configurationThis implementation provides a seamless migration path to UTCP while preserving all existing MCP functionality, making mcpdoc compatible with both traditional MCP applications and modern HTTP-based tool calling systems.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/universal-tool-calling-protocol/typescript-utcp/contents/package.jsoncurl -s REDACTED(http block)langchain-ai.github.ionode dist/cli.js --transport utcp --urls LangGraph:REDACTED --host 127.0.0.1 --port 8082 --allowed-domains *(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.