mcp-chat 0.0.4__py3-none-any.whl → 0.0.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.
- mcp_chat/cli_chat.py +31 -2
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.5.dist-info}/METADATA +1 -1
- mcp_chat-0.0.5.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.5.dist-info}/WHEEL +0 -0
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.5.dist-info}/entry_points.txt +0 -0
- {mcp_chat-0.0.4.dist-info → mcp_chat-0.0.5.dist-info}/licenses/LICENSE +0 -0
mcp_chat/cli_chat.py
CHANGED
@@ -237,10 +237,39 @@ async def run() -> None:
|
|
237
237
|
"""Main async function to set up and run the simple chat app."""
|
238
238
|
mcp_cleanup: McpServerCleanupFn | None = None
|
239
239
|
try:
|
240
|
-
|
240
|
+
# Debug: Check working directory and .env file existence
|
241
|
+
import os
|
242
|
+
from pathlib import Path
|
243
|
+
|
244
|
+
print(f"DEBUG: Current working directory: {os.getcwd()}")
|
245
|
+
env_file = Path(".env")
|
246
|
+
print(f"DEBUG: .env file exists: {env_file.exists()}")
|
247
|
+
if env_file.exists():
|
248
|
+
print(f"DEBUG: .env file path: {env_file.absolute()}")
|
249
|
+
|
250
|
+
# Try to load .env file with multiple strategies
|
251
|
+
from pathlib import Path
|
252
|
+
|
253
|
+
# Strategy 1: Try current working directory
|
254
|
+
env_file = Path(".env")
|
255
|
+
if env_file.exists():
|
256
|
+
load_dotenv(env_file)
|
257
|
+
print(f"DEBUG: Loaded .env from: {env_file.absolute()}")
|
258
|
+
else:
|
259
|
+
# Strategy 2: Try default load_dotenv behavior
|
260
|
+
result = load_dotenv()
|
261
|
+
print(f"DEBUG: load_dotenv() default result: {result}")
|
262
|
+
|
263
|
+
# Strategy 3: Try looking in parent directories
|
264
|
+
current_dir = Path.cwd()
|
265
|
+
for parent in [current_dir] + list(current_dir.parents):
|
266
|
+
potential_env = parent / ".env"
|
267
|
+
if potential_env.exists():
|
268
|
+
load_dotenv(potential_env)
|
269
|
+
print(f"DEBUG: Loaded .env from parent: {potential_env}")
|
270
|
+
break
|
241
271
|
|
242
272
|
# Debug: Check if environment variables are loaded
|
243
|
-
import os
|
244
273
|
openai_key = os.getenv('OPENAI_API_KEY')
|
245
274
|
print(f"DEBUG: OPENAI_API_KEY loaded: {openai_key is not None}")
|
246
275
|
if openai_key:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-chat
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
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=xLtG5cGdRH0VJ3x-tMc5G-1CjvdunUwR5hlcxUngAm8,9786
|
3
|
+
mcp_chat/config_loader.py,sha256=SXQYTf_i5ZG7F8_EUC_8_SC0W4R97Juqx0jCllYS0Wk,2325
|
4
|
+
mcp_chat-0.0.5.dist-info/METADATA,sha256=kUNS5cunUK0kwbDuZInOVnAy1RLLl7bKFbNDXdY3d1Y,5564
|
5
|
+
mcp_chat-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
+
mcp_chat-0.0.5.dist-info/entry_points.txt,sha256=nVuS7z3aG9zJ6VcZ4OK9j9lKea-fnNmMluMikwG3z-o,52
|
7
|
+
mcp_chat-0.0.5.dist-info/licenses/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
|
8
|
+
mcp_chat-0.0.5.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
|