strava-activity-mcp-server 0.1.0__py3-none-any.whl → 0.1.1__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.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: strava-activity-mcp-server
3
+ Version: 0.1.1
4
+ Summary: Add your description here
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.13
7
+ Requires-Dist: build>=1.3.0
8
+ Requires-Dist: mcp[cli]>=1.16.0
9
+ Requires-Dist: twine>=6.2.0
10
+ Description-Content-Type: text/markdown
11
+
12
+ # strava-activity-mcp-server
13
+
14
+ A small Model Context Protocol (MCP) server that exposes your Strava athlete data to language-model tooling.
15
+
16
+ This package provides a lightweight MCP server which communicates with the Strava API and exposes a few helper tools (authorization URL, token exchange/refresh, and fetching athlete activities) that language models or other local tools can call.
17
+
18
+ The project is intended to be used locally (for example with Claude MCP integrations) and is published on PyPI as `strava-activity-mcp-server`.
19
+
20
+ ## Installation
21
+
22
+ Install from PyPI with pip (recommended inside a virtual environment):
23
+
24
+ ```powershell
25
+ pip install strava-activity-mcp-server
26
+ ```
27
+
28
+ ## Requirements
29
+
30
+ - Python >= 3.13 (see `pyproject.toml`)
31
+ - The package depends on `mcp[cli]` and `requests` (installed from PyPI).
32
+
33
+ ## Quick start
34
+
35
+ After installing, you can run the MCP server using the provided console script or by importing and calling `main()`.
36
+
37
+ Run via the console script (entry point defined in `pyproject.toml`):
38
+
39
+ ```powershell
40
+ strava-activity-mcp-server
41
+ ```
42
+
43
+ Or, from Python:
44
+
45
+ ```python
46
+ from strava_activity_mcp_server import main
47
+ main()
48
+ ```
49
+
50
+ By default the server starts the MCP runtime; when used with an MCP-aware client (for example Claude MCP integrations) the exposed tools become callable.
51
+
52
+ ## Authentication (Strava OAuth)
53
+
54
+ This server requires Strava OAuth credentials to access athlete data. You will need:
55
+
56
+ - STRAVA_CLIENT_ID
57
+ - STRAVA_CLIENT_SECRET
58
+ - STRAVA_REFRESH_TOKEN (or a short-lived access token obtained from the authorization flow)
59
+
60
+ Steps:
61
+
62
+ 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.
63
+ 2. Open the authorization URL produced by the `strava://auth/url` tool (see Tools below) in a browser to obtain an authorization code.
64
+ 3. Exchange the code for tokens using `strava://auth/token` or use the included helper to save refresh/access tokens to your environment.
65
+
66
+ For local testing you can also manually set the environment variables before running the server:
67
+
68
+ ```powershell
69
+ $env:STRAVA_CLIENT_ID = "<your client id>";
70
+ $env:STRAVA_CLIENT_SECRET = "<your client secret>";
71
+ $env:STRAVA_REFRESH_TOKEN = "<your refresh token>";
72
+ strava-activity-mcp-server
73
+ ```
74
+
75
+ Note: Keep secrets out of version control. Use a `.env` file and a tool such as `direnv` or your system secrets manager for convenience.
76
+
77
+ ## Exposed Tools (what the server provides)
78
+
79
+ The MCP server exposes the following tools (tool IDs shown):
80
+
81
+ - `strava://auth/url` — Build the Strava OAuth authorization URL. Input: `client_id` (int). Output: URL string to open in a browser.
82
+ - `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`).
83
+ - `strava://athlete/stats` — Fetch recent athlete activities. Input: `token` (str). Output: JSON with activity list.
84
+
85
+ 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.
86
+
87
+ ## Example flows
88
+
89
+ 1) Get an authorization URL and retrieve tokens
90
+
91
+ - Call `strava://auth/url` with your `client_id` and open the returned URL in your browser.
92
+ - 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`.
93
+
94
+ 2) Fetch recent activities
95
+
96
+ - 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.
97
+
98
+ ## Developer notes
99
+
100
+ - 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`.
101
+ - The code uses the `requests` library for HTTP calls.
102
+
103
+
104
+ ### Client config example and quick inspector test
105
+
106
+ Any MCP-capable client can launch the server using a config similar to the following (example file often called `config.json`):
107
+
108
+ ```json
109
+ {
110
+ "command": "uvx",
111
+ "args": [
112
+ "strava-activity-mcp-server"
113
+ ]
114
+ }
115
+ ```
116
+
117
+ To quickly test the server using the Model Context Protocol inspector tool, run:
118
+
119
+ ```powershell
120
+ npx @modelcontextprotocol/inspector uvx strava-mcp-server
121
+ ```
122
+
123
+ This will attempt to start the server with the `uvx` transport and connect the inspector to the running MCP server instance named `strava-mcp-server`.
124
+
125
+
126
+ ## Contributing
127
+
128
+ Contributions are welcome. Please open issues or pull requests that include a clear description and tests where applicable.
129
+
130
+ ## License
131
+
132
+ This project is licensed under the GNU GENERAL PUBLIC LICENSE — see the `LICENSE` file for details.
133
+
134
+ ## Links
135
+
136
+ - Source: repository root
137
+ - Documentation note: see `ref/mcp_pypi_example.md` for an example MCP configuration
@@ -1,8 +1,8 @@
1
1
  strava_activity_mcp_server/__init__.py,sha256=NgXC8CeBg0qFRHdZJJKjQlX9_RwSETJ9O6PNy0leOTI,107
2
2
  strava_activity_mcp_server/__main__.py,sha256=SAdVoObdjb5UP4MY-Y2_uCXpnthB6hgxlb1KNVNgOrc,58
3
3
  strava_activity_mcp_server/strava_activity_mcp_server.py,sha256=1Xvo763lIP9m9lBoAYZ2Al86KXw2ozdMSkF_bWl_JxM,3245
4
- strava_activity_mcp_server-0.1.0.dist-info/METADATA,sha256=cYlysawB9SAJX7FcPBIUUUsewHFObVu-DqDkOgpkcvQ,497
5
- strava_activity_mcp_server-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- strava_activity_mcp_server-0.1.0.dist-info/entry_points.txt,sha256=F6PO_DBSThhtmX2AC-tu2MIiCJkGi31LCaQJxfUzZ5g,79
7
- strava_activity_mcp_server-0.1.0.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
8
- strava_activity_mcp_server-0.1.0.dist-info/RECORD,,
4
+ strava_activity_mcp_server-0.1.1.dist-info/METADATA,sha256=4H0iet9CoT4KkKhLTV36M9q9Q1zRAgTaCHdJ2-exCbA,5189
5
+ strava_activity_mcp_server-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ strava_activity_mcp_server-0.1.1.dist-info/entry_points.txt,sha256=F6PO_DBSThhtmX2AC-tu2MIiCJkGi31LCaQJxfUzZ5g,79
7
+ strava_activity_mcp_server-0.1.1.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
8
+ strava_activity_mcp_server-0.1.1.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: strava-activity-mcp-server
3
- Version: 0.1.0
4
- Summary: Add your description here
5
- License-File: LICENSE
6
- Requires-Python: >=3.13
7
- Requires-Dist: build>=1.3.0
8
- Requires-Dist: mcp[cli]>=1.16.0
9
- Requires-Dist: twine>=6.2.0
10
- Description-Content-Type: text/markdown
11
-
12
- # strava-mcp-server
13
- MCP server that retrieves user activity data from Strava.
14
-
15
- .venv\Scripts\activate
16
-
17
- uv init --build-backend "hatchling"
18
-
19
- uv add mcp["cli"]
20
-
21
- uv run mcp dev scr/strava_mcp_server/strava_mcp_server.py