sitebay-mcp 0.1.1751179164__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.
@@ -0,0 +1,3 @@
1
+ [flake8]
2
+ max-line-length = 120
3
+ ignore = E203, E111, E117, E261, E225, F841, F811, F824, F821
@@ -0,0 +1,39 @@
1
+ name: Python Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ # Checkout the repository
15
+ - uses: actions/checkout@v4
16
+
17
+ # Set up Python environment
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v4
20
+ with:
21
+ python-version: '3.12'
22
+
23
+ # Install uv
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v4
26
+
27
+ # Set up Python environment with uv
28
+ - name: Set up Python
29
+ run: uv python install
30
+
31
+ # Sync dependencies with uv
32
+ - name: Install dependencies
33
+ run: uv sync --all-extras --dev
34
+
35
+ # Run tests
36
+ - name: Run tests
37
+ run: uv run pytest tests/unit
38
+ env:
39
+ PYTHONPATH: ${{ github.workspace }}
@@ -0,0 +1,52 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ release:
7
+ types: [ published ]
8
+
9
+ permissions:
10
+ contents: read
11
+ id-token: write
12
+
13
+ jobs:
14
+ build-and-publish:
15
+ runs-on: ubuntu-latest
16
+ environment:
17
+ name: pypi
18
+ url: https://pypi.org/project/sitebay-mcp/
19
+
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Python 3.11
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.11"
28
+
29
+ - name: Install build tools
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install build wheel twine setuptools
33
+
34
+ - name: Bump version automatically
35
+ run: |
36
+ NEW_VERSION=$(python -c "import time; print('0.1.' + str(int(time.time())))")
37
+ echo "Updating version to $NEW_VERSION"
38
+ sed -i "s/^version = .*/version = \"$NEW_VERSION\"/" pyproject.toml
39
+
40
+ - name: Build package artifacts
41
+ run: python -m build
42
+
43
+ - name: Validate package structure
44
+ run: twine check dist/*
45
+
46
+ - name: Publish to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
48
+ with:
49
+ repository-url: https://upload.pypi.org/legacy/
50
+ password: ${{ secrets.PYPI_API_TOKEN }}
51
+ attestations: false
52
+ twine-args: --verbose
@@ -0,0 +1,174 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # PyPI configuration file
171
+ .pypirc
172
+
173
+ *.bak
174
+ *.swp
@@ -0,0 +1,8 @@
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+ COPY . /app
6
+ RUN pip install --no-cache-dir .
7
+
8
+ CMD ["sitebay-mcp"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 mhand
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.
@@ -0,0 +1,271 @@
1
+ Metadata-Version: 2.4
2
+ Name: sitebay-mcp
3
+ Version: 0.1.1751179164
4
+ Summary: SiteBay MCP Server - WordPress hosting management through Claude Code
5
+ Author-email: SiteBay <support@sitebay.org>
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: fastmcp>=2.9.2
9
+ Requires-Dist: httpx>=0.27.0
10
+ Requires-Dist: pydantic>=2.0.0
11
+ Requires-Dist: python-dotenv>=1.0.0
12
+ Requires-Dist: typing-extensions>=4.0.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: black>=23.0.0; extra == 'dev'
15
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
16
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
17
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # SiteBay MCP Server
21
+ [![smithery badge](https://smithery.ai/badge/@sitebay/sitebay-mcp)](https://smithery.ai/server/@sitebay/sitebay-mcp)
22
+
23
+ A Model Context Protocol (MCP) server that provides Claude Code users with direct access to the SiteBay WordPress hosting platform. Manage your hosted WordPress sites, execute server commands, handle staging environments, and more through natural language interactions with the SiteBay cloud infrastructure.
24
+
25
+ ## Features
26
+
27
+ ### 🌐 Site Management
28
+ - List all your hosted WordPress sites
29
+ - Get detailed site information (status, region, PHP version, etc.)
30
+ - Create new WordPress sites using SiteBay's templates
31
+ - Update site configurations (PHP version, admin credentials, etc.)
32
+ - Delete sites with safety confirmations
33
+
34
+ ### ⚡ Site Operations
35
+ - Execute shell commands and WP-CLI commands on SiteBay servers
36
+ - Edit files in wp-content directory on your hosted sites
37
+ - View site events and deployment logs from SiteBay infrastructure
38
+ - Manage external path configurations for URL proxying through SiteBay
39
+
40
+ ### 🛠 Advanced Features
41
+ - Staging site management on SiteBay infrastructure (coming soon)
42
+ - Point-in-time backup restores from SiteBay's backup system (coming soon)
43
+ - Team management for collaborative hosting (coming soon)
44
+ - WordPress/Shopify/PostHog API proxy services through SiteBay (coming soon)
45
+
46
+ ### 🗺 Helper Tools
47
+ - List available SiteBay hosting regions
48
+ - Browse SiteBay's WordPress templates
49
+ - Account and billing information (coming soon)
50
+
51
+ ## Installation
52
+
53
+ ### Installing via Smithery
54
+
55
+ To install SiteBay MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@sitebay/sitebay-mcp):
56
+
57
+ ```bash
58
+ npx -y @smithery/cli install @sitebay/sitebay-mcp --client claude
59
+ ```
60
+
61
+ ### Using uvx (Recommended)
62
+
63
+ ```bash
64
+ # Install and run directly with uvx
65
+ uvx sitebay-mcp
66
+
67
+ # Or install for repeated use
68
+ uv tool install sitebay-mcp
69
+ sitebay-mcp
70
+ ```
71
+
72
+ ### Using pip
73
+
74
+ ```bash
75
+ # Install from PyPI (when published)
76
+ pip install sitebay-mcp
77
+
78
+ # Or install from source
79
+ git clone https://github.com/your-username/sitebay-mcp.git
80
+ cd sitebay-mcp
81
+ pip install -e .
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ ### 1. Get Your SiteBay API Token
87
+
88
+ 1. Log in to your [SiteBay account](https://my.sitebay.org)
89
+ 2. Navigate to Settings in your account dashboard
90
+ 3. Generate a new API token
91
+ 4. Copy the token for use in configuration
92
+
93
+ ### 2. Configure Claude Desktop
94
+
95
+ Add the following to your Claude Desktop configuration file:
96
+
97
+ #### For uvx installation:
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "sitebay": {
102
+ "command": "uvx",
103
+ "args": ["sitebay-mcp"],
104
+ "env": {
105
+ "SITEBAY_API_TOKEN": "your_api_token_here"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ #### For pip installation:
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "sitebay": {
117
+ "command": "python",
118
+ "args": ["-m", "sitebay_mcp.server"],
119
+ "env": {
120
+ "SITEBAY_API_TOKEN": "your_api_token_here"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### 3. Claude Desktop Configuration File Locations
128
+
129
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
130
+ - **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`
131
+ - **Linux**: `~/.config/claude/claude_desktop_config.json`
132
+
133
+ ## Usage Examples
134
+
135
+ ### Creating a New WordPress Site
136
+
137
+ ```
138
+ Claude: Create a new WordPress site called "myblog.example.com" with the title "My Amazing Blog", admin username "admin", password "SecurePass123!", and email "me@example.com"
139
+ ```
140
+
141
+ ### Managing Existing Sites
142
+
143
+ ```
144
+ Claude: List all my WordPress sites and show their current status
145
+
146
+ Claude: Get detailed information about myblog.example.com
147
+
148
+ Claude: Update the PHP version for myblog.example.com to 8.2
149
+ ```
150
+
151
+ ### Executing Commands
152
+
153
+ ```
154
+ Claude: Run "wp plugin list" on myblog.example.com to see what plugins are installed on the SiteBay server
155
+
156
+ Claude: Execute "wp search-replace 'http://old-domain.com' 'https://new-domain.com'" on myblog.example.com through SiteBay
157
+
158
+ Claude: Check the disk usage on myblog.example.com with "df -h" on the SiteBay server
159
+ ```
160
+
161
+ ### File Management
162
+
163
+ ```
164
+ Claude: Edit the style.css file in my active theme on myblog.example.com hosted on SiteBay
165
+
166
+ Claude: Show me recent events and deployment logs for myblog.example.com from SiteBay
167
+ ```
168
+
169
+ ### External Paths (URL Proxying)
170
+
171
+ ```
172
+ Claude: Create an external path "/api" on myblog.example.com that proxies to "https://my-external-api.com" through SiteBay
173
+
174
+ Claude: List all external path configurations for myblog.example.com on SiteBay
175
+ ```
176
+
177
+ ### Getting Information
178
+
179
+ ```
180
+ Claude: Show me all available SiteBay hosting regions
181
+
182
+ Claude: List all the WordPress templates available on SiteBay for new sites
183
+ ```
184
+
185
+ ## Available Tools
186
+
187
+ ### Site Management
188
+ - `sitebay_list_sites` - List all WordPress sites hosted on SiteBay
189
+ - `sitebay_get_site` - Get detailed information about a hosted site
190
+ - `sitebay_create_site` - Create a new WordPress site on SiteBay infrastructure
191
+ - `sitebay_update_site` - Update site configuration on SiteBay servers
192
+ - `sitebay_delete_site` - Delete a hosted site (with confirmation)
193
+
194
+ ### Site Operations
195
+ - `sitebay_site_shell_command` - Execute shell/WP-CLI commands on SiteBay servers
196
+ - `sitebay_site_edit_file` - Edit files in wp-content on SiteBay-hosted sites
197
+ - `sitebay_site_get_events` - View site events and deployment logs from SiteBay
198
+ - `sitebay_site_external_path_list` - List external path configs on SiteBay
199
+ - `sitebay_site_external_path_create` - Create external path through SiteBay proxy
200
+
201
+ ### Helper Tools
202
+ - `sitebay_list_regions` - List available SiteBay hosting regions
203
+ - `sitebay_list_templates` - List WordPress templates available on SiteBay
204
+
205
+ ## Security Notes
206
+
207
+ - Your SiteBay API token is stored securely in environment variables
208
+ - All communications with SiteBay infrastructure use HTTPS encryption
209
+ - API tokens can be revoked at any time from your SiteBay account dashboard
210
+ - The MCP server runs locally and only proxies requests to SiteBay - no data is stored locally
211
+
212
+ ## Error Handling
213
+
214
+ The server provides clear error messages for common issues:
215
+
216
+ - **Authentication errors**: Invalid or expired API tokens
217
+ - **Site not found**: When referencing non-existent sites
218
+ - **Validation errors**: Invalid parameters or missing required fields
219
+ - **Network errors**: Connection issues with SiteBay API
220
+
221
+ ## Troubleshooting
222
+
223
+ ### Authentication Issues
224
+
225
+ 1. Verify your API token is correct
226
+ 2. Check that the token is properly set in the environment variable
227
+ 3. Ensure the token hasn't expired
228
+ 4. Try regenerating the token from your SiteBay account
229
+
230
+ ### Connection Issues
231
+
232
+ 1. Check your internet connection
233
+ 2. Verify SiteBay service status
234
+ 3. Check firewall settings
235
+ 4. Try restarting Claude Desktop
236
+
237
+ ### Tool Not Found
238
+
239
+ 1. Restart Claude Desktop after configuration changes
240
+ 2. Verify the configuration file is in the correct location
241
+ 3. Check the JSON syntax is valid
242
+ 4. Ensure uvx or Python is properly installed
243
+
244
+ ## Contributing
245
+
246
+ 1. Fork the repository
247
+ 2. Create a feature branch
248
+ 3. Make your changes
249
+ 4. Add tests for new functionality
250
+ 5. Ensure all tests pass and code is properly formatted
251
+ 6. Submit a pull request
252
+
253
+ ## License
254
+
255
+ This project is licensed under the MIT License - see the LICENSE file for details.
256
+
257
+ ## Support
258
+
259
+ - **Issues**: GitHub Issues
260
+ - **Documentation**: [SiteBay API Docs](https://my.sitebay.org/f/api/v1/docs)
261
+ - **SiteBay Support**: [SiteBay Help Center](https://sitebay.org/support)
262
+
263
+ ## Changelog
264
+
265
+ ### v0.1.0 (2024-01-XX)
266
+ - Initial release
267
+ - Site management tools
268
+ - Shell command execution
269
+ - File editing capabilities
270
+ - External path management
271
+ - Region and template listing