Yorrick Jansen Claude commited on
Commit
895aee3
Β·
1 Parent(s): e09f7d5

Prepare package for PyPI publishing

Browse files

- Add LICENSE file with MIT license
- Update package name to 'strava-mcp' in pyproject.toml
- Move main.py to strava_mcp/main.py for proper packaging
- Add entry point script for command-line usage
- Update README with installation and usage instructions
- Configure testpypi as a package index

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (5) hide show
  1. LICENSE +21 -0
  2. README.md +9 -5
  3. pyproject.toml +21 -2
  4. main.py β†’ strava_mcp/main.py +0 -0
  5. uv.lock +1 -1
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -92,7 +92,11 @@ This approach eliminates the need to manually go through the authorization flow
92
  To run the server:
93
 
94
  ```bash
95
- python main.py
 
 
 
 
96
  ```
97
 
98
  ### Development Mode
@@ -100,7 +104,7 @@ python main.py
100
  You can run the server in development mode with the MCP CLI:
101
 
102
  ```bash
103
- mcp dev main.py
104
  ```
105
 
106
  ### Installing in Claude Desktop
@@ -108,7 +112,7 @@ mcp dev main.py
108
  To install the server in Claude Desktop:
109
 
110
  ```bash
111
- mcp install --env-file ~/.ssh/env-strava.sh main.py
112
  ```
113
 
114
  Where `~/.ssh/strava.sh` contains your Strava credentials:
@@ -127,7 +131,7 @@ Alternatively, you can add the following to your Claude Desktop configuration:
127
  "command": "bash",
128
  "args": [
129
  "-c",
130
- "source ~/.ssh/strava.sh && uv --directory /Users/yorrickjansen/work/mcp/strava run main.py"
131
  ]
132
  }
133
  ```
@@ -198,7 +202,7 @@ Gets the leaderboard for a specific segment.
198
  - `service.py`: Service layer for business logic
199
  - `server.py`: MCP server implementation
200
  - `tests/`: Unit tests
201
- - `main.py`: Entry point to run the server
202
  - `get_token.py`: Utility script to get a refresh token manually
203
 
204
  ### Running Tests
 
92
  To run the server:
93
 
94
  ```bash
95
+ # If installed as a package:
96
+ strava-mcp
97
+
98
+ # Or run the module directly:
99
+ python -m strava_mcp.main
100
  ```
101
 
102
  ### Development Mode
 
104
  You can run the server in development mode with the MCP CLI:
105
 
106
  ```bash
107
+ mcp dev strava_mcp/main.py
108
  ```
109
 
110
  ### Installing in Claude Desktop
 
112
  To install the server in Claude Desktop:
113
 
114
  ```bash
115
+ mcp install --env-file ~/.ssh/env-strava.sh strava_mcp/main.py
116
  ```
117
 
118
  Where `~/.ssh/strava.sh` contains your Strava credentials:
 
131
  "command": "bash",
132
  "args": [
133
  "-c",
134
+ "source ~/.ssh/strava.sh && uv --directory /Users/yorrickjansen/work/mcp/strava run -m strava_mcp.main"
135
  ]
136
  }
137
  ```
 
202
  - `service.py`: Service layer for business logic
203
  - `server.py`: MCP server implementation
204
  - `tests/`: Unit tests
205
+ - `strava_mcp/main.py`: Main entry point to run the server
206
  - `get_token.py`: Utility script to get a refresh token manually
207
 
208
  ### Running Tests
pyproject.toml CHANGED
@@ -1,9 +1,19 @@
1
  [project]
2
- name = "strava"
3
  version = "0.1.0"
4
- description = "Add your description here"
5
  readme = "README.md"
6
  requires-python = ">=3.13"
 
 
 
 
 
 
 
 
 
 
7
  dependencies = [
8
  "fastapi>=0.115.11",
9
  "httpx>=0.28.1",
@@ -32,6 +42,15 @@ build-backend = "hatchling.build"
32
  [tool.hatch.build.targets.wheel]
33
  packages = ["strava_mcp"]
34
 
 
 
 
 
 
 
 
 
 
35
  [tool.ruff]
36
  line-length = 120
37
  target-version = "py313"
 
1
  [project]
2
+ name = "strava-mcp"
3
  version = "0.1.0"
4
+ description = "Strava integration for MCP"
5
  readme = "README.md"
6
  requires-python = ">=3.13"
7
+ authors = [
8
+ {name = "Yorrick Jansen"}
9
+ ]
10
+ license = {text = "MIT"}
11
+ keywords = ["strava", "api", "mcp"]
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "License :: OSI Approved :: MIT License",
15
+ "Operating System :: OS Independent",
16
+ ]
17
  dependencies = [
18
  "fastapi>=0.115.11",
19
  "httpx>=0.28.1",
 
42
  [tool.hatch.build.targets.wheel]
43
  packages = ["strava_mcp"]
44
 
45
+ [project.scripts]
46
+ strava-mcp = "strava_mcp:main"
47
+
48
+ [[tool.uv.index]]
49
+ name = "testpypi"
50
+ url = "https://test.pypi.org/simple/"
51
+ publish-url = "https://test.pypi.org/legacy/"
52
+ explicit = true
53
+
54
  [tool.ruff]
55
  line-length = 120
56
  target-version = "py313"
main.py β†’ strava_mcp/main.py RENAMED
File without changes
uv.lock CHANGED
@@ -899,7 +899,7 @@ wheels = [
899
  ]
900
 
901
  [[package]]
902
- name = "strava"
903
  version = "0.1.0"
904
  source = { editable = "." }
905
  dependencies = [
 
899
  ]
900
 
901
  [[package]]
902
+ name = "strava-mcp"
903
  version = "0.1.0"
904
  source = { editable = "." }
905
  dependencies = [