Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
42ab7f8
MCP Resources
h3xxit Aug 29, 2025
51fe2da
update minimum python version
h3xxit Aug 29, 2025
75e3a22
Update test.yml
h3xxit Aug 29, 2025
2b51248
core[dev] install fix
AndreiGS Aug 30, 2025
1dc0a0f
Fix plugin logs not showing and mcp register tools
AndreiGS Aug 31, 2025
5c145a3
Add tool name
AndreiGS Aug 31, 2025
133c187
Performance optimisation
AndreiGS Aug 31, 2025
a27941e
Update plugins/communication_protocols/http/src/utcp_http/http_commun…
h3xxit Sep 2, 2025
68b06be
Update plugins/communication_protocols/http/src/utcp_http/sse_communi…
h3xxit Sep 2, 2025
33785d0
Update plugins/communication_protocols/gql/src/utcp_gql/gql_communica…
h3xxit Sep 2, 2025
677ec11
Update plugins/communication_protocols/mcp/src/utcp_mcp/mcp_communica…
h3xxit Sep 2, 2025
0887a00
Update plugins/communication_protocols/cli/src/utcp_cli/cli_communica…
h3xxit Sep 2, 2025
26ba8c3
Update plugins/communication_protocols/text/src/utcp_text/text_commun…
h3xxit Sep 2, 2025
e4627ab
Merge pull request #56 from universal-tool-calling-protocol/docs/readme
h3xxit Sep 2, 2025
c685a6e
Revert mcp specific config
AndreiGS Sep 4, 2025
7c8f0d2
Add server name to mcp tool
AndreiGS Sep 4, 2025
c23b594
Fix mcp tests
AndreiGS Sep 4, 2025
1320bf5
Replace handlers with hasHandlers()
AndreiGS Sep 4, 2025
fe3aad0
Merge pull request #57 from universal-tool-calling-protocol/hotfix/mc…
h3xxit Sep 5, 2025
8a0a449
Enhance documentation: Move docs to class docstrings and improve READ…
perrozzi Sep 7, 2025
aa6f7e3
Copy Readme to core
h3xxit Sep 7, 2025
d8464a0
default logging via basicConfig
h3xxit Sep 7, 2025
666eb1e
Update minor versions of all projects
h3xxit Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ git clone https://github.com/universal-tool-calling-protocol/python-utcp.git
cd python-utcp

# Install the core package in editable mode with dev dependencies
pip install -e core[dev]
pip install -e "core[dev]"

# Install a specific protocol plugin in editable mode
pip install -e plugins/communication_protocols/http
Expand Down
2 changes: 1 addition & 1 deletion core/src/utcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

logger = logging.getLogger("utcp")

if not logger.handlers: # Only add default handler if user didn't configure logging
if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async def register_manual(self, manual_call_template: CallTemplate) -> RegisterM
raise ValueError(f"No registered communication protocol of type {manual_call_template.call_template_type} found, available types: {CommunicationProtocol.communication_protocols.keys()}")

result = await CommunicationProtocol.communication_protocols[manual_call_template.call_template_type].register_manual(self, manual_call_template)

if result.success:
for tool in result.manual.tools:
if not tool.name.startswith(manual_call_template.name + "."):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import json
import os
import shlex
import sys
from typing import Dict, Any, List, Optional, Callable, AsyncGenerator

from utcp.interfaces.communication_protocol import CommunicationProtocol
Expand All @@ -35,6 +36,12 @@

logger = logging.getLogger(__name__)

if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.INFO)


class CliCommunicationProtocol(CommunicationProtocol):
"""REQUIRED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import Dict, Any, List, Optional, Callable
import aiohttp
import asyncio
Expand All @@ -12,6 +13,13 @@

logger = logging.getLogger(__name__)

if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.INFO)


class GraphQLClientTransport(ClientTransportInterface):
"""
Simple, robust, production-ready GraphQL transport using gql.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Request/response handling with proper error management
"""

import sys
from typing import Dict, Any, List, Optional, Callable, AsyncGenerator
import aiohttp
import json
Expand All @@ -36,6 +37,12 @@

logger = logging.getLogger(__name__)

if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.INFO)

class HttpCommunicationProtocol(CommunicationProtocol):
"""REQUIRED
HTTP communication protocol implementation for UTCP client.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import Dict, Any, List, Optional, Callable, AsyncIterator, AsyncGenerator
import aiohttp
import json
Expand All @@ -21,6 +22,12 @@

logger = logging.getLogger(__name__)

if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.INFO)

class SseCommunicationProtocol(CommunicationProtocol):
"""REQUIRED
SSE communication protocol implementation for UTCP client.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import Dict, Any, List, Optional, Callable, AsyncIterator, Tuple, AsyncGenerator
import aiohttp
import json
Expand All @@ -18,6 +19,12 @@

logger = logging.getLogger(__name__)

if not logger.hasHandlers(): # Only add default handler if user didn't configure logging
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.INFO)

class StreamableHttpCommunicationProtocol(CommunicationProtocol):
"""REQUIRED
Streamable HTTP communication protocol implementation for UTCP client.
Expand Down
5 changes: 3 additions & 2 deletions plugins/communication_protocols/mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ authors = [
]
description = "UTCP communication protocol plugin for interoperability with the Model Context Protocol (MCP)."
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.0",
"mcp>=1.12",
"utcp>=1.0"
"utcp>=1.0",
"mcp-use>=1.3"
]
classifiers = [
"Development Status :: 4 - Beta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ class McpCallTemplate(CallTemplate):
config: Configuration object containing MCP server definitions.
This follows the same format as the official MCP server configuration.
auth: Optional OAuth2 authentication for HTTP-based MCP servers.
register_resources_as_tools: Whether to register MCP resources as callable tools.
When True, server resources are exposed as tools that can be called.
Default is False.
"""

call_template_type: Literal["mcp"] = "mcp"
config: McpConfig
auth: Optional[OAuth2Auth] = None
register_resources_as_tools: bool = False

class McpCallTemplateSerializer(Serializer[McpCallTemplate]):
"""REQUIRED
Expand Down
Loading
Loading