universal-mcp 0.1.24rc4__py3-none-any.whl → 0.1.24rc7__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/agentr.py +7 -0
- universal_mcp/agentr/client.py +96 -42
- universal_mcp/agentr/registry.py +21 -25
- universal_mcp/agents/__init__.py +4 -4
- universal_mcp/agents/auto.py +8 -8
- universal_mcp/agents/autoagent/__init__.py +35 -0
- universal_mcp/agents/autoagent/__main__.py +21 -0
- universal_mcp/agents/autoagent/context.py +25 -0
- universal_mcp/agents/autoagent/graph.py +119 -0
- universal_mcp/agents/autoagent/prompts.py +5 -0
- universal_mcp/agents/autoagent/state.py +27 -0
- universal_mcp/agents/autoagent/studio.py +25 -0
- universal_mcp/agents/autoagent/utils.py +13 -0
- universal_mcp/agents/base.py +24 -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 +32 -24
- universal_mcp/agents/simple.py +3 -3
- universal_mcp/agents/tools.py +35 -0
- universal_mcp/config.py +0 -93
- universal_mcp/tools/manager.py +15 -22
- universal_mcp/tools/registry.py +13 -3
- universal_mcp/tools/tools.py +11 -5
- universal_mcp/types.py +25 -0
- {universal_mcp-0.1.24rc4.dist-info → universal_mcp-0.1.24rc7.dist-info}/METADATA +6 -6
- {universal_mcp-0.1.24rc4.dist-info → universal_mcp-0.1.24rc7.dist-info}/RECORD +31 -22
- {universal_mcp-0.1.24rc4.dist-info → universal_mcp-0.1.24rc7.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.24rc4.dist-info → universal_mcp-0.1.24rc7.dist-info}/entry_points.txt +0 -0
- {universal_mcp-0.1.24rc4.dist-info → universal_mcp-0.1.24rc7.dist-info}/licenses/LICENSE +0 -0
universal_mcp/tools/registry.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
+
from universal_mcp.tools.manager import ToolManager
|
5
|
+
|
4
6
|
|
5
7
|
class ToolRegistry(ABC):
|
6
8
|
"""Abstract base class for platform-specific functionality.
|
@@ -11,7 +13,7 @@ class ToolRegistry(ABC):
|
|
11
13
|
"""
|
12
14
|
|
13
15
|
@abstractmethod
|
14
|
-
|
16
|
+
def list_apps(self) -> list[dict[str, Any]]:
|
15
17
|
"""Get list of available apps from the platform.
|
16
18
|
|
17
19
|
Returns:
|
@@ -20,7 +22,7 @@ class ToolRegistry(ABC):
|
|
20
22
|
pass
|
21
23
|
|
22
24
|
@abstractmethod
|
23
|
-
|
25
|
+
def get_app_details(self, app_id: str) -> dict[str, Any]:
|
24
26
|
"""Get detailed information about a specific app.
|
25
27
|
|
26
28
|
Args:
|
@@ -32,10 +34,18 @@ class ToolRegistry(ABC):
|
|
32
34
|
pass
|
33
35
|
|
34
36
|
@abstractmethod
|
35
|
-
|
37
|
+
def load_tools(self, tools: list[str], tool_manager: ToolManager) -> None:
|
36
38
|
"""Load tools from the platform and register them as tools.
|
37
39
|
|
38
40
|
Args:
|
39
41
|
tools: The list of tools to load
|
40
42
|
"""
|
41
43
|
pass
|
44
|
+
|
45
|
+
@abstractmethod
|
46
|
+
def search_tools(
|
47
|
+
self,
|
48
|
+
query: str,
|
49
|
+
) -> list[str]:
|
50
|
+
"""Retrieve a tool to use, given a search query."""
|
51
|
+
pass
|
universal_mcp/tools/tools.py
CHANGED
@@ -7,6 +7,7 @@ from pydantic import BaseModel, Field, create_model
|
|
7
7
|
|
8
8
|
from universal_mcp.exceptions import NotAuthorizedError, ToolError
|
9
9
|
from universal_mcp.tools.docstring_parser import parse_docstring
|
10
|
+
from universal_mcp.types import TOOL_NAME_SEPARATOR
|
10
11
|
|
11
12
|
from .func_metadata import FuncMetadata
|
12
13
|
|
@@ -31,8 +32,9 @@ class Tool(BaseModel):
|
|
31
32
|
"""Internal tool registration info."""
|
32
33
|
|
33
34
|
fn: Callable[..., Any] = Field(exclude=True)
|
34
|
-
|
35
|
-
|
35
|
+
app_name: str | None = Field(default=None, description="Name of the app that the tool belongs to")
|
36
|
+
tool_name: str = Field(description="Name of the tool")
|
37
|
+
description: str | None = Field(default=None, description="Summary line from the tool's docstring")
|
36
38
|
args_description: dict[str, str] = Field(
|
37
39
|
default_factory=dict, description="Descriptions of arguments from the docstring"
|
38
40
|
)
|
@@ -44,11 +46,15 @@ class Tool(BaseModel):
|
|
44
46
|
tags: list[str] = Field(default_factory=list, description="Tags for categorizing the tool")
|
45
47
|
parameters: dict[str, Any] = Field(description="JSON schema for tool parameters")
|
46
48
|
output_schema: dict[str, Any] | None = Field(default=None, description="JSON schema for tool output")
|
47
|
-
fn_metadata: FuncMetadata = Field(
|
48
|
-
description="Metadata about the function including a pydantic model for tool arguments"
|
49
|
+
fn_metadata: FuncMetadata | None = Field(
|
50
|
+
default=None, description="Metadata about the function including a pydantic model for tool arguments"
|
49
51
|
)
|
50
52
|
is_async: bool = Field(description="Whether the tool is async")
|
51
53
|
|
54
|
+
@property
|
55
|
+
def name(self) -> str:
|
56
|
+
return f"{self.app_name}{TOOL_NAME_SEPARATOR}{self.tool_name}" if self.app_name else self.tool_name
|
57
|
+
|
52
58
|
@classmethod
|
53
59
|
def from_function(
|
54
60
|
cls,
|
@@ -81,7 +87,7 @@ class Tool(BaseModel):
|
|
81
87
|
|
82
88
|
return cls(
|
83
89
|
fn=fn,
|
84
|
-
|
90
|
+
tool_name=func_name,
|
85
91
|
description=parsed_doc["summary"],
|
86
92
|
args_description=simple_args_descriptions,
|
87
93
|
returns_description=parsed_doc["returns"],
|
universal_mcp/types.py
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
from enum import Enum
|
2
|
+
from typing import Literal
|
3
|
+
|
4
|
+
from pydantic import BaseModel
|
5
|
+
|
6
|
+
# Constants
|
7
|
+
DEFAULT_IMPORTANT_TAG = "important"
|
8
|
+
TOOL_NAME_SEPARATOR = "__"
|
9
|
+
DEFAULT_APP_NAME = "common"
|
2
10
|
|
3
11
|
|
4
12
|
class ToolFormat(str, Enum):
|
@@ -8,3 +16,20 @@ class ToolFormat(str, Enum):
|
|
8
16
|
MCP = "mcp"
|
9
17
|
LANGCHAIN = "langchain"
|
10
18
|
OPENAI = "openai"
|
19
|
+
|
20
|
+
|
21
|
+
class AgentrConnection(BaseModel):
|
22
|
+
tools: list[str]
|
23
|
+
|
24
|
+
|
25
|
+
class MCPConnection(BaseModel):
|
26
|
+
transport: Literal["stdio", "sse", "streamable-http"]
|
27
|
+
command: str | None = None
|
28
|
+
args: list[str] | None = None
|
29
|
+
url: str | None = None
|
30
|
+
headers: dict[str, str] | None = None
|
31
|
+
|
32
|
+
|
33
|
+
class ToolConfig(BaseModel):
|
34
|
+
mcpServers: dict[str, MCPConnection] | None = None
|
35
|
+
agentrServers: dict[str, AgentrConnection] | None = None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: universal-mcp
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.24rc7
|
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
|
@@ -8,10 +8,13 @@ License-File: LICENSE
|
|
8
8
|
Requires-Python: >=3.11
|
9
9
|
Requires-Dist: black>=25.1.0
|
10
10
|
Requires-Dist: cookiecutter>=2.6.0
|
11
|
-
Requires-Dist: gql
|
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
|
@@ -19,24 +22,21 @@ Requires-Dist: langgraph>=0.5.2
|
|
19
22
|
Requires-Dist: langsmith>=0.4.5
|
20
23
|
Requires-Dist: loguru>=0.7.3
|
21
24
|
Requires-Dist: mcp>=1.10.0
|
22
|
-
Requires-Dist: mkdocs-material>=9.6.15
|
23
|
-
Requires-Dist: mkdocs>=1.6.1
|
24
25
|
Requires-Dist: posthog>=3.24.0
|
25
26
|
Requires-Dist: pydantic-settings>=2.8.1
|
26
27
|
Requires-Dist: pydantic>=2.11.1
|
27
28
|
Requires-Dist: pyyaml>=6.0.2
|
28
29
|
Requires-Dist: rich>=14.0.0
|
29
30
|
Requires-Dist: streamlit>=1.46.1
|
30
|
-
Requires-Dist: ty>=0.0.1a17
|
31
31
|
Requires-Dist: typer>=0.15.2
|
32
32
|
Provides-Extra: dev
|
33
33
|
Requires-Dist: litellm>=1.30.7; extra == 'dev'
|
34
|
-
Requires-Dist: mypy>=1.16.0; extra == 'dev'
|
35
34
|
Requires-Dist: pre-commit>=4.2.0; extra == 'dev'
|
36
35
|
Requires-Dist: pyright>=1.1.398; extra == 'dev'
|
37
36
|
Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
|
38
37
|
Requires-Dist: pytest>=8.3.5; extra == 'dev'
|
39
38
|
Requires-Dist: ruff>=0.11.4; extra == 'dev'
|
39
|
+
Requires-Dist: ty>=0.0.1a17; extra == 'dev'
|
40
40
|
Provides-Extra: docs
|
41
41
|
Requires-Dist: mkdocs-glightbox>=0.4.0; extra == 'docs'
|
42
42
|
Requires-Dist: mkdocs-material[imaging]>=9.5.45; extra == 'docs'
|
@@ -1,30 +1,39 @@
|
|
1
1
|
universal_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
universal_mcp/analytics.py,sha256=RzS88HSvJRGMjdJeLHnOgWzfKSb1jVnvOcD7NHqfERw,3733
|
3
3
|
universal_mcp/cli.py,sha256=pPnIWLhSrLV9ukI8YAg2znehCR3VovhEkmh8XkRT3MU,2505
|
4
|
-
universal_mcp/config.py,sha256=
|
4
|
+
universal_mcp/config.py,sha256=lOlDAgQMT7f6VymmsuCP9sYLlxGKj0hDF3hFcJ2nzS4,8135
|
5
5
|
universal_mcp/exceptions.py,sha256=Uen8UFgLHGlSwXgRUyF-nhqTwdiBuL3okgBVRV2AgtA,2150
|
6
6
|
universal_mcp/logger.py,sha256=VmH_83efpErLEDTJqz55Dp0dioTXfGvMBLZUx5smOLc,2116
|
7
7
|
universal_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
universal_mcp/types.py,sha256=
|
9
|
-
universal_mcp/agentr/README.md,sha256=
|
8
|
+
universal_mcp/types.py,sha256=jeUEkUnwdGWo3T_qSRSF83u0fYpuydaWzdKlCYBlCQA,770
|
9
|
+
universal_mcp/agentr/README.md,sha256=t15pVgkCwZM5wzgLgrf0Zv6hVL7dPmKXvAeTf8CiXPQ,6641
|
10
10
|
universal_mcp/agentr/__init__.py,sha256=ogOhH_OJwkoUZu_2nQJc7-vEGmYQxEjOE511-6ubrX0,217
|
11
|
-
universal_mcp/agentr/agentr.py,sha256=
|
12
|
-
universal_mcp/agentr/client.py,sha256=
|
11
|
+
universal_mcp/agentr/agentr.py,sha256=kTUiBpDl4ODuXit9VE_ZXW28IKpCqEnJDNtMXi2B3Pc,1245
|
12
|
+
universal_mcp/agentr/client.py,sha256=B4pjIpfD5nDCZ9qldKIqlBV8DISrkTRrajCIQK4r4Hs,6232
|
13
13
|
universal_mcp/agentr/integration.py,sha256=V5GjqocqS02tRoI8MeV9PL6m-BzejwBzgJhOHo4MxAE,4212
|
14
|
-
universal_mcp/agentr/registry.py,sha256=
|
14
|
+
universal_mcp/agentr/registry.py,sha256=BOxy9iuJagKLmH9komaabwXvUglrsWbpRX8WY9xJ7lI,3115
|
15
15
|
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=
|
16
|
+
universal_mcp/agents/__init__.py,sha256=ZkdQ71fn838LvYdyln6fL1mUMUUCZRZMyqos4aW2_I4,265
|
17
|
+
universal_mcp/agents/auto.py,sha256=UUx3p9riLww2OwRg0pg10mWzWdDNydBrKJ-UdwzAQSk,25411
|
18
|
+
universal_mcp/agents/base.py,sha256=uRb-flv_pdKfDJnHID1c-loYt-EvlAgFmB1_wJQNhUs,4152
|
19
19
|
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=
|
20
|
+
universal_mcp/agents/hil.py,sha256=6xi0hhK5g-rhCrAMcGbjcKMReLWPC8rnFZMBOF3N_cY,3687
|
21
|
+
universal_mcp/agents/llm.py,sha256=0HUI2Srh3RWtGyrjJCKqsroEgc1Rtkta3T8I1axl1mg,1232
|
22
|
+
universal_mcp/agents/react.py,sha256=kAyTS68xzBLWRNgjJrLSP85o1ligz_ziatdlMZAavnA,2385
|
23
|
+
universal_mcp/agents/simple.py,sha256=CXmwJq7jvxAoDJifNK7jKJTMKG4Pvre75x-k2CE-ZEM,1202
|
24
|
+
universal_mcp/agents/tools.py,sha256=7Vdw0VZYxXVAzAYSpRKWHzVl9Ll6NOnVRlc4cTXguUQ,1335
|
24
25
|
universal_mcp/agents/utils.py,sha256=7kwFpD0Rv6JqHG-LlNCVwSu_xRX-N119mUmiBroHJL4,4109
|
26
|
+
universal_mcp/agents/autoagent/__init__.py,sha256=Vfm8brM9TNXCjKbVXV-CAPg_BVnYHOn6RVmkS0EaNV0,1072
|
27
|
+
universal_mcp/agents/autoagent/__main__.py,sha256=FUSETuCDMpp7VSis0UFDnpI32HmQuJYaAXaOX5fQl-4,622
|
28
|
+
universal_mcp/agents/autoagent/context.py,sha256=1ic3sIL14XZeiMjpkwysLImRTQFKXRFSx7rvgVh4plY,802
|
29
|
+
universal_mcp/agents/autoagent/graph.py,sha256=f_TPcMk0t4JgM1gYs4sLFIeCrTGAzecc2rN0MPsmxvs,5116
|
30
|
+
universal_mcp/agents/autoagent/prompts.py,sha256=DwLHwvsISuNrxeua0tKxTQbkU8u9gljCpk3P18VGk4w,386
|
31
|
+
universal_mcp/agents/autoagent/state.py,sha256=TQeGZD99okclkoCh5oz-VYIlEsC9yLQyDpnBnm7QCN8,759
|
32
|
+
universal_mcp/agents/autoagent/studio.py,sha256=FWmZTAH54euF0ePG6xCBNwklBjdmjZ3jAOBoTrwNcqs,656
|
33
|
+
universal_mcp/agents/autoagent/utils.py,sha256=AFq-8scw_WlSZxDnTzxSNrOSiGYsIlqkqtQLDWf_rMU,431
|
25
34
|
universal_mcp/agents/codeact/__init__.py,sha256=5D_I3lI_3tWjZERRoFav_bPe9UDaJ53pDzZYtyixg3E,10097
|
26
35
|
universal_mcp/agents/codeact/sandbox.py,sha256=lGRzhuXTHCB1qauuOI3bH1-fPTsyL6Lf9EmMIz4C2xQ,1039
|
27
|
-
universal_mcp/agents/codeact/test.py,sha256=
|
36
|
+
universal_mcp/agents/codeact/test.py,sha256=AI3qWszpM46hF4wzuQm6A8g_UkhGmcg9KhHtk9u14ro,497
|
28
37
|
universal_mcp/agents/codeact/utils.py,sha256=VuMvLTxBBh3pgaJk8RWj5AK8XZFF-1gnZJ6jFLeM_CI,1690
|
29
38
|
universal_mcp/applications/__init__.py,sha256=HrCnGdAT7w4puw2_VulBfjOLku9D5DuMaOwAuQzu6nI,2067
|
30
39
|
universal_mcp/applications/application.py,sha256=pGF9Rb2D6qzlaSwlcfZ-dNqPtsLkQTqL3jpsRuJ6-qE,23835
|
@@ -42,9 +51,9 @@ universal_mcp/tools/__init__.py,sha256=jC8hsqfTdtn32yU57AVFUXiU3ZmUOCfCERSCaNEIH
|
|
42
51
|
universal_mcp/tools/adapters.py,sha256=YJ2oqgc8JgmtsdRRtvO-PO0Q0bKqTJ4Y3J6yxlESoTo,3947
|
43
52
|
universal_mcp/tools/docstring_parser.py,sha256=efEOE-ME7G5Jbbzpn7pN2xNuyu2M5zfZ1Tqu1lRB0Gk,8392
|
44
53
|
universal_mcp/tools/func_metadata.py,sha256=F4jd--hoZWKPBbZihVtluYKUsIdXdq4a0VWRgMl5k-Q,10838
|
45
|
-
universal_mcp/tools/manager.py,sha256=
|
46
|
-
universal_mcp/tools/registry.py,sha256=
|
47
|
-
universal_mcp/tools/tools.py,sha256=
|
54
|
+
universal_mcp/tools/manager.py,sha256=24Rkn5Uvv_AuYAtjeMq986bJ7uzTaGE1290uB9eDtRE,10435
|
55
|
+
universal_mcp/tools/registry.py,sha256=EA-xJ6GCYGajUVCrRmPIpr9Xekwxnqhmso8ztfsTeE8,1401
|
56
|
+
universal_mcp/tools/tools.py,sha256=Lk-wUO3rfhwdxaRANtC7lQr5fXi7nclf0oHzxNAb79Q,4927
|
48
57
|
universal_mcp/utils/__init__.py,sha256=8wi4PGWu-SrFjNJ8U7fr2iFJ1ktqlDmSKj1xYd7KSDc,41
|
49
58
|
universal_mcp/utils/common.py,sha256=3aJK3AnBkmYf-dbsFLaEu_dGuXQ0Qi2HuqYTueLVhXQ,10968
|
50
59
|
universal_mcp/utils/installation.py,sha256=PU_GfHPqzkumKk-xG4L9CkBzSmABxmchwblZkx-zY-I,7204
|
@@ -64,8 +73,8 @@ universal_mcp/utils/openapi/readme.py,sha256=R2Jp7DUXYNsXPDV6eFTkLiy7MXbSULUj1vH
|
|
64
73
|
universal_mcp/utils/openapi/test_generator.py,sha256=h44gQXEXmrw4pD3-XNHKB7T9c2lDomqrJxVO6oszCqM,12186
|
65
74
|
universal_mcp/utils/templates/README.md.j2,sha256=Mrm181YX-o_-WEfKs01Bi2RJy43rBiq2j6fTtbWgbTA,401
|
66
75
|
universal_mcp/utils/templates/api_client.py.j2,sha256=972Im7LNUAq3yZTfwDcgivnb-b8u6_JLKWXwoIwXXXQ,908
|
67
|
-
universal_mcp-0.1.
|
68
|
-
universal_mcp-0.1.
|
69
|
-
universal_mcp-0.1.
|
70
|
-
universal_mcp-0.1.
|
71
|
-
universal_mcp-0.1.
|
76
|
+
universal_mcp-0.1.24rc7.dist-info/METADATA,sha256=agZ4cb79U2UCRPE6V_NXT5pL-_gAxB2Gz04jsc9rVCs,3143
|
77
|
+
universal_mcp-0.1.24rc7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
78
|
+
universal_mcp-0.1.24rc7.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
|
79
|
+
universal_mcp-0.1.24rc7.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
80
|
+
universal_mcp-0.1.24rc7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|