Jeremiah Lowin commited on
Commit
46424ca
·
unverified ·
2 Parent(s): 3cbf14cdecbb8e

Merge branch 'main' into mount

Browse files
src/fastmcp/client/transports.py CHANGED
@@ -2,6 +2,7 @@ import abc
2
  import contextlib
3
  import datetime
4
  import os
 
5
  from collections.abc import AsyncIterator
6
  from pathlib import Path
7
  from typing import (
@@ -343,6 +344,10 @@ class NpxStdioTransport(StdioTransport):
343
  env_vars: Additional environment variables
344
  use_package_lock: Whether to use package-lock.json (--prefer-offline)
345
  """
 
 
 
 
346
  # Basic validation
347
  if project_directory and not Path(project_directory).exists():
348
  raise NotADirectoryError(
 
2
  import contextlib
3
  import datetime
4
  import os
5
+ import shutil
6
  from collections.abc import AsyncIterator
7
  from pathlib import Path
8
  from typing import (
 
344
  env_vars: Additional environment variables
345
  use_package_lock: Whether to use package-lock.json (--prefer-offline)
346
  """
347
+ # verify npx is installed
348
+ if shutil.which("npx") is None:
349
+ raise ValueError("Command 'npx' not found")
350
+
351
  # Basic validation
352
  if project_directory and not Path(project_directory).exists():
353
  raise NotADirectoryError(
src/fastmcp/settings.py CHANGED
@@ -42,7 +42,7 @@ class ServerSettings(BaseSettings):
42
  log_level: LOG_LEVEL = Field(default_factory=lambda: Settings().log_level)
43
 
44
  # HTTP settings
45
- host: str = "0.0.0.0"
46
  port: int = 8000
47
  sse_path: str = "/sse"
48
  message_path: str = "/messages/"
 
42
  log_level: LOG_LEVEL = Field(default_factory=lambda: Settings().log_level)
43
 
44
  # HTTP settings
45
+ host: str = "127.0.0.1"
46
  port: int = 8000
47
  sse_path: str = "/sse"
48
  message_path: str = "/messages/"
tests/{server/test_servers → test_servers}/fastmcp_server.py RENAMED
File without changes
tests/{server/test_servers → test_servers}/sse.py RENAMED
File without changes
tests/{server/test_servers → test_servers}/stdio.py RENAMED
File without changes