astrbotmcp 0.2.4__py3-none-any.whl → 0.2.5__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.
astrbot_mcp/server.py CHANGED
@@ -1,6 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import argparse
4
+ import os
5
+ import sys
4
6
  from importlib.metadata import PackageNotFoundError, version
5
7
 
6
8
  from fastmcp.server import FastMCP
@@ -80,7 +82,17 @@ def main() -> None:
80
82
  print("unknown")
81
83
  return
82
84
 
83
- server.run(transport="stdio")
85
+ # Codex MCP client is strict about stdio: stdout must be pure JSON-RPC.
86
+ # Disable FastMCP's banner and keep logs quiet/UTF-8 to avoid handshake failures.
87
+ os.environ.setdefault("PYTHONIOENCODING", "utf-8")
88
+ os.environ.setdefault("PYTHONUTF8", "1")
89
+ try:
90
+ sys.stdout.reconfigure(encoding="utf-8")
91
+ sys.stderr.reconfigure(encoding="utf-8")
92
+ except Exception:
93
+ pass
94
+
95
+ server.run(transport="stdio", show_banner=False, log_level="ERROR")
84
96
 
85
97
 
86
98
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: astrbotmcp
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,7 +1,7 @@
1
1
  astrbot_mcp/__init__.py,sha256=nDTFGuA6IlvCywUVliWHmmFBkQQsnLVgnZDFYfdALbo,370
2
2
  astrbot_mcp/astrbot_client.py,sha256=Kvcsk4gQytjZDoxLAXE7S6cmZjHGHzeNopzYnSyz9H0,19734
3
3
  astrbot_mcp/config.py,sha256=C5F0pHVGZkmxCGMPU9ns0G4whiy-ZCqfnQwUFuNmsLY,2820
4
- astrbot_mcp/server.py,sha256=gUJRTbulZ1nXkOl_CvzmyoRpOVizNNjIrmSl-5oYc8Q,2829
4
+ astrbot_mcp/server.py,sha256=wfSrDHXeX5QUjIJ70WL5niEt4l9klF6JDgNS3HX6G3I,3293
5
5
  astrbot_mcp/tools.py,sha256=rBL89W_4B7djcuGwBekLp-6pqi8dbmic8P3LJUIForI,1261
6
6
  astrbot_mcp/tools/__init__.py,sha256=gk-_Y8gN9CIjuBNl9z5oJXP6V7LJb5FO_UnDN1L3uwc,2084
7
7
  astrbot_mcp/tools/config_search_tool.py,sha256=qNCeN92dztolFRxsr8x9B1mdKkdnw4c0RrIzxmd2Tvc,5948
@@ -14,9 +14,9 @@ astrbot_mcp/tools/platform_tools.py,sha256=61dTxf2T6BYh9Z5Wos3MiJLCMNEwV5RdSSCAx
14
14
  astrbot_mcp/tools/plugin_market_tools.py,sha256=IfTeM7B0X_6gW1QhCPIQn1oa1alPhw1h6mjq1uteSD0,7349
15
15
  astrbot_mcp/tools/session_tools.py,sha256=isEAydi3cM9IwdPjqZkD5PoFI5R_-jL_lBYBSCpxk48,21149
16
16
  astrbot_mcp/tools/types.py,sha256=easFBXi70v1v-5NrZKxSiu_3ezl_nRoKHRzjvkWzXoc,984
17
- astrbotmcp-0.2.4.dist-info/licenses/LICENSE.txt,sha256=5AYBumh99nqD7WWRY18ySSOIUKrj3bkAhVAiY-k8ZRo,1061
18
- astrbotmcp-0.2.4.dist-info/METADATA,sha256=Xvk6soTobWBwumwRQpff9v6vYG1weYHfHd4VFhv_7T8,5234
19
- astrbotmcp-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- astrbotmcp-0.2.4.dist-info/entry_points.txt,sha256=XmfseRwldB3CJKlViESKuZNmw37qV2B57to8EQqvd5Q,56
21
- astrbotmcp-0.2.4.dist-info/top_level.txt,sha256=yi4CO_u3RImIkeQ562K9EbEc0nnKVgHQupSZ_X1GEO0,12
22
- astrbotmcp-0.2.4.dist-info/RECORD,,
17
+ astrbotmcp-0.2.5.dist-info/licenses/LICENSE.txt,sha256=5AYBumh99nqD7WWRY18ySSOIUKrj3bkAhVAiY-k8ZRo,1061
18
+ astrbotmcp-0.2.5.dist-info/METADATA,sha256=9toaPdl0ewKx5QYUZqL9dsrKcy7jU8UUmtH20R_DPr0,5234
19
+ astrbotmcp-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ astrbotmcp-0.2.5.dist-info/entry_points.txt,sha256=XmfseRwldB3CJKlViESKuZNmw37qV2B57to8EQqvd5Q,56
21
+ astrbotmcp-0.2.5.dist-info/top_level.txt,sha256=yi4CO_u3RImIkeQ562K9EbEc0nnKVgHQupSZ_X1GEO0,12
22
+ astrbotmcp-0.2.5.dist-info/RECORD,,