plotext-plus 1.0.9__py3-none-any.whl → 1.0.11__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.
plotext_plus/mcp_cli.py CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
2
 
4
3
  """
5
4
  Plotext Plus MCP Server CLI
@@ -8,8 +7,8 @@ Plotext Plus MCP Server CLI
8
7
  Command-line interface for starting the Plotext Plus MCP server.
9
8
  """
10
9
 
11
- import sys
12
10
  import argparse
11
+ import sys
13
12
 
14
13
 
15
14
  def main():
@@ -18,18 +17,19 @@ def main():
18
17
  description="Plotext Plus MCP Server - Terminal plotting for AI clients"
19
18
  )
20
19
  parser.add_argument(
21
- "--version",
22
- action="version",
23
- version="plotext_plus MCP server"
20
+ "--version", action="version", version="plotext_plus MCP server"
21
+ )
22
+ parser.add_argument(
23
+ "--info", action="store_true", help="Show MCP server information"
24
24
  )
25
25
  parser.add_argument(
26
- "--info",
26
+ "--stdio",
27
27
  action="store_true",
28
- help="Show MCP server information"
28
+ help="Use STDIO transport mode instead of HTTP (requires dev version of chuk-mcp-server)",
29
29
  )
30
-
30
+
31
31
  args = parser.parse_args()
32
-
32
+
33
33
  if args.info:
34
34
  print("Plotext Plus MCP Server")
35
35
  print("======================")
@@ -38,7 +38,7 @@ def main():
38
38
  print("")
39
39
  print("Available tools:")
40
40
  print("- scatter_plot: Create scatter plots")
41
- print("- line_plot: Create line plots")
41
+ print("- line_plot: Create line plots")
42
42
  print("- bar_chart: Create bar charts")
43
43
  print("- matrix_plot: Create matrix/heatmap plots")
44
44
  print("- quick_scatter/line/bar: Quick chart creation")
@@ -60,11 +60,13 @@ def main():
60
60
  print("- config://plotext: Server configuration and capabilities")
61
61
  print("")
62
62
  print("To start the server, run: plotext-mcp")
63
+ print("For STDIO transport mode, run: plotext-mcp --stdio")
63
64
  return
64
-
65
+
65
66
  try:
66
67
  from .mcp_server import start_server
67
- start_server()
68
+
69
+ start_server(stdio_mode=args.stdio)
68
70
  except ImportError as e:
69
71
  if "chuk-mcp-server" in str(e):
70
72
  print("ERROR: MCP functionality requires chuk-mcp-server")
@@ -76,4 +78,4 @@ def main():
76
78
 
77
79
 
78
80
  if __name__ == "__main__":
79
- main()
81
+ main()