mcp-chat 0.0.4__py3-none-any.whl → 0.0.6__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.
- mcp_chat/cli_chat.py +26 -11
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.6.dist-info}/METADATA +1 -1
- mcp_chat-0.0.6.dist-info/RECORD +8 -0
- mcp_chat-0.0.4.dist-info/RECORD +0 -8
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.6.dist-info}/WHEEL +0 -0
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.6.dist-info}/entry_points.txt +0 -0
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.6.dist-info}/licenses/LICENSE +0 -0
mcp_chat/cli_chat.py
CHANGED
@@ -34,7 +34,10 @@ except ImportError as e:
|
|
34
34
|
sys.exit(1)
|
35
35
|
|
36
36
|
# Local application imports
|
37
|
-
|
37
|
+
try:
|
38
|
+
from .config_loader import load_config # Package import
|
39
|
+
except ImportError:
|
40
|
+
from config_loader import load_config # Direct script import
|
38
41
|
|
39
42
|
# Type definitions
|
40
43
|
ConfigType = dict[str, Any]
|
@@ -52,10 +55,23 @@ class Colors(str, Enum):
|
|
52
55
|
|
53
56
|
def parse_arguments() -> argparse.Namespace:
|
54
57
|
"""Parse and return command line args for config path and verbosity."""
|
58
|
+
# Try to get version, with fallback for development
|
59
|
+
try:
|
60
|
+
from . import __version__
|
61
|
+
version = __version__
|
62
|
+
except ImportError:
|
63
|
+
# Fallback for development (running script directly)
|
64
|
+
version = "dev"
|
65
|
+
|
55
66
|
parser = argparse.ArgumentParser(
|
56
67
|
description="CLI Chat Application",
|
57
68
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
58
69
|
)
|
70
|
+
parser.add_argument(
|
71
|
+
"--version",
|
72
|
+
action="version",
|
73
|
+
version=f"%(prog)s {version}"
|
74
|
+
)
|
59
75
|
parser.add_argument(
|
60
76
|
"-c", "--config",
|
61
77
|
default="llm_mcp_config.json5",
|
@@ -237,17 +253,16 @@ async def run() -> None:
|
|
237
253
|
"""Main async function to set up and run the simple chat app."""
|
238
254
|
mcp_cleanup: McpServerCleanupFn | None = None
|
239
255
|
try:
|
240
|
-
|
241
|
-
|
242
|
-
#
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
if
|
247
|
-
|
248
|
-
print(f"DEBUG: Key starts with: {openai_key[:10]}...")
|
256
|
+
# Load environment variables from .env file
|
257
|
+
# Workaround: For some reason, load_dotenv() without arguments
|
258
|
+
# sometimes fails to find the .env file in the current directory
|
259
|
+
# when installed via PyPI.
|
260
|
+
# Explicitly specifying the path works reliably.
|
261
|
+
env_file = Path(".env")
|
262
|
+
if env_file.exists():
|
263
|
+
load_dotenv(env_file)
|
249
264
|
else:
|
250
|
-
|
265
|
+
load_dotenv() # Fallback to default behavior
|
251
266
|
|
252
267
|
args = parse_arguments()
|
253
268
|
logger = init_logger(args.verbose)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-chat
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.6
|
4
4
|
Summary: Simple CLI MCP Client to quickly test and explore MCP servers from the command line
|
5
5
|
Project-URL: Bug Tracker, https://github.com/hideya/mcp-client-langchain-py/issues
|
6
6
|
Project-URL: Source Code, https://github.com/hideya/mcp-client-langchain-py
|
@@ -0,0 +1,8 @@
|
|
1
|
+
mcp_chat/__init__.py,sha256=cxW2vB9rLAKUrNgEJ9hxa3sAK95x9-3_7RZaTxCVTTo,66
|
2
|
+
mcp_chat/cli_chat.py,sha256=qIQv9eb5g7PKrBbqK1R4LwZCEGNF_dqp-pRLDOBUAiI,8996
|
3
|
+
mcp_chat/config_loader.py,sha256=SXQYTf_i5ZG7F8_EUC_8_SC0W4R97Juqx0jCllYS0Wk,2325
|
4
|
+
mcp_chat-0.0.6.dist-info/METADATA,sha256=lvdUnA6d27InFKgvDWzgj9HbjdKCQChPTDrxwxsaxgY,5564
|
5
|
+
mcp_chat-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
+
mcp_chat-0.0.6.dist-info/entry_points.txt,sha256=nVuS7z3aG9zJ6VcZ4OK9j9lKea-fnNmMluMikwG3z-o,52
|
7
|
+
mcp_chat-0.0.6.dist-info/licenses/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
|
8
|
+
mcp_chat-0.0.6.dist-info/RECORD,,
|
mcp_chat-0.0.4.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
mcp_chat/__init__.py,sha256=cxW2vB9rLAKUrNgEJ9hxa3sAK95x9-3_7RZaTxCVTTo,66
|
2
|
-
mcp_chat/cli_chat.py,sha256=YPR8VuwPezTxvD_frxNzh8MJ9XYUpdYofNWC2PWfVPA,8521
|
3
|
-
mcp_chat/config_loader.py,sha256=SXQYTf_i5ZG7F8_EUC_8_SC0W4R97Juqx0jCllYS0Wk,2325
|
4
|
-
mcp_chat-0.0.4.dist-info/METADATA,sha256=ulVVU13Al2jDFHHkp1naBJ5GJP3HHH21S8a-S1pO4TI,5564
|
5
|
-
mcp_chat-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
-
mcp_chat-0.0.4.dist-info/entry_points.txt,sha256=nVuS7z3aG9zJ6VcZ4OK9j9lKea-fnNmMluMikwG3z-o,52
|
7
|
-
mcp_chat-0.0.4.dist-info/licenses/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
|
8
|
-
mcp_chat-0.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|