strava-activity-mcp-server 0.1.5__py3-none-any.whl → 0.1.7__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.
@@ -1,4 +1,4 @@
1
- from .strava_activity_mcp_server import mcp
2
- def main() -> None:
3
- """Run the MCP server."""
1
+ from .strava_activity_mcp_server import mcp
2
+ def main() -> None:
3
+ """Run the MCP server."""
4
4
  mcp.run()
@@ -34,14 +34,30 @@ def get_auth_url(client_id: int | None = None):
34
34
  @mcp.tool("strava://auth/token")
35
35
  def exchange_code_for_token(
36
36
  code: str,
37
- client_id: int,
38
- client_secret: str,
37
+ client_id: int | None = None,
38
+ client_secret: str | None = None,
39
39
  ) -> dict:
40
40
  """Exchange an authorization code for access + refresh tokens."""
41
41
  if not code:
42
42
  return {"error": "authorization code is required"}
43
- if not client_secret:
44
- return {"error": "client_secret is required"}
43
+
44
+ if client_id is None:
45
+ client_id_env = os.getenv("STRAVA_CLIENT_ID")
46
+ if not client_id_env:
47
+ return {"error": "STRAVA_CLIENT_ID environment variable is not set"}
48
+ try:
49
+ client_id = int(client_id_env)
50
+ except ValueError:
51
+ return {"error": "STRAVA_CLIENT_ID must be an integer"}
52
+
53
+ if client_secret is None:
54
+ client_secret_env = os.getenv("STRAVA_CLIENT_SECRET")
55
+ if not client_secret_env:
56
+ return {"error": "STRAVA_CLIENT_SECRET environment variable is not set"}
57
+ try:
58
+ client_secret = str(client_secret_env)
59
+ except ValueError:
60
+ return {"error": "STRAVA_CLIENT_SECRET must be a string"}
45
61
 
46
62
  resp = requests.post(
47
63
  "https://www.strava.com/oauth/token",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strava-activity-mcp-server
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Trying to implement environment variables for client_id
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.10
@@ -10,7 +10,9 @@ Requires-Dist: twine>=6.2.0
10
10
  Description-Content-Type: text/markdown
11
11
 
12
12
  # Strava Activity MCP Server
13
- ![Image 1: Python Package](https://pypi-camo.freetls.fastly.net/0ecf904318113383d77ec39a9c48b8ba0d2baf38/68747470733a2f2f6769746875622e636f6d2f746f6d656b6b6f7262616b2f7374726176612d6d63702d7365727665722f776f726b666c6f77732f507974686f6e2532305061636b6167652f62616467652e737667) [![Image 2: License: GNU](https://pypi-camo.freetls.fastly.net/8de17537dd1659a5a076ce547de301e27c839e67/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d626c75652e737667)](https://opensource.org/licenses/gpl-3-0) [![Image 3: Python 3.13](https://pypi-camo.freetls.fastly.net/e4930d5d2a7b16dfd9891ecb7396975ef462cff3/68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f696e6a782e7376673f6c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465)](https://www.python.org/downloads/release/python-3130/)
13
+ ![Python Package](https://github.com/tomekkorbak/strava-mcp-server/actions/workflows/python-package.yml/badge.svg)
14
+ [![License: GNU](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://opensource.org/licenses/gpl-3-0)
15
+ [![Python 3.13](https://img.shields.io/badge/python-3.13-blue?logo=python&logoColor=white)](https://www.python.org/downloads/release/python-3130/)
14
16
 
15
17
  A small Model Context Protocol (MCP) server that exposes your Strava athlete data to language-model tooling.
16
18
 
@@ -138,3 +140,4 @@ This project is licensed under the GNU GENERAL PUBLIC LICENSE — see the `LICEN
138
140
  - Documentation note: see `README.md` for an example MCP configuration
139
141
 
140
142
 
143
+
@@ -0,0 +1,8 @@
1
+ strava_activity_mcp_server/__init__.py,sha256=jaa1ZVuEJMwuVGzj67oqC_ESUUiwblVVH-NEtTiQQdQ,110
2
+ strava_activity_mcp_server/__main__.py,sha256=SAdVoObdjb5UP4MY-Y2_uCXpnthB6hgxlb1KNVNgOrc,58
3
+ strava_activity_mcp_server/strava_activity_mcp_server.py,sha256=FenliPAzC8OyFVReM2iOofrbiar8eD6YW5Il4Ee851M,8567
4
+ strava_activity_mcp_server-0.1.7.dist-info/METADATA,sha256=mZ0TKn5ODR2CdNwg_VJDrndBGd_LBgRJpprR0Rh-i1A,5582
5
+ strava_activity_mcp_server-0.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ strava_activity_mcp_server-0.1.7.dist-info/entry_points.txt,sha256=F6PO_DBSThhtmX2AC-tu2MIiCJkGi31LCaQJxfUzZ5g,79
7
+ strava_activity_mcp_server-0.1.7.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
8
+ strava_activity_mcp_server-0.1.7.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- strava_activity_mcp_server/__init__.py,sha256=NgXC8CeBg0qFRHdZJJKjQlX9_RwSETJ9O6PNy0leOTI,107
2
- strava_activity_mcp_server/__main__.py,sha256=SAdVoObdjb5UP4MY-Y2_uCXpnthB6hgxlb1KNVNgOrc,58
3
- strava_activity_mcp_server/strava_activity_mcp_server.py,sha256=3SSoZ831XiPZqQM5l-Bm_75NYJesy22Iq13gor5reO8,7879
4
- strava_activity_mcp_server-0.1.5.dist-info/METADATA,sha256=0GZluIc01hk06PvxOEWHt04TDBNE7bHTSsW30IfbpTU,6045
5
- strava_activity_mcp_server-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- strava_activity_mcp_server-0.1.5.dist-info/entry_points.txt,sha256=F6PO_DBSThhtmX2AC-tu2MIiCJkGi31LCaQJxfUzZ5g,79
7
- strava_activity_mcp_server-0.1.5.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
8
- strava_activity_mcp_server-0.1.5.dist-info/RECORD,,