Yorrick Jansen commited on
Commit
cf44496
·
1 Parent(s): f2f9abc
Files changed (2) hide show
  1. main.py +2 -4
  2. strava_mcp/server.py +8 -1
main.py CHANGED
@@ -7,10 +7,8 @@ logger = logging.getLogger(__name__)
7
 
8
  def main():
9
  """Run the Strava MCP server."""
10
- # Use fixed port 3008
11
- port = 3008
12
- logger.info(f"Using port {port} for MCP server")
13
- mcp.run(port=port)
14
 
15
 
16
  if __name__ == "__main__":
 
7
 
8
  def main():
9
  """Run the Strava MCP server."""
10
+ logger.info("Starting MCP server")
11
+ mcp.run(transport="stdio")
 
 
12
 
13
 
14
  if __name__ == "__main__":
strava_mcp/server.py CHANGED
@@ -30,7 +30,11 @@ async def lifespan(server: FastMCP) -> AsyncIterator[dict[str, Any]]:
30
  # Load settings from environment variables
31
  try:
32
  # Let StravaSettings load values directly from env vars
33
- settings = StravaSettings()
 
 
 
 
34
 
35
  if not settings.client_id:
36
  raise ValueError("STRAVA_CLIENT_ID environment variable is not set")
@@ -66,6 +70,9 @@ mcp = FastMCP(
66
  "Strava",
67
  description="MCP server for interacting with the Strava API",
68
  lifespan=lifespan,
 
 
 
69
  )
70
 
71
 
 
30
  # Load settings from environment variables
31
  try:
32
  # Let StravaSettings load values directly from env vars
33
+ settings = StravaSettings(
34
+ client_id="", # Will be loaded from environment variables
35
+ client_secret="", # Will be loaded from environment variables
36
+ base_url="https://www.strava.com/api/v3", # Default value
37
+ )
38
 
39
  if not settings.client_id:
40
  raise ValueError("STRAVA_CLIENT_ID environment variable is not set")
 
70
  "Strava",
71
  description="MCP server for interacting with the Strava API",
72
  lifespan=lifespan,
73
+ client_id="", # Will be loaded from environment variables
74
+ client_secret="", # Will be loaded from environment variables
75
+ base_url="", # Will be loaded from environment variables
76
  )
77
 
78