universal-mcp 0.1.19__py3-none-any.whl → 0.1.20rc1__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/cli.py CHANGED
@@ -59,8 +59,8 @@ def generate(
59
59
  else:
60
60
  # Handle the error case from api_generator if validation fails
61
61
  if isinstance(app_file_data, dict) and "error" in app_file_data:
62
- console.print(f"[red]{app_file_data['error']}[/red]")
63
- raise typer.Exit(1)
62
+ console.print(f"[red]{app_file_data['error']}[/red]")
63
+ raise typer.Exit(1)
64
64
  else:
65
65
  console.print("[red]Unexpected return value from API generator.[/red]")
66
66
  raise typer.Exit(1)
@@ -119,9 +119,8 @@ def run(
119
119
  from universal_mcp.logger import setup_logger
120
120
  from universal_mcp.servers import server_from_config
121
121
 
122
- setup_logger()
123
-
124
122
  config = ServerConfig.model_validate_json(config_path.read_text()) if config_path else ServerConfig()
123
+ setup_logger(level=config.log_level)
125
124
  server = server_from_config(config)
126
125
  server.run(transport=config.transport)
127
126
 
@@ -291,7 +290,7 @@ def split_api(
291
290
  console.print(f"[green]Successfully split {input_app_file} into {output_dir}[/green]")
292
291
  except Exception as e:
293
292
  console.print(f"[red]Error splitting API client: {e}[/red]")
294
-
293
+
295
294
  raise typer.Exit(1) from e
296
295
 
297
296
 
@@ -329,4 +329,4 @@ class SingleMCPServer(BaseServer):
329
329
  description=f"Minimal MCP server for the local {app_instance.name} application.",
330
330
  )
331
331
  super().__init__(config, **kwargs)
332
- self._tool_manager.register_tools_from_app(app_instance)
332
+ self._tool_manager.register_tools_from_app(app_instance, tags="all")
@@ -33,6 +33,10 @@ def _filter_by_name(tools: list[Tool], tool_names: list[str] | None) -> list[Too
33
33
 
34
34
 
35
35
  def _filter_by_tags(tools: list[Tool], tags: list[str] | None) -> list[Tool]:
36
+ logger.debug(f"Filtering tools by tags: {tags}")
37
+ if "all" in tags:
38
+ return tools
39
+
36
40
  if not tags:
37
41
  return tools
38
42
  return [tool for tool in tools if any(tag in tool.tags for tag in tags)]
@@ -197,11 +201,9 @@ class ToolManager:
197
201
 
198
202
  if tool_names:
199
203
  tools = _filter_by_name(tools, tool_names)
200
-
201
204
  # If no tool names or tags are provided, use the default important tag
202
205
  if not tool_names and not tags:
203
206
  tools = _filter_by_tags(tools, [DEFAULT_IMPORTANT_TAG])
204
-
205
207
  self.register_tools(tools)
206
208
  return
207
209
 
@@ -55,7 +55,7 @@ class Tool(BaseModel):
55
55
 
56
56
  return cls(
57
57
  fn=fn,
58
- name=func_name,
58
+ name=func_name[:48],
59
59
  description=parsed_doc["summary"],
60
60
  args_description=parsed_doc["args"],
61
61
  returns_description=parsed_doc["returns"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: universal-mcp
3
- Version: 0.1.19
3
+ Version: 0.1.20rc1
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
@@ -14,7 +14,7 @@ Requires-Dist: keyring>=25.6.0
14
14
  Requires-Dist: langchain-mcp-adapters>=0.0.3
15
15
  Requires-Dist: litellm>=1.30.7
16
16
  Requires-Dist: loguru>=0.7.3
17
- Requires-Dist: mcp>=1.8.1
17
+ Requires-Dist: mcp>=1.9.0
18
18
  Requires-Dist: posthog>=3.24.0
19
19
  Requires-Dist: pydantic-settings>=2.8.1
20
20
  Requires-Dist: pydantic>=2.11.1
@@ -1,6 +1,6 @@
1
1
  universal_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  universal_mcp/analytics.py,sha256=Dkv8mkc_2T2t5NxLSZzcr3BlmOispj1RKtbB86V1i4M,2306
3
- universal_mcp/cli.py,sha256=Xcdm4UMIlwxK6f0FHvmu5b6lZ8q14S3vZexRM32zAK4,10298
3
+ universal_mcp/cli.py,sha256=-MVcqDEL_0AefmEgjq3ZCa2tySxXwi-Tfoat2kboX_U,10311
4
4
  universal_mcp/config.py,sha256=HaAZvf-XzQZpqGGWUuT5zojWloO8GL5Acfa5_0sDs_Q,3321
5
5
  universal_mcp/exceptions.py,sha256=-pbeZhpNieJfnSd2-WM80pU8W8mK8VHXcSjky0BHwdk,665
6
6
  universal_mcp/logger.py,sha256=VmH_83efpErLEDTJqz55Dp0dioTXfGvMBLZUx5smOLc,2116
@@ -13,7 +13,7 @@ universal_mcp/integrations/__init__.py,sha256=X8iEzs02IlXfeafp6GMm-cOkg70QdjnlTR
13
13
  universal_mcp/integrations/integration.py,sha256=QvZlq3G5OU4tHPv9uq9Nv5NFe30NdUsJU-Av474n0_o,13154
14
14
  universal_mcp/servers/README.md,sha256=ytFlgp8-LO0oogMrHkMOp8SvFTwgsKgv7XhBVZGNTbM,2284
15
15
  universal_mcp/servers/__init__.py,sha256=eBZCsaZjiEv6ZlRRslPKgurQxmpHLQyiXv2fTBygHnM,532
16
- universal_mcp/servers/server.py,sha256=X-CM5bCbMUVm7NkAT5RNeiyc38MbiFrwlZE3dbX10SM,12810
16
+ universal_mcp/servers/server.py,sha256=6xRUxTJHiX0AqEWbAZ6eb6jEkvuBX5Qpkb53hmKcfc0,12822
17
17
  universal_mcp/stores/README.md,sha256=jrPh_ow4ESH4BDGaSafilhOVaN8oQ9IFlFW-j5Z5hLA,2465
18
18
  universal_mcp/stores/__init__.py,sha256=quvuwhZnpiSLuojf0NfmBx2xpaCulv3fbKtKaSCEmuM,603
19
19
  universal_mcp/stores/store.py,sha256=mxnmOVlDNrr8OKhENWDtCIfK7YeCBQcGdS6I2ogRCsU,6756
@@ -21,8 +21,8 @@ universal_mcp/tools/README.md,sha256=RuxliOFqV1ZEyeBdj3m8UKfkxAsfrxXh-b6V4ZGAk8I
21
21
  universal_mcp/tools/__init__.py,sha256=Fatza_R0qYWmNF1WQSfUZZKQFu5qf-16JhZzdmyx3KY,333
22
22
  universal_mcp/tools/adapters.py,sha256=gz_sNDc_bseMHWmpQmqhOq65veE-DuK_kJYXGIx0Wi8,1427
23
23
  universal_mcp/tools/func_metadata.py,sha256=zIDXgIBvu5Gh8aNlg-Q7cZZos9Iky75MS0Me0BraXeM,8086
24
- universal_mcp/tools/manager.py,sha256=eNYEGCeTvtSsyPkPWo4ciuJEqNw4ux-XCr0r5OyBejg,7981
25
- universal_mcp/tools/tools.py,sha256=8YBTaJCM38Nhan9Al6Vlq4FtSULrKlxg1q_o8OL1_FM,3322
24
+ universal_mcp/tools/manager.py,sha256=iwywaTjVGvBCJJasfwDWrASUleYqxenm4S-0txdhCF0,8076
25
+ universal_mcp/tools/tools.py,sha256=qiuuLe0mCWtxXp6E5ISDDaNojCrMLfV1r5L8peFoJfg,3327
26
26
  universal_mcp/utils/__init__.py,sha256=8wi4PGWu-SrFjNJ8U7fr2iFJ1ktqlDmSKj1xYd7KSDc,41
27
27
  universal_mcp/utils/agentr.py,sha256=YmX6hvFW84keJKTZqP3jPz4rP9DM5wHZ0vTMHfxO6AI,3360
28
28
  universal_mcp/utils/common.py,sha256=HEZC2Mhilb8DrGXQG2tboAIw1r4veGilGWjfnPF1lyA,888
@@ -38,8 +38,8 @@ universal_mcp/utils/openapi/preprocessor.py,sha256=qLYv4ekors5B2OU_YUvXICYQ7XYhA
38
38
  universal_mcp/utils/openapi/readme.py,sha256=R2Jp7DUXYNsXPDV6eFTkLiy7MXbSULUj1vHh4O_nB4c,2974
39
39
  universal_mcp/utils/templates/README.md.j2,sha256=Mrm181YX-o_-WEfKs01Bi2RJy43rBiq2j6fTtbWgbTA,401
40
40
  universal_mcp/utils/templates/api_client.py.j2,sha256=972Im7LNUAq3yZTfwDcgivnb-b8u6_JLKWXwoIwXXXQ,908
41
- universal_mcp-0.1.19.dist-info/METADATA,sha256=wPKF-GWj2l1ZK430vl25Su_RCi56JiyzV4opj_Lp4Rs,12122
42
- universal_mcp-0.1.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
43
- universal_mcp-0.1.19.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
44
- universal_mcp-0.1.19.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
45
- universal_mcp-0.1.19.dist-info/RECORD,,
41
+ universal_mcp-0.1.20rc1.dist-info/METADATA,sha256=EQMj4vzDSQb57UmZIFan-NvV8MtE0ohsAyT-WiaXwHI,12125
42
+ universal_mcp-0.1.20rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
43
+ universal_mcp-0.1.20rc1.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
44
+ universal_mcp-0.1.20rc1.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
45
+ universal_mcp-0.1.20rc1.dist-info/RECORD,,