casual-mcp 0.3.0__py3-none-any.whl → 0.3.1__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.
casual_mcp/cli.py CHANGED
@@ -1,10 +1,11 @@
1
+ import asyncio
1
2
  import typer
2
3
  import uvicorn
3
4
  from rich.console import Console
4
5
  from rich.table import Table
5
6
 
6
7
  from casual_mcp.models.mcp_server_config import RemoteServerConfig
7
- from casual_mcp.utils import load_config
8
+ from casual_mcp.utils import load_config, load_mcp_client
8
9
 
9
10
  app = typer.Typer()
10
11
  console = Console()
@@ -31,7 +32,7 @@ def servers():
31
32
  table = Table("Name", "Type", "Command / Url", "Env")
32
33
 
33
34
  for name, server in config.servers.items():
34
- type = 'local'
35
+ type = 'stdio'
35
36
  if isinstance(server, RemoteServerConfig):
36
37
  type = 'remote'
37
38
 
@@ -39,7 +40,7 @@ def servers():
39
40
  if isinstance(server, RemoteServerConfig):
40
41
  path = server.url
41
42
  else:
42
- path = f"{server.command} {" ".join(server.args)}"
43
+ path = f"{server.command} {' '.join(server.args)}"
43
44
  env = ''
44
45
 
45
46
  table.add_row(name, type, path, env)
@@ -63,6 +64,21 @@ def models():
63
64
 
64
65
  console.print(table)
65
66
 
67
+ @app.command()
68
+ def tools():
69
+ config = load_config('casual_mcp_config.json')
70
+ mcp_client = load_mcp_client(config)
71
+ table = Table("Name", "Description")
72
+ # async with mcp_client:
73
+ tools = asyncio.run(get_tools(mcp_client))
74
+ for tool in tools:
75
+ table.add_row(tool.name, tool.description)
76
+ console.print(table)
77
+
78
+
79
+ async def get_tools(client):
80
+ async with client:
81
+ return await client.list_tools()
66
82
 
67
83
  if __name__ == "__main__":
68
84
  app()
@@ -84,6 +84,7 @@ class McpToolChat:
84
84
  has_system_message = any(message.role == 'system' for message in messages)
85
85
  if self.system and not has_system_message:
86
86
  # Insert the system message at the start of the messages
87
+ logger.debug(f"Adding System Message")
87
88
  messages.insert(0, SystemMessage(content=self.system))
88
89
 
89
90
  logger.info("Start Chat")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: casual-mcp
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Multi-server MCP client for LLM tool orchestration
5
5
  Author: Alex Stansfield
6
6
  License: MIT
@@ -12,7 +12,7 @@ Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: dateparser>=1.2.1
14
14
  Requires-Dist: fastapi>=0.115.12
15
- Requires-Dist: fastmcp>=2.5.1
15
+ Requires-Dist: fastmcp>=2.5.2
16
16
  Requires-Dist: jinja2>=3.1.6
17
17
  Requires-Dist: ollama>=0.4.8
18
18
  Requires-Dist: openai>=1.78.0
@@ -1,8 +1,8 @@
1
1
  casual_mcp/__init__.py,sha256=pInJdGkFqSH8RwbQq-9mc96GWIQjLrtExeXnTYGtNHw,327
2
- casual_mcp/cli.py,sha256=TSk12nXJH86f0WAR_u5hIJV9IAHeGHrkgFs7ZZ63Lug,1627
2
+ casual_mcp/cli.py,sha256=6P_d77qPbY43AW1Ix6FfbHyy6Qc6sFeFqGvXxJCW2_M,2090
3
3
  casual_mcp/logging.py,sha256=o3rvT8GLJKGlu0ieeC9TY_SRSEUY-VO8jRQZjx-sSvY,863
4
4
  casual_mcp/main.py,sha256=AzqQ6SUJsyKyMaqd3HIxLDozoftMd27KQAQNsfM9e2I,3385
5
- casual_mcp/mcp_tool_chat.py,sha256=BebLuo2F4nStd4vVO3BftfG8Sa6Zlx11UBuMezpbtIE,4897
5
+ casual_mcp/mcp_tool_chat.py,sha256=6MMRAEBDMRyw7-n1VGvIGdrh1ed2szZx8sC0MlR1g7I,4948
6
6
  casual_mcp/utils.py,sha256=Nea0aRbPyjqm7mIjffJtGP2NssE7BsdPleO-yiuAWPE,2964
7
7
  casual_mcp/models/__init__.py,sha256=qlKylcCyRJOSIVteU2feiLOigZoY-m-soVGp4NALM_c,538
8
8
  casual_mcp/models/config.py,sha256=ITu3WAPMad7i2CS3ljkHapjT8lLm7k6HFUF6N73U1oo,294
@@ -16,9 +16,9 @@ casual_mcp/providers/abstract_provider.py,sha256=TTEP3FeTxOtbD0By_k17UxS8cqxYCOG
16
16
  casual_mcp/providers/ollama_provider.py,sha256=IUSJFBtEYmza_-_7bk5YZKqed3N67l8A2lZEmHPiyHo,2581
17
17
  casual_mcp/providers/openai_provider.py,sha256=uSjoqM-X9bVp_RVM8Ip6lqjZ7q3DdN0-p7o2HKrWxMI,6138
18
18
  casual_mcp/providers/provider_factory.py,sha256=CyFHJ0mU2tjHqj04btF0SL0B3pf12LAJ52Msqsbnv_g,1766
19
- casual_mcp-0.3.0.dist-info/licenses/LICENSE,sha256=U3Zu2tkrh5vXdy7gIdE8WJGM9D4gGp3hohAAWdre-yo,1058
20
- casual_mcp-0.3.0.dist-info/METADATA,sha256=ULZbRBwX0FVKjfS2pPu3JWwvD5btiIkA6qOqWoWRa_0,12902
21
- casual_mcp-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- casual_mcp-0.3.0.dist-info/entry_points.txt,sha256=X48Np2cwl-SlRQdV26y2vPZ-2tJaODgZeVtfpHho-zg,50
23
- casual_mcp-0.3.0.dist-info/top_level.txt,sha256=K4CiI0Jf8PHICjuQVm32HuNMB44kp8Lb02bbbdiH5bo,11
24
- casual_mcp-0.3.0.dist-info/RECORD,,
19
+ casual_mcp-0.3.1.dist-info/licenses/LICENSE,sha256=U3Zu2tkrh5vXdy7gIdE8WJGM9D4gGp3hohAAWdre-yo,1058
20
+ casual_mcp-0.3.1.dist-info/METADATA,sha256=uqtEAq3-YfRInCxU79bwfBhrsGxFKbvUWAJ7D0XTA0g,12902
21
+ casual_mcp-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ casual_mcp-0.3.1.dist-info/entry_points.txt,sha256=X48Np2cwl-SlRQdV26y2vPZ-2tJaODgZeVtfpHho-zg,50
23
+ casual_mcp-0.3.1.dist-info/top_level.txt,sha256=K4CiI0Jf8PHICjuQVm32HuNMB44kp8Lb02bbbdiH5bo,11
24
+ casual_mcp-0.3.1.dist-info/RECORD,,