qeda-mcp 0.1.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.
@@ -0,0 +1,6 @@
1
+ .venv
2
+ .git
3
+ __pycache__
4
+ *.pyc
5
+ tests
6
+ .pytest_cache
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,2 @@
1
+ # Tout le repo : imaddevinci et themango314.
2
+ * @imaddevinci @themango314
@@ -0,0 +1,13 @@
1
+ name: CI
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches: [main]
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: astral-sh/setup-uv@v6
12
+ - run: uv sync --locked
13
+ - run: uv run pytest -q
@@ -0,0 +1,71 @@
1
+ # Publishes to PyPI when a GitHub release is published (tag vX.Y.Z = version in pyproject.toml).
2
+ # Trusted Publishing: PyPI trusts this workflow through OIDC and hands it a token valid
3
+ # 15 minutes. No PyPI token is stored in GitHub or on anyone's machine.
4
+ name: Publish to PyPI
5
+ on:
6
+ release:
7
+ types: [published]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: astral-sh/setup-uv@v6
15
+ - run: uv sync --locked
16
+ - run: uv run pytest -q
17
+ - name: The tag must match the version
18
+ run: |
19
+ version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
20
+ test "v${version}" = "${GITHUB_REF_NAME}" || { echo "Tag ${GITHUB_REF_NAME} != v${version}"; exit 1; }
21
+ python3 - "$version" <<'PY'
22
+ import json, sys
23
+ v = sys.argv[1]
24
+ d = json.load(open("server.json"))
25
+ assert d["version"] == v and all(p["version"] == v for p in d["packages"]), "server.json version != pyproject"
26
+ PY
27
+ - run: uv build
28
+ - uses: actions/upload-artifact@v4
29
+ with:
30
+ name: dist
31
+ path: dist/
32
+
33
+ publish:
34
+ needs: build
35
+ runs-on: ubuntu-latest
36
+ environment: pypi
37
+ permissions:
38
+ id-token: write
39
+ steps:
40
+ - uses: actions/download-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: dist/
44
+ - uses: pypa/gh-action-pypi-publish@release/v1
45
+
46
+ # Lists the release in the official MCP Registry (metadata only; the package is on PyPI).
47
+ # The registry checks that the PyPI README contains "mcp-name: io.github.Qeda-io/qeda-mcp".
48
+ registry:
49
+ needs: publish
50
+ runs-on: ubuntu-latest
51
+ permissions:
52
+ id-token: write
53
+ contents: read
54
+ env:
55
+ MCP_PUBLISHER_VERSION: v1.8.1
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ - uses: sigstore/cosign-installer@v3
59
+ - name: Download and verify mcp-publisher
60
+ run: |
61
+ base_url="https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}"
62
+ archive="mcp-publisher_linux_amd64.tar.gz"
63
+ curl --fail --location --silent --show-error --output "$archive" "$base_url/$archive"
64
+ curl --fail --location --silent --show-error --output "$archive.sigstore.json" "$base_url/$archive.sigstore.json"
65
+ cosign verify-blob --bundle "$archive.sigstore.json" --certificate-identity "https://github.com/modelcontextprotocol/registry/.github/workflows/release.yml@refs/tags/${MCP_PUBLISHER_VERSION}" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" "$archive"
66
+ tar xzf "$archive" mcp-publisher
67
+ - run: ./mcp-publisher login github-oidc
68
+ - name: Publish (retries while PyPI propagates the new release)
69
+ run: |
70
+ for i in 1 2 3 4 5; do ./mcp-publisher publish && exit 0; echo "retry in 30 s"; sleep 30; done
71
+ exit 1
@@ -0,0 +1,7 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .pytest_cache/
5
+ dist/
6
+ .env
7
+ .env.*
@@ -0,0 +1,17 @@
1
+ # Hosted MCP server (https://mcp.qeda.io/mcp). See src/qeda_mcp/hosted.py.
2
+ FROM python:3.12-slim
3
+
4
+ COPY --from=ghcr.io/astral-sh/uv:0.13.9 /uv /bin/uv
5
+ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy PYTHONUNBUFFERED=1
6
+
7
+ WORKDIR /app
8
+ COPY pyproject.toml uv.lock README.md ./
9
+ COPY src ./src
10
+ RUN uv sync --frozen --no-dev && useradd --uid 10001 --no-create-home qeda
11
+ USER 10001
12
+
13
+ # QEDA_PUBLIC_URL (required): the endpoint as clients reach it, e.g. https://mcp.qeda.io/mcp
14
+ # QEDA_API_URL / QEDA_AUTH_ISSUER: default https://api.qeda.io
15
+ ENV HOST=0.0.0.0 PORT=8000
16
+ EXPOSE 8000
17
+ CMD ["/app/.venv/bin/qeda-mcp", "--transport", "streamable-http"]
qeda_mcp-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
qeda_mcp-0.1.0/NOTICE ADDED
@@ -0,0 +1,9 @@
1
+ Qeda MCP server
2
+ Copyright 2026 Qeda
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ "Qeda", "Qeda Cloud" and the Qeda logo are trademarks of Qeda. The license
7
+ does not grant permission to use them (see section 6 of the License): a fork
8
+ or derived work must not be named or presented as Qeda's, or as endorsed by
9
+ Qeda, beyond saying factually that it works with Qeda Cloud.
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.5
2
+ Name: qeda-mcp
3
+ Version: 0.1.0
4
+ Summary: Official MCP server for Qeda Cloud: let AI agents deploy, run and manage apps on Qeda.
5
+ Project-URL: Homepage, https://qeda.io
6
+ Project-URL: Repository, https://github.com/Qeda-io/qeda-mcp
7
+ Project-URL: Issues, https://github.com/Qeda-io/qeda-mcp/issues
8
+ Author: Qeda
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Keywords: ai-agents,claude,cursor,deployment,mcp,model-context-protocol,paas,qeda
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Classifier: Topic :: System :: Systems Administration
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: httpx<1,>=0.27
21
+ Requires-Dist: mcp<2,>=1.30
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Qeda MCP
25
+
26
+ <!-- mcp-name: io.github.Qeda-io/qeda-mcp -->
27
+
28
+ Official MCP server for Qeda Cloud. Let AI agents like Claude Code and Cursor deploy apps from GitHub, read build logs and manage databases on Qeda.
29
+
30
+ > **Status: beta.** Read, deploy, run, domain and template tools. The hosted server with OAuth is built and being rolled out; Mobile Money top-ups come next.
31
+
32
+ ## What an agent can do today
33
+
34
+ | Tool | What it does |
35
+ | --- | --- |
36
+ | `list_projects` | Lists your Qeda projects: id, your role, running and stopped services. |
37
+ | `get_deployment` | Status, URL, commit, build time and cluster health of a deployment (latest one by default), plus recent deployments. |
38
+ | `get_build_logs` | Status, error message and the last build log lines of a deployment. Pass the returned cursor as `after_id` to follow a build in progress. |
39
+ | `list_github_accounts` | GitHub accounts (personal and organizations) this connection may use, as chosen in Settings → MCP Server. |
40
+ | `list_repos` | Repositories of one account (`account="Qeda-io"`) that Qeda can deploy; `search` looks across up to 150 of them. |
41
+ | `detect_stack` | How Qeda will build a repository: runtime, commands, port, databases and variables it needs, version alerts. Deploys nothing. |
42
+ | `get_wallet` | Balance, daily spending, days left, whether new deploys are blocked, cost of each running project. |
43
+ | `create_project` | Creates an empty project. |
44
+ | `deploy_from_git` | Deploys a GitHub repository into a project (stack detected; build/start/port overridable). Follow it with `get_build_logs`. |
45
+ | `redeploy` | Rebuilds from the latest commit, or rolls back to a given deployment. **Preview first**, acts only with `confirm=true`. |
46
+ | `cancel_deployment` | Cancels a build in progress. **Preview first**, acts only with `confirm=true`. |
47
+ | `get_runtime_logs` | Output of the running app (build left out); `search`, `errors_only`, cursor to follow. |
48
+ | `get_runtime_errors` | The app's errors grouped: each distinct error once, with its count and an example. |
49
+ | `list_env` | Environment variables. Secret values are never shown. |
50
+ | `set_env` | Adds or changes variables, keeps the others. `secret=true` makes them write-only. |
51
+ | `unset_env` | Removes variables. **Preview first**, acts only with `confirm=true`. |
52
+ | `apply_env_changes` | Restarts the service with its variables (or rebuilds). **Preview first**, acts only with `confirm=true`. |
53
+ | `add_database` | Attaches PostgreSQL, MySQL, MongoDB, Redis, RabbitMQ or S3 storage; created on the next redeploy. |
54
+ | `list_deployments` | Deployment history, newest first, with the ids to roll back to. |
55
+ | `get_domains` | The generated address and custom domains, with DNS status and the records still to create. |
56
+ | `add_domain` | Attaches a custom domain and returns the DNS records to create. HTTPS is automatic once verified. |
57
+ | `verify_domain` | Checks a custom domain's DNS again. |
58
+ | `remove_domain` | Detaches a custom domain. **Preview first**, acts only with `confirm=true`. |
59
+ | `set_subdomain` | Renames the generated address; the old one stops working. **Preview first**, acts only with `confirm=true`. |
60
+ | `get_usage` | CPU and memory actually used: live, hourly average and peak (up to 14 days). Not a bill. |
61
+ | `list_templates` | Ready-made apps that deploy without a build. |
62
+ | `deploy_template` | Deploys a template into an empty project, with its databases. |
63
+ | `delete_project` | Deletes a project and its data for good. **Preview first**, acts only with `confirm_name` set to the project's exact name. |
64
+
65
+ Every tool carries MCP annotations (read-only, write, destructive), so clients can ask the user before acting. Deploy tools need a token with write access.
66
+
67
+ Ask your agent: *"Why did my last deploy of qeda-pay fail?"* It finds the project, reads the logs and points to the failing line.
68
+
69
+ ## Use it with Claude Code
70
+
71
+ 1. In the Qeda dashboard, open **Settings → MCP Server**, create a connection and choose its rights and GitHub repositories. Copy the token: it is shown once.
72
+ 2. Install [uv](https://docs.astral.sh/uv/).
73
+ 3. Add the server:
74
+
75
+ ```sh
76
+ claude mcp add qeda -e QEDA_API_TOKEN=qeda_... -- uvx qeda-mcp
77
+ ```
78
+
79
+ Other MCP clients (Cursor, Claude Desktop, VS Code…) take the same command in their JSON config:
80
+
81
+ ```json
82
+ {
83
+ "mcpServers": {
84
+ "qeda": {
85
+ "command": "uvx",
86
+ "args": ["qeda-mcp"],
87
+ "env": { "QEDA_API_TOKEN": "qeda_..." }
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ `uvx` downloads the latest release from PyPI the first time. From a clone, use `uv run --directory /path/to/qeda-mcp qeda-mcp` instead.
94
+
95
+ Never commit a file that contains your token.
96
+
97
+ | Variable | Default | Purpose |
98
+ | --- | --- | --- |
99
+ | `QEDA_API_TOKEN` | required | Your `qeda_` API token. |
100
+ | `QEDA_API_URL` | `https://api.qeda.io` | Point to another Qeda environment. |
101
+
102
+ ## How it works
103
+
104
+ The server is only a client of the public Qeda API. It calls the same routes as the dashboard, with your own token, and has no access to the database or the cluster. What a token may call is decided by the API, not by this server.
105
+
106
+ ## Hosted server
107
+
108
+ `qeda-mcp --transport streamable-http` runs the remote server that MCP clients reach at `https://mcp.qeda.io/mcp`. It holds no credential of its own: every request brings its own token, and each tool call uses that token against the Qeda API.
109
+
110
+ - **OAuth.** Clients that support it (Claude, Cursor, ChatGPT…) find Qeda's authorization server through `/.well-known/oauth-protected-resource/mcp`. The person approves the agent in the dashboard, and the client receives a short-lived access token. A request without a valid token gets `401` with a `WWW-Authenticate` header that points to that metadata, as the MCP authorization spec requires.
111
+ - **API tokens.** A client that can only send a fixed header may send `Authorization: Bearer qeda_...`.
112
+ - **Verification.** A token is checked against the Qeda API (`GET /users/me`), and a success is cached for 60 seconds. The API enforces expiry, revocation, scopes, GitHub access and the token's resource on every call.
113
+ - **Scaling.** The server is stateless (no MCP session kept between requests), so any replica can serve any request. `GET /healthz` answers `ok`.
114
+
115
+ | Variable | Default | Purpose |
116
+ | --- | --- | --- |
117
+ | `QEDA_PUBLIC_URL` | required | The endpoint as clients reach it, e.g. `https://mcp.qeda.io/mcp`. It is the OAuth resource identifier and must appear in the backend's `OAUTH_RESOURCES`. |
118
+ | `QEDA_API_URL` | `https://api.qeda.io` | The Qeda API the tools call. |
119
+ | `QEDA_AUTH_ISSUER` | `QEDA_API_URL` | Qeda's OAuth authorization server. |
120
+ | `HOST` / `PORT` | `0.0.0.0` / `8000` | Where to listen. |
121
+
122
+ A `Dockerfile` builds the image (`docker build -t qeda-mcp .`).
123
+
124
+ ## Development
125
+
126
+ ```sh
127
+ uv sync
128
+ uv run pytest
129
+ ```
130
+
131
+ Tests mock the Qeda API: no network, no real token.
132
+
133
+ Releases: bump `version` in `pyproject.toml` and in `server.json` (twice), merge, then publish a GitHub release tagged `vX.Y.Z`. The `Publish to PyPI` workflow tests, builds and publishes it through PyPI Trusted Publishing: no PyPI token is stored anywhere. It then lists the new version in the [official MCP Registry](https://github.com/modelcontextprotocol/registry) as `io.github.Qeda-io/qeda-mcp` (GitHub OIDC, no secret either).
134
+
135
+ ## License and trademarks
136
+
137
+ The code is licensed under the [Apache License 2.0](LICENSE). "Qeda", "Qeda Cloud" and the Qeda logo are trademarks of Qeda: the license does not grant the right to use them (see [NOTICE](NOTICE)). You may say that a fork works with Qeda Cloud, not name it or present it as Qeda's.
138
+
139
+ ---
140
+
141
+ Built by [Qeda](https://qeda.io), the deployment platform you pay for with Mobile Money.
@@ -0,0 +1,118 @@
1
+ # Qeda MCP
2
+
3
+ <!-- mcp-name: io.github.Qeda-io/qeda-mcp -->
4
+
5
+ Official MCP server for Qeda Cloud. Let AI agents like Claude Code and Cursor deploy apps from GitHub, read build logs and manage databases on Qeda.
6
+
7
+ > **Status: beta.** Read, deploy, run, domain and template tools. The hosted server with OAuth is built and being rolled out; Mobile Money top-ups come next.
8
+
9
+ ## What an agent can do today
10
+
11
+ | Tool | What it does |
12
+ | --- | --- |
13
+ | `list_projects` | Lists your Qeda projects: id, your role, running and stopped services. |
14
+ | `get_deployment` | Status, URL, commit, build time and cluster health of a deployment (latest one by default), plus recent deployments. |
15
+ | `get_build_logs` | Status, error message and the last build log lines of a deployment. Pass the returned cursor as `after_id` to follow a build in progress. |
16
+ | `list_github_accounts` | GitHub accounts (personal and organizations) this connection may use, as chosen in Settings → MCP Server. |
17
+ | `list_repos` | Repositories of one account (`account="Qeda-io"`) that Qeda can deploy; `search` looks across up to 150 of them. |
18
+ | `detect_stack` | How Qeda will build a repository: runtime, commands, port, databases and variables it needs, version alerts. Deploys nothing. |
19
+ | `get_wallet` | Balance, daily spending, days left, whether new deploys are blocked, cost of each running project. |
20
+ | `create_project` | Creates an empty project. |
21
+ | `deploy_from_git` | Deploys a GitHub repository into a project (stack detected; build/start/port overridable). Follow it with `get_build_logs`. |
22
+ | `redeploy` | Rebuilds from the latest commit, or rolls back to a given deployment. **Preview first**, acts only with `confirm=true`. |
23
+ | `cancel_deployment` | Cancels a build in progress. **Preview first**, acts only with `confirm=true`. |
24
+ | `get_runtime_logs` | Output of the running app (build left out); `search`, `errors_only`, cursor to follow. |
25
+ | `get_runtime_errors` | The app's errors grouped: each distinct error once, with its count and an example. |
26
+ | `list_env` | Environment variables. Secret values are never shown. |
27
+ | `set_env` | Adds or changes variables, keeps the others. `secret=true` makes them write-only. |
28
+ | `unset_env` | Removes variables. **Preview first**, acts only with `confirm=true`. |
29
+ | `apply_env_changes` | Restarts the service with its variables (or rebuilds). **Preview first**, acts only with `confirm=true`. |
30
+ | `add_database` | Attaches PostgreSQL, MySQL, MongoDB, Redis, RabbitMQ or S3 storage; created on the next redeploy. |
31
+ | `list_deployments` | Deployment history, newest first, with the ids to roll back to. |
32
+ | `get_domains` | The generated address and custom domains, with DNS status and the records still to create. |
33
+ | `add_domain` | Attaches a custom domain and returns the DNS records to create. HTTPS is automatic once verified. |
34
+ | `verify_domain` | Checks a custom domain's DNS again. |
35
+ | `remove_domain` | Detaches a custom domain. **Preview first**, acts only with `confirm=true`. |
36
+ | `set_subdomain` | Renames the generated address; the old one stops working. **Preview first**, acts only with `confirm=true`. |
37
+ | `get_usage` | CPU and memory actually used: live, hourly average and peak (up to 14 days). Not a bill. |
38
+ | `list_templates` | Ready-made apps that deploy without a build. |
39
+ | `deploy_template` | Deploys a template into an empty project, with its databases. |
40
+ | `delete_project` | Deletes a project and its data for good. **Preview first**, acts only with `confirm_name` set to the project's exact name. |
41
+
42
+ Every tool carries MCP annotations (read-only, write, destructive), so clients can ask the user before acting. Deploy tools need a token with write access.
43
+
44
+ Ask your agent: *"Why did my last deploy of qeda-pay fail?"* It finds the project, reads the logs and points to the failing line.
45
+
46
+ ## Use it with Claude Code
47
+
48
+ 1. In the Qeda dashboard, open **Settings → MCP Server**, create a connection and choose its rights and GitHub repositories. Copy the token: it is shown once.
49
+ 2. Install [uv](https://docs.astral.sh/uv/).
50
+ 3. Add the server:
51
+
52
+ ```sh
53
+ claude mcp add qeda -e QEDA_API_TOKEN=qeda_... -- uvx qeda-mcp
54
+ ```
55
+
56
+ Other MCP clients (Cursor, Claude Desktop, VS Code…) take the same command in their JSON config:
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "qeda": {
62
+ "command": "uvx",
63
+ "args": ["qeda-mcp"],
64
+ "env": { "QEDA_API_TOKEN": "qeda_..." }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ `uvx` downloads the latest release from PyPI the first time. From a clone, use `uv run --directory /path/to/qeda-mcp qeda-mcp` instead.
71
+
72
+ Never commit a file that contains your token.
73
+
74
+ | Variable | Default | Purpose |
75
+ | --- | --- | --- |
76
+ | `QEDA_API_TOKEN` | required | Your `qeda_` API token. |
77
+ | `QEDA_API_URL` | `https://api.qeda.io` | Point to another Qeda environment. |
78
+
79
+ ## How it works
80
+
81
+ The server is only a client of the public Qeda API. It calls the same routes as the dashboard, with your own token, and has no access to the database or the cluster. What a token may call is decided by the API, not by this server.
82
+
83
+ ## Hosted server
84
+
85
+ `qeda-mcp --transport streamable-http` runs the remote server that MCP clients reach at `https://mcp.qeda.io/mcp`. It holds no credential of its own: every request brings its own token, and each tool call uses that token against the Qeda API.
86
+
87
+ - **OAuth.** Clients that support it (Claude, Cursor, ChatGPT…) find Qeda's authorization server through `/.well-known/oauth-protected-resource/mcp`. The person approves the agent in the dashboard, and the client receives a short-lived access token. A request without a valid token gets `401` with a `WWW-Authenticate` header that points to that metadata, as the MCP authorization spec requires.
88
+ - **API tokens.** A client that can only send a fixed header may send `Authorization: Bearer qeda_...`.
89
+ - **Verification.** A token is checked against the Qeda API (`GET /users/me`), and a success is cached for 60 seconds. The API enforces expiry, revocation, scopes, GitHub access and the token's resource on every call.
90
+ - **Scaling.** The server is stateless (no MCP session kept between requests), so any replica can serve any request. `GET /healthz` answers `ok`.
91
+
92
+ | Variable | Default | Purpose |
93
+ | --- | --- | --- |
94
+ | `QEDA_PUBLIC_URL` | required | The endpoint as clients reach it, e.g. `https://mcp.qeda.io/mcp`. It is the OAuth resource identifier and must appear in the backend's `OAUTH_RESOURCES`. |
95
+ | `QEDA_API_URL` | `https://api.qeda.io` | The Qeda API the tools call. |
96
+ | `QEDA_AUTH_ISSUER` | `QEDA_API_URL` | Qeda's OAuth authorization server. |
97
+ | `HOST` / `PORT` | `0.0.0.0` / `8000` | Where to listen. |
98
+
99
+ A `Dockerfile` builds the image (`docker build -t qeda-mcp .`).
100
+
101
+ ## Development
102
+
103
+ ```sh
104
+ uv sync
105
+ uv run pytest
106
+ ```
107
+
108
+ Tests mock the Qeda API: no network, no real token.
109
+
110
+ Releases: bump `version` in `pyproject.toml` and in `server.json` (twice), merge, then publish a GitHub release tagged `vX.Y.Z`. The `Publish to PyPI` workflow tests, builds and publishes it through PyPI Trusted Publishing: no PyPI token is stored anywhere. It then lists the new version in the [official MCP Registry](https://github.com/modelcontextprotocol/registry) as `io.github.Qeda-io/qeda-mcp` (GitHub OIDC, no secret either).
111
+
112
+ ## License and trademarks
113
+
114
+ The code is licensed under the [Apache License 2.0](LICENSE). "Qeda", "Qeda Cloud" and the Qeda logo are trademarks of Qeda: the license does not grant the right to use them (see [NOTICE](NOTICE)). You may say that a fork works with Qeda Cloud, not name it or present it as Qeda's.
115
+
116
+ ---
117
+
118
+ Built by [Qeda](https://qeda.io), the deployment platform you pay for with Mobile Money.
@@ -0,0 +1,46 @@
1
+ [project]
2
+ name = "qeda-mcp"
3
+ version = "0.1.0"
4
+ description = "Official MCP server for Qeda Cloud: let AI agents deploy, run and manage apps on Qeda."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE", "NOTICE"]
9
+ authors = [{ name = "Qeda" }]
10
+ keywords = ["mcp", "model-context-protocol", "qeda", "deployment", "paas", "ai-agents", "claude", "cursor"]
11
+ classifiers = [
12
+ "Development Status :: 4 - Beta",
13
+ "Intended Audience :: Developers",
14
+ "Operating System :: OS Independent",
15
+ "Programming Language :: Python :: 3",
16
+ "Topic :: Software Development :: Build Tools",
17
+ "Topic :: System :: Systems Administration",
18
+ ]
19
+ dependencies = [
20
+ "mcp>=1.30,<2",
21
+ "httpx>=0.27,<1",
22
+ ]
23
+
24
+ [project.urls]
25
+ Homepage = "https://qeda.io"
26
+ Repository = "https://github.com/Qeda-io/qeda-mcp"
27
+ Issues = "https://github.com/Qeda-io/qeda-mcp/issues"
28
+
29
+ [project.scripts]
30
+ qeda-mcp = "qeda_mcp.server:main"
31
+
32
+ [dependency-groups]
33
+ dev = [
34
+ "pytest>=8",
35
+ "anyio>=4",
36
+ ]
37
+
38
+ [build-system]
39
+ requires = ["hatchling>=1.27"]
40
+ build-backend = "hatchling.build"
41
+
42
+ [tool.hatch.build.targets.wheel]
43
+ packages = ["src/qeda_mcp"]
44
+
45
+ [tool.pytest.ini_options]
46
+ testpaths = ["tests"]