strava-activity-mcp-server 0.1.8__tar.gz → 0.2.0__tar.gz

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.
Files changed (17) hide show
  1. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/PKG-INFO +25 -26
  2. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/README.md +24 -25
  3. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/pyproject.toml +1 -1
  4. strava_activity_mcp_server-0.2.0/ref/auth.jpg +0 -0
  5. strava_activity_mcp_server-0.2.0/ref/code.jpg +0 -0
  6. strava_activity_mcp_server-0.2.0/ref/image.jpg +0 -0
  7. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/src/strava_activity_mcp_server/strava_activity_mcp_server.py +1 -0
  8. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/uv.lock +2 -2
  9. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/.github/workflows/python-publish.yml +0 -0
  10. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/.gitignore +0 -0
  11. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/.python-version +0 -0
  12. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/.vscode/settings.json +0 -0
  13. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/LICENSE +0 -0
  14. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/ref/mcp_pypi_example.md +0 -0
  15. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/requirements.txt +0 -0
  16. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/src/strava_activity_mcp_server/__init__.py +0 -0
  17. {strava_activity_mcp_server-0.1.8 → strava_activity_mcp_server-0.2.0}/src/strava_activity_mcp_server/__main__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strava-activity-mcp-server
3
- Version: 0.1.8
3
+ Version: 0.2.0
4
4
  Summary: STRAVA ACTIVITY MCP SERVER
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.10
@@ -13,6 +13,11 @@ Description-Content-Type: text/markdown
13
13
  ![Python Package](https://github.com/tomekkorbak/strava-mcp-server/actions/workflows/python-package.yml/badge.svg)
14
14
  [![License: GNU](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://opensource.org/licenses/gpl-3-0)
15
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/)
16
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/strava-activity-mcp-server)](https://pypistats.org/packages/strava-activity-mcp-server)
17
+
18
+ ![image](https://github.com/user-attachments/assets/4bb214ca-1132-4e63-9390-d6eaddab50be)
19
+
20
+
16
21
 
17
22
  A small Model Context Protocol (MCP) server that exposes your Strava athlete data to language-model tooling.
18
23
 
@@ -39,7 +44,7 @@ After installing, you can run the MCP server using the provided console script o
39
44
 
40
45
  Run via the console script (entry point defined in `pyproject.toml`):
41
46
 
42
- ```powershell
47
+ ```cmd
43
48
  strava-activity-mcp-server
44
49
  ```
45
50
 
@@ -63,27 +68,21 @@ This server requires Strava OAuth credentials to access athlete data. You will n
63
68
  Steps:
64
69
 
65
70
  1. Create a Strava API application at https://www.strava.com/settings/api and note your Client ID and Client Secret. Use `localhost` as the Authorization Callback Domain.
66
- 2. Open the authorization URL produced by the `strava://auth/url` tool (see Tools below) in a browser to obtain an authorization code.
67
- 3. Exchange the code for tokens using `strava://auth/token` or use the included helper to save refresh/access tokens to your environment.
71
+ 2. Open the authorization URL produced by the `strava://auth/url` tool (see IMAGE below) in a browser to obtain an authorization code.
68
72
 
69
- For local testing you can also manually set the environment variables before running the server:
73
+ ![auth](https://github.com/user-attachments/assets/a348ccc7-a4be-49fb-8f79-b88f9d80cfc9)
70
74
 
71
- ```powershell
72
- $env:STRAVA_CLIENT_ID = "<your client id>";
73
- $env:STRAVA_CLIENT_SECRET = "<your client secret>";
74
- $env:STRAVA_REFRESH_TOKEN = "<your refresh token>";
75
- strava-activity-mcp-server
76
- ```
75
+ 3. Copy the code from the redirected URL (Image below) or use the included helper to save refresh/access tokens to your environment.
76
+
77
+ ![code](https://github.com/user-attachments/assets/0bb54edb-c9f9-4416-8fb2-c7e0a38d11c9)
77
78
 
78
- Note: Keep secrets out of version control. Use a `.env` file and a tool such as `direnv` or your system secrets manager for convenience.
79
79
 
80
80
  ## Exposed Tools (what the server provides)
81
81
 
82
82
  The MCP server exposes the following tools (tool IDs shown):
83
83
 
84
84
  - `strava://auth/url` — Build the Strava OAuth authorization URL. Input: `client_id` (int). Output: URL string to open in a browser.
85
- - `strava://auth/token` — Exchange an authorization code for access + refresh tokens. Inputs: `code` (str), `client_id` (int), `client_secret` (str). Output: token dict (with `access_token`, `refresh_token`).
86
- - `strava://athlete/stats` — Fetch recent athlete activities. Input: `token` (str). Output: JSON with activity list.
85
+ - `strava://athlete/stats` — Fetch recent athlete activities. Input: `client_id` (int), `client_secret` (str), `access_token` (str) and obtained `code` from URL generated by `strava://auth/url`. Output: JSON with activity list.
87
86
 
88
87
  These tools map to the functions implemented in `src/strava_activity_mcp_server/strava_activity_mcp_server.py` and are intended to be called by MCP clients.
89
88
 
@@ -92,28 +91,27 @@ These tools map to the functions implemented in `src/strava_activity_mcp_server/
92
91
  1) Get an authorization URL and retrieve tokens
93
92
 
94
93
  - Call `strava://auth/url` with your `client_id` and open the returned URL in your browser.
95
- - After authorizing, Strava will provide a `code`. Call `strava://auth/token` with `code`, `client_id`, and `client_secret` to receive `access_token` and `refresh_token`.
94
+ - After authorizing, Strava will provide a `code`.
96
95
 
97
96
  2) Fetch recent activities
98
97
 
99
98
  - Use `strava://athlete/stats` with a valid access token. If the access token is expired, use the refresh flow to get a new access token.
100
99
 
101
- ## Developer notes
102
-
103
- - The package entry point calls `mcp.run()` which runs the MCP server. If you want to change transport or logging settings, modify `src/strava_activity_mcp_server/__init__.py` or `strava_activity_mcp_server.py`.
104
- - The code uses the `requests` library for HTTP calls.
105
-
106
-
107
100
  ### Client config example and quick inspector test
108
101
 
109
- Any MCP-capable client can launch the server using a config similar to the following (example file often called `config.json`):
102
+ Any MCP-capable client can launch the server using a config similar to the following (example file often called `config.json`. Be sure to enter your values here):
110
103
 
111
104
  ```json
112
105
  {
113
- "command": "uvx",
114
- "args": [
115
- "strava-activity-mcp-server"
116
- ]
106
+ "command": "uvx",
107
+ "args": [
108
+ "strava-activity-mcp-server"
109
+ ],
110
+ "env": {
111
+ "STRAVA_CLIENT_ID": "12345",
112
+ "STRAVA_CLIENT_SECRET": "e1234a12d12345f12c1f12345a123bba1d12c1",
113
+ "STRAVA_REFRESH_TOKEN": "1a123eda1cfd12345678987db2db1bda234c38"
114
+ }
117
115
  }
118
116
  ```
119
117
 
@@ -141,3 +139,4 @@ This project is licensed under the GNU GENERAL PUBLIC LICENSE — see the `LICEN
141
139
 
142
140
 
143
141
 
142
+
@@ -2,6 +2,11 @@
2
2
  ![Python Package](https://github.com/tomekkorbak/strava-mcp-server/actions/workflows/python-package.yml/badge.svg)
3
3
  [![License: GNU](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://opensource.org/licenses/gpl-3-0)
4
4
  [![Python 3.13](https://img.shields.io/badge/python-3.13-blue?logo=python&logoColor=white)](https://www.python.org/downloads/release/python-3130/)
5
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/strava-activity-mcp-server)](https://pypistats.org/packages/strava-activity-mcp-server)
6
+
7
+ ![image](https://github.com/user-attachments/assets/4bb214ca-1132-4e63-9390-d6eaddab50be)
8
+
9
+
5
10
 
6
11
  A small Model Context Protocol (MCP) server that exposes your Strava athlete data to language-model tooling.
7
12
 
@@ -28,7 +33,7 @@ After installing, you can run the MCP server using the provided console script o
28
33
 
29
34
  Run via the console script (entry point defined in `pyproject.toml`):
30
35
 
31
- ```powershell
36
+ ```cmd
32
37
  strava-activity-mcp-server
33
38
  ```
34
39
 
@@ -52,27 +57,21 @@ This server requires Strava OAuth credentials to access athlete data. You will n
52
57
  Steps:
53
58
 
54
59
  1. Create a Strava API application at https://www.strava.com/settings/api and note your Client ID and Client Secret. Use `localhost` as the Authorization Callback Domain.
55
- 2. Open the authorization URL produced by the `strava://auth/url` tool (see Tools below) in a browser to obtain an authorization code.
56
- 3. Exchange the code for tokens using `strava://auth/token` or use the included helper to save refresh/access tokens to your environment.
60
+ 2. Open the authorization URL produced by the `strava://auth/url` tool (see IMAGE below) in a browser to obtain an authorization code.
57
61
 
58
- For local testing you can also manually set the environment variables before running the server:
62
+ ![auth](https://github.com/user-attachments/assets/a348ccc7-a4be-49fb-8f79-b88f9d80cfc9)
59
63
 
60
- ```powershell
61
- $env:STRAVA_CLIENT_ID = "<your client id>";
62
- $env:STRAVA_CLIENT_SECRET = "<your client secret>";
63
- $env:STRAVA_REFRESH_TOKEN = "<your refresh token>";
64
- strava-activity-mcp-server
65
- ```
64
+ 3. Copy the code from the redirected URL (Image below) or use the included helper to save refresh/access tokens to your environment.
65
+
66
+ ![code](https://github.com/user-attachments/assets/0bb54edb-c9f9-4416-8fb2-c7e0a38d11c9)
66
67
 
67
- Note: Keep secrets out of version control. Use a `.env` file and a tool such as `direnv` or your system secrets manager for convenience.
68
68
 
69
69
  ## Exposed Tools (what the server provides)
70
70
 
71
71
  The MCP server exposes the following tools (tool IDs shown):
72
72
 
73
73
  - `strava://auth/url` — Build the Strava OAuth authorization URL. Input: `client_id` (int). Output: URL string to open in a browser.
74
- - `strava://auth/token` — Exchange an authorization code for access + refresh tokens. Inputs: `code` (str), `client_id` (int), `client_secret` (str). Output: token dict (with `access_token`, `refresh_token`).
75
- - `strava://athlete/stats` — Fetch recent athlete activities. Input: `token` (str). Output: JSON with activity list.
74
+ - `strava://athlete/stats` — Fetch recent athlete activities. Input: `client_id` (int), `client_secret` (str), `access_token` (str) and obtained `code` from URL generated by `strava://auth/url`. Output: JSON with activity list.
76
75
 
77
76
  These tools map to the functions implemented in `src/strava_activity_mcp_server/strava_activity_mcp_server.py` and are intended to be called by MCP clients.
78
77
 
@@ -81,28 +80,27 @@ These tools map to the functions implemented in `src/strava_activity_mcp_server/
81
80
  1) Get an authorization URL and retrieve tokens
82
81
 
83
82
  - Call `strava://auth/url` with your `client_id` and open the returned URL in your browser.
84
- - After authorizing, Strava will provide a `code`. Call `strava://auth/token` with `code`, `client_id`, and `client_secret` to receive `access_token` and `refresh_token`.
83
+ - After authorizing, Strava will provide a `code`.
85
84
 
86
85
  2) Fetch recent activities
87
86
 
88
87
  - Use `strava://athlete/stats` with a valid access token. If the access token is expired, use the refresh flow to get a new access token.
89
88
 
90
- ## Developer notes
91
-
92
- - The package entry point calls `mcp.run()` which runs the MCP server. If you want to change transport or logging settings, modify `src/strava_activity_mcp_server/__init__.py` or `strava_activity_mcp_server.py`.
93
- - The code uses the `requests` library for HTTP calls.
94
-
95
-
96
89
  ### Client config example and quick inspector test
97
90
 
98
- Any MCP-capable client can launch the server using a config similar to the following (example file often called `config.json`):
91
+ Any MCP-capable client can launch the server using a config similar to the following (example file often called `config.json`. Be sure to enter your values here):
99
92
 
100
93
  ```json
101
94
  {
102
- "command": "uvx",
103
- "args": [
104
- "strava-activity-mcp-server"
105
- ]
95
+ "command": "uvx",
96
+ "args": [
97
+ "strava-activity-mcp-server"
98
+ ],
99
+ "env": {
100
+ "STRAVA_CLIENT_ID": "12345",
101
+ "STRAVA_CLIENT_SECRET": "e1234a12d12345f12c1f12345a123bba1d12c1",
102
+ "STRAVA_REFRESH_TOKEN": "1a123eda1cfd12345678987db2db1bda234c38"
103
+ }
106
104
  }
107
105
  ```
108
106
 
@@ -130,3 +128,4 @@ This project is licensed under the GNU GENERAL PUBLIC LICENSE — see the `LICEN
130
128
 
131
129
 
132
130
 
131
+
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "strava-activity-mcp-server"
3
- version = "0.1.8"
3
+ version = "0.2.0"
4
4
  description = "STRAVA ACTIVITY MCP SERVER"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -27,6 +27,7 @@ def get_auth_url(client_id: int | None = None):
27
27
  "approval_prompt": "force",
28
28
  "scope": "read,activity:read_all",
29
29
  }
30
+ # Always return whole URL and not part of it
30
31
  return "https://www.strava.com/oauth/authorize?" + urllib.parse.urlencode(params)
31
32
 
32
33
 
@@ -1,5 +1,5 @@
1
1
  version = 1
2
- revision = 3
2
+ revision = 2
3
3
  requires-python = ">=3.10"
4
4
 
5
5
  [[package]]
@@ -1031,7 +1031,7 @@ wheels = [
1031
1031
 
1032
1032
  [[package]]
1033
1033
  name = "strava-activity-mcp-server"
1034
- version = "0.1.8"
1034
+ version = "0.2.0"
1035
1035
  source = { editable = "." }
1036
1036
  dependencies = [
1037
1037
  { name = "build" },