coala-cli 0.2.5__tar.gz → 0.2.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: coala-cli
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Command-line LLM-agent Adapter
5
5
  Author: Qiang
6
6
  License-Expression: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.14
12
12
  Requires-Python: <3.15,>=3.12
13
13
  Requires-Dist: cwltool<4.0.0,>=3.2.20260413085819
14
14
  Requires-Dist: fastapi>=0.115.0
15
- Requires-Dist: mcp<2.0.0,>=1.12.0
15
+ Requires-Dist: mcp<3,>=2.2
16
16
  Requires-Dist: pydantic<3.0.0,>=2.10.0
17
17
  Requires-Dist: requests<3.0.0,>=2.33.0
18
18
  Requires-Dist: uvicorn<0.33.0,>=0.32.0
@@ -15,7 +15,7 @@ from cwltool.context import RuntimeContext
15
15
  from threading import Thread
16
16
  import time
17
17
  from typing import Optional, List, Annotated
18
- from mcp.server.fastmcp import FastMCP
18
+ from mcp.server.mcpserver import MCPServer
19
19
  from coala.tool_logic import run_tool, configure_container_runner # <-- import shared logic
20
20
  import threading
21
21
  import sys
@@ -57,7 +57,8 @@ class mcp_api():
57
57
  self.container_runner = container_runner
58
58
  self.server = None
59
59
  self.url = None
60
- self.mcp = FastMCP(host=host, port=port)
60
+ # mcp 2: host and port are run() options, no longer constructor arguments.
61
+ self.mcp = MCPServer()
61
62
  self.tools = {} # tool_name -> tool info
62
63
  self.system_prompt = """
63
64
  At the end of your response, append a summary listing the tool name and version from the tool's description using this exact format:
@@ -521,7 +522,10 @@ tool_version: <TOOL_VERSION>
521
522
  # For stdio transport, don't print startup messages to stdout
522
523
  logger.info("Starting MCP server with stdio transport")
523
524
 
524
- self.mcp.run(transport=transport)
525
+ if transport == 'streamable-http':
526
+ self.mcp.run(transport=transport, host=self.host, port=self.port)
527
+ else:
528
+ self.mcp.run(transport=transport)
525
529
  # thread = threading.Thread(target=self.mcp.run, kwargs={'transport': 'sse'}, daemon=True)
526
530
  # thread.start()
527
531
  # self.server_thread = thread
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "coala-cli"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  description = "Command-line LLM-agent Adapter"
5
5
  authors = [{ name = "Qiang" }]
6
6
  license = "MIT"
@@ -19,7 +19,7 @@ dependencies = [
19
19
  "pydantic>=2.10.0,<3.0.0",
20
20
  "uvicorn>=0.32.0,<0.33.0",
21
21
  "cwltool>=3.2.20260413085819,<4.0.0",
22
- "mcp>=1.12.0,<2.0.0",
22
+ "mcp>=2.2,<3",
23
23
  ]
24
24
 
25
25
  [dependency-groups]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes