strava-activity-mcp-server 0.2.3__tar.gz → 0.2.4__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.

Potentially problematic release.


This version of strava-activity-mcp-server might be problematic. Click here for more details.

Files changed (22) hide show
  1. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/.python-version +1 -1
  2. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/PKG-INFO +1 -1
  3. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/pyproject.toml +21 -21
  4. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/prompts.md +231 -231
  5. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/src/strava_activity_mcp_server/__init__.py +3 -3
  6. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/src/strava_activity_mcp_server/strava_activity_mcp_server.py +6 -3
  7. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/uv.lock +2 -2
  8. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/.github/workflows/python-publish.yml +0 -0
  9. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/.gitignore +0 -0
  10. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/.vscode/settings.json +0 -0
  11. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/LICENSE +0 -0
  12. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/README.md +0 -0
  13. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/auth.jpg +0 -0
  14. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/chat_1.jpg +0 -0
  15. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/chat_2.jpg +0 -0
  16. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/chat_3.jpg +0 -0
  17. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/chat_4.jpg +0 -0
  18. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/code.jpg +0 -0
  19. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/image.jpg +0 -0
  20. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/ref/mcp_pypi_example.md +0 -0
  21. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/requirements.txt +0 -0
  22. {strava_activity_mcp_server-0.2.3 → strava_activity_mcp_server-0.2.4}/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.2.3
3
+ Version: 0.2.4
4
4
  Summary: Strava MCP server: one-time browser auth, then automatic refresh-token login
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.10
@@ -1,21 +1,21 @@
1
- [project]
2
- name = "strava-activity-mcp-server"
3
- version = "0.2.3"
4
- description = "Strava MCP server: one-time browser auth, then automatic refresh-token login"
5
- readme = "README.md"
6
- requires-python = ">=3.10"
7
- dependencies = [
8
- "build>=1.3.0",
9
- "mcp[cli]>=1.16.0",
10
- "twine>=6.2.0",
11
- ]
12
-
13
- [project.scripts]
14
- strava-activity-mcp-server = "strava_activity_mcp_server:main"
15
-
16
- [build-system]
17
- requires = ["hatchling"]
18
- build-backend = "hatchling.build"
19
-
20
- [tool.hatch.build.targets.wheel]
21
- packages = ["src/strava_activity_mcp_server"]
1
+ [project]
2
+ name = "strava-activity-mcp-server"
3
+ version = "0.2.4"
4
+ description = "Strava MCP server: one-time browser auth, then automatic refresh-token login"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "build>=1.3.0",
9
+ "mcp[cli]>=1.16.0",
10
+ "twine>=6.2.0",
11
+ ]
12
+
13
+ [project.scripts]
14
+ strava-activity-mcp-server = "strava_activity_mcp_server:main"
15
+
16
+ [build-system]
17
+ requires = ["hatchling"]
18
+ build-backend = "hatchling.build"
19
+
20
+ [tool.hatch.build.targets.wheel]
21
+ packages = ["src/strava_activity_mcp_server"]
@@ -1,231 +1,231 @@
1
- Title: Prompts - Model Context Protocol
2
-
3
- URL Source: http://modelcontextprotocol.io/specification/2025-06-18/server/prompts
4
-
5
- Markdown Content:
6
- The Model Context Protocol (MCP) provides a standardized way for servers to expose prompt templates to clients. Prompts allow servers to provide structured messages and instructions for interacting with language models. Clients can discover available prompts, retrieve their contents, and provide arguments to customize them.
7
-
8
- User Interaction Model
9
- ----------------------
10
-
11
- Prompts are designed to be **user-controlled**, meaning they are exposed from servers to clients with the intention of the user being able to explicitly select them for use.Typically, prompts would be triggered through user-initiated commands in the user interface, which allows users to naturally discover and invoke available prompts.For example, as slash commands:![Image 1: Example of prompt exposed as slash command](https://mintcdn.com/mcp/4ZXF1PrDkEaJvXpn/specification/2025-06-18/server/slash-command.png?fit=max&auto=format&n=4ZXF1PrDkEaJvXpn&q=85&s=7f003e36d881dd6f3e5b8cbdd85e5ca5)However, implementors are free to expose prompts through any interface pattern that suits their needs—the protocol itself does not mandate any specific user interaction model.
12
-
13
- Capabilities
14
- ------------
15
-
16
- Servers that support prompts **MUST** declare the `prompts` capability during [initialization](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#initialization):
17
-
18
- ```
19
- {
20
- "capabilities": {
21
- "prompts": {
22
- "listChanged": true
23
- }
24
- }
25
- }
26
- ```
27
-
28
- `listChanged` indicates whether the server will emit notifications when the list of available prompts changes.
29
-
30
- Protocol Messages
31
- -----------------
32
-
33
- ### Listing Prompts
34
-
35
- To retrieve available prompts, clients send a `prompts/list` request. This operation supports [pagination](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination).**Request:**
36
-
37
- ```
38
- {
39
- "jsonrpc": "2.0",
40
- "id": 1,
41
- "method": "prompts/list",
42
- "params": {
43
- "cursor": "optional-cursor-value"
44
- }
45
- }
46
- ```
47
-
48
- **Response:**
49
-
50
- ```
51
- {
52
- "jsonrpc": "2.0",
53
- "id": 1,
54
- "result": {
55
- "prompts": [
56
- {
57
- "name": "code_review",
58
- "title": "Request Code Review",
59
- "description": "Asks the LLM to analyze code quality and suggest improvements",
60
- "arguments": [
61
- {
62
- "name": "code",
63
- "description": "The code to review",
64
- "required": true
65
- }
66
- ]
67
- }
68
- ],
69
- "nextCursor": "next-page-cursor"
70
- }
71
- }
72
- ```
73
-
74
- ### Getting a Prompt
75
-
76
- To retrieve a specific prompt, clients send a `prompts/get` request. Arguments may be auto-completed through [the completion API](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/completion).**Request:**
77
-
78
- ```
79
- {
80
- "jsonrpc": "2.0",
81
- "id": 2,
82
- "method": "prompts/get",
83
- "params": {
84
- "name": "code_review",
85
- "arguments": {
86
- "code": "def hello():\n print('world')"
87
- }
88
- }
89
- }
90
- ```
91
-
92
- **Response:**
93
-
94
- ```
95
- {
96
- "jsonrpc": "2.0",
97
- "id": 2,
98
- "result": {
99
- "description": "Code review prompt",
100
- "messages": [
101
- {
102
- "role": "user",
103
- "content": {
104
- "type": "text",
105
- "text": "Please review this Python code:\ndef hello():\n print('world')"
106
- }
107
- }
108
- ]
109
- }
110
- }
111
- ```
112
-
113
- ### List Changed Notification
114
-
115
- When the list of available prompts changes, servers that declared the `listChanged` capability **SHOULD** send a notification:
116
-
117
- ```
118
- {
119
- "jsonrpc": "2.0",
120
- "method": "notifications/prompts/list_changed"
121
- }
122
- ```
123
-
124
- Message Flow
125
- ------------
126
-
127
- Data Types
128
- ----------
129
-
130
- ### Prompt
131
-
132
- A prompt definition includes:
133
-
134
- * `name`: Unique identifier for the prompt
135
- * `title`: Optional human-readable name of the prompt for display purposes.
136
- * `description`: Optional human-readable description
137
- * `arguments`: Optional list of arguments for customization
138
-
139
- ### PromptMessage
140
-
141
- Messages in a prompt can contain:
142
-
143
- * `role`: Either “user” or “assistant” to indicate the speaker
144
- * `content`: One of the following content types:
145
-
146
- #### Text Content
147
-
148
- Text content represents plain text messages:
149
-
150
- ```
151
- {
152
- "type": "text",
153
- "text": "The text content of the message"
154
- }
155
- ```
156
-
157
- This is the most common content type used for natural language interactions.
158
-
159
- #### Image Content
160
-
161
- Image content allows including visual information in messages:
162
-
163
- ```
164
- {
165
- "type": "image",
166
- "data": "base64-encoded-image-data",
167
- "mimeType": "image/png"
168
- }
169
- ```
170
-
171
- The image data **MUST** be base64-encoded and include a valid MIME type. This enables multi-modal interactions where visual context is important.
172
-
173
- #### Audio Content
174
-
175
- Audio content allows including audio information in messages:
176
-
177
- ```
178
- {
179
- "type": "audio",
180
- "data": "base64-encoded-audio-data",
181
- "mimeType": "audio/wav"
182
- }
183
- ```
184
-
185
- The audio data MUST be base64-encoded and include a valid MIME type. This enables multi-modal interactions where audio context is important.
186
-
187
- #### Embedded Resources
188
-
189
- Embedded resources allow referencing server-side resources directly in messages:
190
-
191
- ```
192
- {
193
- "type": "resource",
194
- "resource": {
195
- "uri": "resource://example",
196
- "name": "example",
197
- "title": "My Example Resource",
198
- "mimeType": "text/plain",
199
- "text": "Resource content"
200
- }
201
- }
202
- ```
203
-
204
- Resources can contain either text or binary (blob) data and **MUST** include:
205
-
206
- * A valid resource URI
207
- * The appropriate MIME type
208
- * Either text content or base64-encoded blob data
209
-
210
- Embedded resources enable prompts to seamlessly incorporate server-managed content like documentation, code samples, or other reference materials directly into the conversation flow.
211
-
212
- Error Handling
213
- --------------
214
-
215
- Servers **SHOULD** return standard JSON-RPC errors for common failure cases:
216
-
217
- * Invalid prompt name: `-32602` (Invalid params)
218
- * Missing required arguments: `-32602` (Invalid params)
219
- * Internal errors: `-32603` (Internal error)
220
-
221
- Implementation Considerations
222
- -----------------------------
223
-
224
- 1. Servers **SHOULD** validate prompt arguments before processing
225
- 2. Clients **SHOULD** handle pagination for large prompt lists
226
- 3. Both parties **SHOULD** respect capability negotiation
227
-
228
- Security
229
- --------
230
-
231
- Implementations **MUST** carefully validate all prompt inputs and outputs to prevent injection attacks or unauthorized access to resources.
1
+ Title: Prompts - Model Context Protocol
2
+
3
+ URL Source: http://modelcontextprotocol.io/specification/2025-06-18/server/prompts
4
+
5
+ Markdown Content:
6
+ The Model Context Protocol (MCP) provides a standardized way for servers to expose prompt templates to clients. Prompts allow servers to provide structured messages and instructions for interacting with language models. Clients can discover available prompts, retrieve their contents, and provide arguments to customize them.
7
+
8
+ User Interaction Model
9
+ ----------------------
10
+
11
+ Prompts are designed to be **user-controlled**, meaning they are exposed from servers to clients with the intention of the user being able to explicitly select them for use.Typically, prompts would be triggered through user-initiated commands in the user interface, which allows users to naturally discover and invoke available prompts.For example, as slash commands:![Image 1: Example of prompt exposed as slash command](https://mintcdn.com/mcp/4ZXF1PrDkEaJvXpn/specification/2025-06-18/server/slash-command.png?fit=max&auto=format&n=4ZXF1PrDkEaJvXpn&q=85&s=7f003e36d881dd6f3e5b8cbdd85e5ca5)However, implementors are free to expose prompts through any interface pattern that suits their needs—the protocol itself does not mandate any specific user interaction model.
12
+
13
+ Capabilities
14
+ ------------
15
+
16
+ Servers that support prompts **MUST** declare the `prompts` capability during [initialization](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#initialization):
17
+
18
+ ```
19
+ {
20
+ "capabilities": {
21
+ "prompts": {
22
+ "listChanged": true
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ `listChanged` indicates whether the server will emit notifications when the list of available prompts changes.
29
+
30
+ Protocol Messages
31
+ -----------------
32
+
33
+ ### Listing Prompts
34
+
35
+ To retrieve available prompts, clients send a `prompts/list` request. This operation supports [pagination](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination).**Request:**
36
+
37
+ ```
38
+ {
39
+ "jsonrpc": "2.0",
40
+ "id": 1,
41
+ "method": "prompts/list",
42
+ "params": {
43
+ "cursor": "optional-cursor-value"
44
+ }
45
+ }
46
+ ```
47
+
48
+ **Response:**
49
+
50
+ ```
51
+ {
52
+ "jsonrpc": "2.0",
53
+ "id": 1,
54
+ "result": {
55
+ "prompts": [
56
+ {
57
+ "name": "code_review",
58
+ "title": "Request Code Review",
59
+ "description": "Asks the LLM to analyze code quality and suggest improvements",
60
+ "arguments": [
61
+ {
62
+ "name": "code",
63
+ "description": "The code to review",
64
+ "required": true
65
+ }
66
+ ]
67
+ }
68
+ ],
69
+ "nextCursor": "next-page-cursor"
70
+ }
71
+ }
72
+ ```
73
+
74
+ ### Getting a Prompt
75
+
76
+ To retrieve a specific prompt, clients send a `prompts/get` request. Arguments may be auto-completed through [the completion API](https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/completion).**Request:**
77
+
78
+ ```
79
+ {
80
+ "jsonrpc": "2.0",
81
+ "id": 2,
82
+ "method": "prompts/get",
83
+ "params": {
84
+ "name": "code_review",
85
+ "arguments": {
86
+ "code": "def hello():\n print('world')"
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ **Response:**
93
+
94
+ ```
95
+ {
96
+ "jsonrpc": "2.0",
97
+ "id": 2,
98
+ "result": {
99
+ "description": "Code review prompt",
100
+ "messages": [
101
+ {
102
+ "role": "user",
103
+ "content": {
104
+ "type": "text",
105
+ "text": "Please review this Python code:\ndef hello():\n print('world')"
106
+ }
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ ```
112
+
113
+ ### List Changed Notification
114
+
115
+ When the list of available prompts changes, servers that declared the `listChanged` capability **SHOULD** send a notification:
116
+
117
+ ```
118
+ {
119
+ "jsonrpc": "2.0",
120
+ "method": "notifications/prompts/list_changed"
121
+ }
122
+ ```
123
+
124
+ Message Flow
125
+ ------------
126
+
127
+ Data Types
128
+ ----------
129
+
130
+ ### Prompt
131
+
132
+ A prompt definition includes:
133
+
134
+ * `name`: Unique identifier for the prompt
135
+ * `title`: Optional human-readable name of the prompt for display purposes.
136
+ * `description`: Optional human-readable description
137
+ * `arguments`: Optional list of arguments for customization
138
+
139
+ ### PromptMessage
140
+
141
+ Messages in a prompt can contain:
142
+
143
+ * `role`: Either “user” or “assistant” to indicate the speaker
144
+ * `content`: One of the following content types:
145
+
146
+ #### Text Content
147
+
148
+ Text content represents plain text messages:
149
+
150
+ ```
151
+ {
152
+ "type": "text",
153
+ "text": "The text content of the message"
154
+ }
155
+ ```
156
+
157
+ This is the most common content type used for natural language interactions.
158
+
159
+ #### Image Content
160
+
161
+ Image content allows including visual information in messages:
162
+
163
+ ```
164
+ {
165
+ "type": "image",
166
+ "data": "base64-encoded-image-data",
167
+ "mimeType": "image/png"
168
+ }
169
+ ```
170
+
171
+ The image data **MUST** be base64-encoded and include a valid MIME type. This enables multi-modal interactions where visual context is important.
172
+
173
+ #### Audio Content
174
+
175
+ Audio content allows including audio information in messages:
176
+
177
+ ```
178
+ {
179
+ "type": "audio",
180
+ "data": "base64-encoded-audio-data",
181
+ "mimeType": "audio/wav"
182
+ }
183
+ ```
184
+
185
+ The audio data MUST be base64-encoded and include a valid MIME type. This enables multi-modal interactions where audio context is important.
186
+
187
+ #### Embedded Resources
188
+
189
+ Embedded resources allow referencing server-side resources directly in messages:
190
+
191
+ ```
192
+ {
193
+ "type": "resource",
194
+ "resource": {
195
+ "uri": "resource://example",
196
+ "name": "example",
197
+ "title": "My Example Resource",
198
+ "mimeType": "text/plain",
199
+ "text": "Resource content"
200
+ }
201
+ }
202
+ ```
203
+
204
+ Resources can contain either text or binary (blob) data and **MUST** include:
205
+
206
+ * A valid resource URI
207
+ * The appropriate MIME type
208
+ * Either text content or base64-encoded blob data
209
+
210
+ Embedded resources enable prompts to seamlessly incorporate server-managed content like documentation, code samples, or other reference materials directly into the conversation flow.
211
+
212
+ Error Handling
213
+ --------------
214
+
215
+ Servers **SHOULD** return standard JSON-RPC errors for common failure cases:
216
+
217
+ * Invalid prompt name: `-32602` (Invalid params)
218
+ * Missing required arguments: `-32602` (Invalid params)
219
+ * Internal errors: `-32603` (Internal error)
220
+
221
+ Implementation Considerations
222
+ -----------------------------
223
+
224
+ 1. Servers **SHOULD** validate prompt arguments before processing
225
+ 2. Clients **SHOULD** handle pagination for large prompt lists
226
+ 3. Both parties **SHOULD** respect capability negotiation
227
+
228
+ Security
229
+ --------
230
+
231
+ Implementations **MUST** carefully validate all prompt inputs and outputs to prevent injection attacks or unauthorized access to resources.
@@ -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()
@@ -196,8 +196,6 @@ async def get_athlete_stats(
196
196
  "save": save_result
197
197
  }
198
198
 
199
- return response.json()
200
-
201
199
  @mcp.tool("strava://athlete/stats-with-token")
202
200
  async def get_athlete_stats_with_token(access_token: str) -> dict:
203
201
  """Get athlete activities using an existing access token."""
@@ -219,7 +217,12 @@ async def get_athlete_stats_with_token(access_token: str) -> dict:
219
217
  except Exception as e:
220
218
  return {"error": "API request failed", "status_code": response.status_code, "response": response.text, "error": str(e)}
221
219
 
222
- return response.json()
220
+ activities_data = response.json()
221
+ return {
222
+ "activities": activities_data,
223
+ "count": len(activities_data) if isinstance(activities_data, list) else 0,
224
+ "status": "success"
225
+ }
223
226
 
224
227
  @mcp.tool("strava://auth/save")
225
228
  async def save_tokens(tokens: dict | None = None) -> dict:
@@ -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.2.3"
1034
+ version = "0.2.4"
1035
1035
  source = { editable = "." }
1036
1036
  dependencies = [
1037
1037
  { name = "build" },