universal-mcp 0.1.24rc6__py3-none-any.whl → 0.1.24rc8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/agentr/README.md +43 -34
- universal_mcp/agentr/__init__.py +1 -2
- universal_mcp/agentr/client.py +134 -48
- universal_mcp/agentr/registry.py +132 -41
- universal_mcp/agents/__init__.py +4 -4
- universal_mcp/agents/auto.py +8 -9
- universal_mcp/agents/autoagent/__init__.py +31 -0
- universal_mcp/agents/autoagent/__main__.py +21 -0
- universal_mcp/agents/autoagent/context.py +25 -0
- universal_mcp/agents/autoagent/graph.py +148 -0
- universal_mcp/agents/autoagent/prompts.py +8 -0
- universal_mcp/agents/autoagent/state.py +28 -0
- universal_mcp/agents/autoagent/studio.py +25 -0
- universal_mcp/agents/autoagent/utils.py +13 -0
- universal_mcp/agents/base.py +13 -10
- universal_mcp/agents/codeact/test.py +2 -2
- universal_mcp/agents/hil.py +2 -2
- universal_mcp/agents/llm.py +21 -3
- universal_mcp/agents/react.py +27 -7
- universal_mcp/agents/simple.py +14 -14
- universal_mcp/tools/registry.py +49 -7
- {universal_mcp-0.1.24rc6.dist-info → universal_mcp-0.1.24rc8.dist-info}/METADATA +4 -1
- {universal_mcp-0.1.24rc6.dist-info → universal_mcp-0.1.24rc8.dist-info}/RECORD +26 -19
- universal_mcp/agentr/agentr.py +0 -30
- {universal_mcp-0.1.24rc6.dist-info → universal_mcp-0.1.24rc8.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.24rc6.dist-info → universal_mcp-0.1.24rc8.dist-info}/entry_points.txt +0 -0
- {universal_mcp-0.1.24rc6.dist-info → universal_mcp-0.1.24rc8.dist-info}/licenses/LICENSE +0 -0
universal_mcp/tools/registry.py
CHANGED
@@ -1,17 +1,27 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
+
from universal_mcp.types import ToolConfig, ToolFormat
|
5
|
+
|
4
6
|
|
5
7
|
class ToolRegistry(ABC):
|
6
8
|
"""Abstract base class for platform-specific functionality.
|
7
9
|
|
8
10
|
This class abstracts away platform-specific operations like fetching apps,
|
9
|
-
loading actions, and managing integrations. This allows the
|
11
|
+
loading actions, and managing integrations. This allows the agents to
|
10
12
|
work with different platforms without being tightly coupled to any specific one.
|
13
|
+
|
14
|
+
The following methods are abstract and must be implemented by the subclass:
|
15
|
+
- list_all_apps: Get list of available apps from the platform.
|
16
|
+
- get_app_details: Get details of a specific app.
|
17
|
+
- search_apps: Search for apps by a query.
|
18
|
+
- list_tools: List all tools available on the platform, filter by app_id.
|
19
|
+
- search_tools: Search for tools by a query.
|
20
|
+
- export_tools: Export tools to required format.
|
11
21
|
"""
|
12
22
|
|
13
23
|
@abstractmethod
|
14
|
-
async def
|
24
|
+
async def list_all_apps(self) -> list[dict[str, Any]]:
|
15
25
|
"""Get list of available apps from the platform.
|
16
26
|
|
17
27
|
Returns:
|
@@ -32,10 +42,42 @@ class ToolRegistry(ABC):
|
|
32
42
|
pass
|
33
43
|
|
34
44
|
@abstractmethod
|
35
|
-
async def
|
36
|
-
|
45
|
+
async def search_apps(
|
46
|
+
self,
|
47
|
+
query: str,
|
48
|
+
limit: int = 2,
|
49
|
+
) -> list[dict[str, Any]]:
|
50
|
+
"""Search for apps by a query."""
|
51
|
+
pass
|
37
52
|
|
38
|
-
|
39
|
-
|
40
|
-
|
53
|
+
@abstractmethod
|
54
|
+
async def list_tools(
|
55
|
+
self,
|
56
|
+
app_id: str,
|
57
|
+
) -> list[dict[str, Any]]:
|
58
|
+
"""List all tools available on the platform, filter by app_id."""
|
59
|
+
pass
|
60
|
+
|
61
|
+
@abstractmethod
|
62
|
+
async def search_tools(
|
63
|
+
self,
|
64
|
+
query: str,
|
65
|
+
limit: int = 2,
|
66
|
+
app_id: str | None = None,
|
67
|
+
) -> list[dict[str, Any]]:
|
68
|
+
"""Search for tools by a query."""
|
69
|
+
pass
|
70
|
+
|
71
|
+
@abstractmethod
|
72
|
+
async def export_tools(
|
73
|
+
self,
|
74
|
+
tools: list[str] | ToolConfig,
|
75
|
+
format: ToolFormat,
|
76
|
+
) -> str:
|
77
|
+
"""Export giventools to required format."""
|
78
|
+
pass
|
79
|
+
|
80
|
+
@abstractmethod
|
81
|
+
async def call_tool(self, tool_name: str, tool_args: dict[str, Any]) -> dict[str, Any]:
|
82
|
+
"""Call a tool with the given name and arguments."""
|
41
83
|
pass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: universal-mcp
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.24rc8
|
4
4
|
Summary: Universal MCP acts as a middle ware for your API applications. It can store your credentials, authorize, enable disable apps on the fly and much more.
|
5
5
|
Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
|
6
6
|
License: MIT
|
@@ -9,9 +9,12 @@ Requires-Python: >=3.11
|
|
9
9
|
Requires-Dist: black>=25.1.0
|
10
10
|
Requires-Dist: cookiecutter>=2.6.0
|
11
11
|
Requires-Dist: gql>=4.0.0
|
12
|
+
Requires-Dist: httpx-aiohttp>=0.1.8
|
12
13
|
Requires-Dist: jinja2>=3.1.3
|
13
14
|
Requires-Dist: jsonref>=1.1.0
|
14
15
|
Requires-Dist: keyring>=25.6.0
|
16
|
+
Requires-Dist: langchain-anthropic>=0.3.19
|
17
|
+
Requires-Dist: langchain-google-vertexai>=2.0.28
|
15
18
|
Requires-Dist: langchain-mcp-adapters>=0.1.9
|
16
19
|
Requires-Dist: langchain-openai>=0.3.27
|
17
20
|
Requires-Dist: langgraph-cli[inmem]>=0.3.4
|
@@ -6,26 +6,33 @@ universal_mcp/exceptions.py,sha256=Uen8UFgLHGlSwXgRUyF-nhqTwdiBuL3okgBVRV2AgtA,2
|
|
6
6
|
universal_mcp/logger.py,sha256=VmH_83efpErLEDTJqz55Dp0dioTXfGvMBLZUx5smOLc,2116
|
7
7
|
universal_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
universal_mcp/types.py,sha256=jeUEkUnwdGWo3T_qSRSF83u0fYpuydaWzdKlCYBlCQA,770
|
9
|
-
universal_mcp/agentr/README.md,sha256=
|
10
|
-
universal_mcp/agentr/__init__.py,sha256=
|
11
|
-
universal_mcp/agentr/
|
12
|
-
universal_mcp/agentr/client.py,sha256=oyF6VKq56UMVf5L1WnFTMSZ85W8Qcy-5HZ5XOGiIELM,4139
|
9
|
+
universal_mcp/agentr/README.md,sha256=t15pVgkCwZM5wzgLgrf0Zv6hVL7dPmKXvAeTf8CiXPQ,6641
|
10
|
+
universal_mcp/agentr/__init__.py,sha256=fv1ZnOCduIUiJ9oN4e6Ya_hA2oWQvcEuDU3Ek1vEufI,180
|
11
|
+
universal_mcp/agentr/client.py,sha256=-oyNlR5hWSV9CFaTp3JmzP99P44_A0QJ-tMuY6LIGWk,7419
|
13
12
|
universal_mcp/agentr/integration.py,sha256=V5GjqocqS02tRoI8MeV9PL6m-BzejwBzgJhOHo4MxAE,4212
|
14
|
-
universal_mcp/agentr/registry.py,sha256=
|
13
|
+
universal_mcp/agentr/registry.py,sha256=O60qOsuby1GTkgc9GXVf9BjHmjMTyDbxqbDfIJ13CJ4,6583
|
15
14
|
universal_mcp/agentr/server.py,sha256=bIPmHMiKKwnUYnxmfZVRh1thcn7Rytm_-bNiXTfANzc,2098
|
16
|
-
universal_mcp/agents/__init__.py,sha256=
|
17
|
-
universal_mcp/agents/auto.py,sha256=
|
18
|
-
universal_mcp/agents/base.py,sha256=
|
15
|
+
universal_mcp/agents/__init__.py,sha256=AMBDQs3p5PePjzdoHYNoPYEsUK_PLHGNVPGxK7yrKVo,270
|
16
|
+
universal_mcp/agents/auto.py,sha256=BknCoeexTbFvwmVzYdGiiH72S_r6_5s9tmjH9M0I4d4,25410
|
17
|
+
universal_mcp/agents/base.py,sha256=o41gxvwOqWY0IZnupAHfKeH7OG0dgHUQDDpqntsFg6M,4128
|
19
18
|
universal_mcp/agents/cli.py,sha256=7GdRBpu9rhZPiC2vaNQXWI7K-0yCnvdlmE0IFpvy2Gk,539
|
20
|
-
universal_mcp/agents/hil.py,sha256=
|
21
|
-
universal_mcp/agents/llm.py,sha256=
|
22
|
-
universal_mcp/agents/react.py,sha256=
|
23
|
-
universal_mcp/agents/simple.py,sha256=
|
19
|
+
universal_mcp/agents/hil.py,sha256=6xi0hhK5g-rhCrAMcGbjcKMReLWPC8rnFZMBOF3N_cY,3687
|
20
|
+
universal_mcp/agents/llm.py,sha256=0HUI2Srh3RWtGyrjJCKqsroEgc1Rtkta3T8I1axl1mg,1232
|
21
|
+
universal_mcp/agents/react.py,sha256=g2PwqxYe7v7wCMDCCQhTtGU1eFmSsF4g7T_t9d-v0ho,3012
|
22
|
+
universal_mcp/agents/simple.py,sha256=JL8TFyXlA1F4zcArgKhlqVIbLWXetwM05z4MPDJgFeI,1367
|
24
23
|
universal_mcp/agents/tools.py,sha256=7Vdw0VZYxXVAzAYSpRKWHzVl9Ll6NOnVRlc4cTXguUQ,1335
|
25
24
|
universal_mcp/agents/utils.py,sha256=7kwFpD0Rv6JqHG-LlNCVwSu_xRX-N119mUmiBroHJL4,4109
|
25
|
+
universal_mcp/agents/autoagent/__init__.py,sha256=E_vMnFz8Z120qdqaKXPNP_--4Tes4jImen7m_iZvtVo,913
|
26
|
+
universal_mcp/agents/autoagent/__main__.py,sha256=ps0cT7b9DN-jQK8pOKFVRZf3Oz_dVSBSYWOa8sc7VNc,647
|
27
|
+
universal_mcp/agents/autoagent/context.py,sha256=1ic3sIL14XZeiMjpkwysLImRTQFKXRFSx7rvgVh4plY,802
|
28
|
+
universal_mcp/agents/autoagent/graph.py,sha256=f6RF9Cm1aiYTHoEhNHG_FNQrU-MgEb8QIHdg9pQSyuA,6390
|
29
|
+
universal_mcp/agents/autoagent/prompts.py,sha256=5EiQVE75LrERYAh29CltjMxI7znt_eW_LP4zX_7LxHY,502
|
30
|
+
universal_mcp/agents/autoagent/state.py,sha256=pTKbgTK8TTx7qIioVt98u9KZpeWacWaRmKJWRv3Jj40,791
|
31
|
+
universal_mcp/agents/autoagent/studio.py,sha256=nfVRzPXwBjDORHA0wln2k3Nz-zQXNKgZMvgeqBvkdtM,644
|
32
|
+
universal_mcp/agents/autoagent/utils.py,sha256=AFq-8scw_WlSZxDnTzxSNrOSiGYsIlqkqtQLDWf_rMU,431
|
26
33
|
universal_mcp/agents/codeact/__init__.py,sha256=5D_I3lI_3tWjZERRoFav_bPe9UDaJ53pDzZYtyixg3E,10097
|
27
34
|
universal_mcp/agents/codeact/sandbox.py,sha256=lGRzhuXTHCB1qauuOI3bH1-fPTsyL6Lf9EmMIz4C2xQ,1039
|
28
|
-
universal_mcp/agents/codeact/test.py,sha256=
|
35
|
+
universal_mcp/agents/codeact/test.py,sha256=AI3qWszpM46hF4wzuQm6A8g_UkhGmcg9KhHtk9u14ro,497
|
29
36
|
universal_mcp/agents/codeact/utils.py,sha256=VuMvLTxBBh3pgaJk8RWj5AK8XZFF-1gnZJ6jFLeM_CI,1690
|
30
37
|
universal_mcp/applications/__init__.py,sha256=HrCnGdAT7w4puw2_VulBfjOLku9D5DuMaOwAuQzu6nI,2067
|
31
38
|
universal_mcp/applications/application.py,sha256=pGF9Rb2D6qzlaSwlcfZ-dNqPtsLkQTqL3jpsRuJ6-qE,23835
|
@@ -44,7 +51,7 @@ universal_mcp/tools/adapters.py,sha256=YJ2oqgc8JgmtsdRRtvO-PO0Q0bKqTJ4Y3J6yxlESo
|
|
44
51
|
universal_mcp/tools/docstring_parser.py,sha256=efEOE-ME7G5Jbbzpn7pN2xNuyu2M5zfZ1Tqu1lRB0Gk,8392
|
45
52
|
universal_mcp/tools/func_metadata.py,sha256=F4jd--hoZWKPBbZihVtluYKUsIdXdq4a0VWRgMl5k-Q,10838
|
46
53
|
universal_mcp/tools/manager.py,sha256=24Rkn5Uvv_AuYAtjeMq986bJ7uzTaGE1290uB9eDtRE,10435
|
47
|
-
universal_mcp/tools/registry.py,sha256=
|
54
|
+
universal_mcp/tools/registry.py,sha256=etluwUwf2EfiGBoqQFZ1nf2xcPWtrJn0N4Qhcg7UGCU,2440
|
48
55
|
universal_mcp/tools/tools.py,sha256=Lk-wUO3rfhwdxaRANtC7lQr5fXi7nclf0oHzxNAb79Q,4927
|
49
56
|
universal_mcp/utils/__init__.py,sha256=8wi4PGWu-SrFjNJ8U7fr2iFJ1ktqlDmSKj1xYd7KSDc,41
|
50
57
|
universal_mcp/utils/common.py,sha256=3aJK3AnBkmYf-dbsFLaEu_dGuXQ0Qi2HuqYTueLVhXQ,10968
|
@@ -65,8 +72,8 @@ universal_mcp/utils/openapi/readme.py,sha256=R2Jp7DUXYNsXPDV6eFTkLiy7MXbSULUj1vH
|
|
65
72
|
universal_mcp/utils/openapi/test_generator.py,sha256=h44gQXEXmrw4pD3-XNHKB7T9c2lDomqrJxVO6oszCqM,12186
|
66
73
|
universal_mcp/utils/templates/README.md.j2,sha256=Mrm181YX-o_-WEfKs01Bi2RJy43rBiq2j6fTtbWgbTA,401
|
67
74
|
universal_mcp/utils/templates/api_client.py.j2,sha256=972Im7LNUAq3yZTfwDcgivnb-b8u6_JLKWXwoIwXXXQ,908
|
68
|
-
universal_mcp-0.1.
|
69
|
-
universal_mcp-0.1.
|
70
|
-
universal_mcp-0.1.
|
71
|
-
universal_mcp-0.1.
|
72
|
-
universal_mcp-0.1.
|
75
|
+
universal_mcp-0.1.24rc8.dist-info/METADATA,sha256=7ioJQnlDsraVLDJ-rGDX0xb-W5yBgZQkTMzPtke-7JQ,3143
|
76
|
+
universal_mcp-0.1.24rc8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
77
|
+
universal_mcp-0.1.24rc8.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
|
78
|
+
universal_mcp-0.1.24rc8.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
79
|
+
universal_mcp-0.1.24rc8.dist-info/RECORD,,
|
universal_mcp/agentr/agentr.py
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
|
3
|
-
from universal_mcp.tools import Tool, ToolFormat, ToolManager
|
4
|
-
|
5
|
-
from .client import AgentrClient
|
6
|
-
from .registry import AgentrRegistry
|
7
|
-
|
8
|
-
|
9
|
-
class Agentr:
|
10
|
-
def __init__(
|
11
|
-
self,
|
12
|
-
api_key: str | None = None,
|
13
|
-
base_url: str | None = None,
|
14
|
-
registry: AgentrRegistry | None = None,
|
15
|
-
format: ToolFormat | None = None,
|
16
|
-
manager: ToolManager | None = None,
|
17
|
-
):
|
18
|
-
self.api_key = api_key or os.getenv("AGENTR_API_KEY")
|
19
|
-
self.base_url = base_url or os.getenv("AGENTR_BASE_URL")
|
20
|
-
self.client = AgentrClient(api_key=self.api_key, base_url=self.base_url)
|
21
|
-
self.registry = registry or AgentrRegistry(client=self.client)
|
22
|
-
self.format = format or ToolFormat.NATIVE
|
23
|
-
self.manager = manager or ToolManager()
|
24
|
-
|
25
|
-
def load_tools(self, tool_names: list[str]) -> None:
|
26
|
-
self.registry.load_tools(tool_names, self.manager)
|
27
|
-
return
|
28
|
-
|
29
|
-
def list_tools(self, format: ToolFormat | None = None) -> list[Tool]:
|
30
|
-
return self.manager.list_tools(format=format or self.format)
|
File without changes
|
File without changes
|
File without changes
|