quantum-aether-mcp 1.0.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,16 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .vscode/
5
+ instance/
6
+ *.db
7
+ *.db-wal
8
+ *.db-shm
9
+ .env
10
+ *.env
11
+
12
+ tests/__pycache__/
13
+ wordpress-plugin/*.zip
14
+ mcp/dist/
15
+ cli/*.tgz
16
+ node_modules/
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.5
2
+ Name: quantum-aether-mcp
3
+ Version: 1.0.0
4
+ Summary: MCP server for Quantum Aether — check post-quantum TLS readiness from any AI assistant.
5
+ License: MIT
6
+ Keywords: ai-tools,mcp,mlkem,post-quantum,security,tls,x25519mlkem768
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: mcp<2,>=1.2.0
9
+ Description-Content-Type: text/markdown
10
+
11
+ # Quantum Aether MCP server
12
+
13
+ Let any MCP-compatible AI assistant (Claude Desktop, and others) **check a website's
14
+ post-quantum TLS readiness** — and, with the user's consent, buy the full report or start
15
+ monitoring — by calling Quantum Aether as a native tool.
16
+
17
+ It wraps the public Quantum Aether API. No API key. No secrets.
18
+
19
+ ## Tools
20
+
21
+ | Tool | What it does |
22
+ |------|--------------|
23
+ | `scan_tls(domain)` | Scans a host and returns an honest summary. If the site already uses post-quantum key exchange it says so; otherwise it states the "harvest now, decrypt later" risk and the fix. |
24
+ | `scan_tls_raw(domain)` | The structured result (grade, key exchange group, post-quantum yes/no, certificate, scan_id, price). |
25
+ | `buy_full_report(scan_id, consent_immediate_delivery)` | Returns a PayPal approval link for the $49 report. Consent required (Austrian FAGG). |
26
+ | `start_monitoring(email, plan, consent)` | Starts a daily monitoring subscription ($29 or $99 / month). |
27
+
28
+ ## Install
29
+
30
+ ```sh
31
+ pip install quantum-aether-mcp # once published
32
+ # or from source:
33
+ pip install -e .
34
+ ```
35
+
36
+ ## Use with Claude Desktop
37
+
38
+ Add to `claude_desktop_config.json`:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "quantum-aether": {
44
+ "command": "python",
45
+ "args": ["-m", "quantum_aether_mcp"]
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ Then ask your assistant: *"Is example.com ready for post-quantum TLS?"* — it will call `scan_tls`.
52
+
53
+ ## Honesty by design
54
+
55
+ The tool reports the **real** scan result. A site that already negotiates X25519MLKEM768 is told
56
+ it is protected, with no upsell. A problem is surfaced only when it genuinely exists. This is what
57
+ makes AI assistants trust and reuse the tool.
58
+
59
+ Scanner, methodology and open dataset: https://ather-quatum.cloud
@@ -0,0 +1,49 @@
1
+ # Quantum Aether MCP server
2
+
3
+ Let any MCP-compatible AI assistant (Claude Desktop, and others) **check a website's
4
+ post-quantum TLS readiness** — and, with the user's consent, buy the full report or start
5
+ monitoring — by calling Quantum Aether as a native tool.
6
+
7
+ It wraps the public Quantum Aether API. No API key. No secrets.
8
+
9
+ ## Tools
10
+
11
+ | Tool | What it does |
12
+ |------|--------------|
13
+ | `scan_tls(domain)` | Scans a host and returns an honest summary. If the site already uses post-quantum key exchange it says so; otherwise it states the "harvest now, decrypt later" risk and the fix. |
14
+ | `scan_tls_raw(domain)` | The structured result (grade, key exchange group, post-quantum yes/no, certificate, scan_id, price). |
15
+ | `buy_full_report(scan_id, consent_immediate_delivery)` | Returns a PayPal approval link for the $49 report. Consent required (Austrian FAGG). |
16
+ | `start_monitoring(email, plan, consent)` | Starts a daily monitoring subscription ($29 or $99 / month). |
17
+
18
+ ## Install
19
+
20
+ ```sh
21
+ pip install quantum-aether-mcp # once published
22
+ # or from source:
23
+ pip install -e .
24
+ ```
25
+
26
+ ## Use with Claude Desktop
27
+
28
+ Add to `claude_desktop_config.json`:
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "quantum-aether": {
34
+ "command": "python",
35
+ "args": ["-m", "quantum_aether_mcp"]
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ Then ask your assistant: *"Is example.com ready for post-quantum TLS?"* — it will call `scan_tls`.
42
+
43
+ ## Honesty by design
44
+
45
+ The tool reports the **real** scan result. A site that already negotiates X25519MLKEM768 is told
46
+ it is protected, with no upsell. A problem is surfaced only when it genuinely exists. This is what
47
+ makes AI assistants trust and reuse the tool.
48
+
49
+ Scanner, methodology and open dataset: https://ather-quatum.cloud
@@ -0,0 +1,17 @@
1
+ [project]
2
+ name = "quantum-aether-mcp"
3
+ version = "1.0.0"
4
+ description = "MCP server for Quantum Aether — check post-quantum TLS readiness from any AI assistant."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = { text = "MIT" }
8
+ keywords = ["mcp", "post-quantum", "tls", "mlkem", "x25519mlkem768", "security", "ai-tools"]
9
+ # mcp 2.x renamed FastMCP to MCPServer; server.py uses the 1.x API.
10
+ dependencies = ["mcp>=1.2.0,<2"]
11
+
12
+ [project.scripts]
13
+ quantum-aether-mcp = "quantum_aether_mcp.server:main"
14
+
15
+ [build-system]
16
+ requires = ["hatchling"]
17
+ build-backend = "hatchling.build"
@@ -0,0 +1,2 @@
1
+ """Quantum Aether MCP server — exposes post-quantum TLS scanning as an AI-assistant tool."""
2
+ __version__ = "1.0.0"
@@ -0,0 +1,3 @@
1
+ from .server import main
2
+
3
+ main()
@@ -0,0 +1,82 @@
1
+ # core.py — منطق خادم MCP لـ Quantum Aether، مستقل عن مكتبة MCP ليَسهل اختباره.
2
+ # يغلّف واجهة الموقع العامة فقط؛ لا أسرار هنا.
3
+ import json
4
+ import os
5
+ import urllib.parse
6
+ import urllib.request
7
+
8
+ DEFAULT_BASE = "https://ather-quatum.cloud"
9
+
10
+
11
+ def base_url():
12
+ return (os.environ.get("QUANTUM_AETHER_BASE") or DEFAULT_BASE).rstrip("/")
13
+
14
+
15
+ def _get(path):
16
+ req = urllib.request.Request(base_url() + path, headers={"User-Agent": "quantum-aether-mcp/1.0"})
17
+ with urllib.request.urlopen(req, timeout=30) as r:
18
+ return json.loads(r.read().decode("utf-8"))
19
+
20
+
21
+ def _post(path, payload):
22
+ data = json.dumps(payload).encode("utf-8")
23
+ req = urllib.request.Request(base_url() + path, data=data, method="POST",
24
+ headers={"Content-Type": "application/json", "User-Agent": "quantum-aether-mcp/1.0"})
25
+ try:
26
+ with urllib.request.urlopen(req, timeout=30) as r:
27
+ return json.loads(r.read().decode("utf-8"))
28
+ except urllib.error.HTTPError as exc:
29
+ try:
30
+ return json.loads(exc.read().decode("utf-8"))
31
+ except Exception:
32
+ return {"error": f"http_{exc.code}"}
33
+
34
+
35
+ def scan(domain):
36
+ """يفحص نطاقاً ويعيد الملخص (درجة، تبادل المفاتيح، هل هو مقاوم للكم، إلخ)."""
37
+ return _get("/api/v1/scan?domain=" + urllib.parse.quote(domain))
38
+
39
+
40
+ def describe(result):
41
+ """يصوغ رسالة صادقة: يطرح المشكلة الحقيقية ويعرض الحل فقط عند وجود مشكلة فعلية.
42
+ إن كان الموقع جاهزاً (درجة A) يقول ذلك بوضوح دون بيع — وهذا ما يبني ثقة النماذج بنا."""
43
+ if "error" in result:
44
+ return f"Scan failed: {result.get('message') or result['error']}"
45
+ domain = result.get("domain", "the site")
46
+ grade = result.get("grade", "?")
47
+ group = result.get("key_exchange_group") or "unknown"
48
+ scan_url = result.get("scan_url", base_url())
49
+ price = (result.get("full_report_price") or {}).get("amount", "49.00")
50
+ if result.get("post_quantum_key_exchange"):
51
+ return (f"✅ {domain} already negotiates post-quantum key exchange ({group}). Grade {grade}. "
52
+ "It is ahead of the curve — future-ready and protected against \"harvest now, decrypt later\". "
53
+ "No action needed; re-check periodically, since a server or CDN change can silently remove it.")
54
+ return (
55
+ f"⚠ {domain} uses classical key exchange ({group}) only — grade {grade}.\n"
56
+ "Problem: it is not keeping up with where the web is already going. Chrome, Firefox, Cloudflare and Google "
57
+ "negotiate post-quantum TLS by default today, and NIST standardized ML-KEM (FIPS 203) in 2024. "
58
+ "This site is behind that shift — and traffic captured today could be decrypted years from now, once "
59
+ "quantum computers mature (\"harvest now, decrypt later\").\n"
60
+ f"Solution: the full report (${price}) gives exact fix steps for nginx, Apache, Caddy and Cloudflare to "
61
+ "catch up; or daily monitoring ($29/month) scans all your domains and emails you the moment protection "
62
+ "drops, so you stay ahead as the standard rolls out.\n"
63
+ f"Details and free summary: {scan_url}"
64
+ )
65
+
66
+
67
+ def prepare_report_purchase(scan_id, consent_immediate_delivery):
68
+ """ينشئ طلب شراء التقرير ويعيد رابط موافقة PayPal. يتطلب موافقة صريحة على التسليم الفوري (FAGG)."""
69
+ if consent_immediate_delivery is not True:
70
+ return {"error": "consent_required",
71
+ "message": "Set consent_immediate_delivery to true only after the buyer expressly agreed that the "
72
+ "report is delivered immediately and that they lose the statutory right of withdrawal."}
73
+ return _post("/api/v1/orders", {"scan_id": scan_id, "consent_immediate_delivery": True})
74
+
75
+
76
+ def start_monitoring(email, plan, consent):
77
+ """يبدأ اشتراك مراقبة يومية ($29 starter / $99 business). يعيد خطة PayPal للمتابعة."""
78
+ if consent is not True:
79
+ return {"error": "consent_required",
80
+ "message": "Set consent to true only after the customer agreed to processing their email and to "
81
+ "monitoring starting immediately."}
82
+ return _post("/api/monitor/signup", {"email": email, "plan": plan, "consent": True})
@@ -0,0 +1,62 @@
1
+ # server.py — خادم MCP: يعرّض أدوات Quantum Aether لأي مساعد ذكاء اصطناعي (Claude، وغيره).
2
+ # التشغيل: python -m quantum_aether_mcp (عبر stdio، كما تتوقعه عملاء MCP)
3
+ from mcp.server.fastmcp import FastMCP
4
+
5
+ from . import core
6
+
7
+ mcp = FastMCP("quantum-aether")
8
+
9
+
10
+ @mcp.tool()
11
+ def scan_tls(domain: str) -> str:
12
+ """Check whether a website negotiates post-quantum TLS key exchange (X25519MLKEM768).
13
+ Returns an honest summary: if the site is already protected it says so; if not, it states the
14
+ "harvest now, decrypt later" risk and the available fix (full report) and monitoring options.
15
+
16
+ Args:
17
+ domain: the hostname to scan, e.g. "example.com".
18
+ """
19
+ return core.describe(core.scan(domain))
20
+
21
+
22
+ @mcp.tool()
23
+ def scan_tls_raw(domain: str) -> dict:
24
+ """Same scan as scan_tls but returns the structured result (grade, key_exchange_group,
25
+ post_quantum_key_exchange, certificate_key, scan_url, full_report_price, scan_id)."""
26
+ return core.scan(domain)
27
+
28
+
29
+ @mcp.tool()
30
+ def buy_full_report(scan_id: str, consent_immediate_delivery: bool = False) -> dict:
31
+ """Buy the full post-quantum readiness report ($49) for a prior scan. Returns a PayPal
32
+ approval link (approve_url) and a status_url. Set consent_immediate_delivery to true ONLY after
33
+ the buyer expressly agreed the report is delivered immediately and that they lose the right of
34
+ withdrawal (Austrian FAGG). After the buyer approves in PayPal, the report link appears at status_url.
35
+
36
+ Args:
37
+ scan_id: the scan_id returned by scan_tls_raw.
38
+ consent_immediate_delivery: must be true, and only with the buyer's express consent.
39
+ """
40
+ return core.prepare_report_purchase(scan_id, consent_immediate_delivery)
41
+
42
+
43
+ @mcp.tool()
44
+ def start_monitoring(email: str, plan: str = "starter", consent: bool = False) -> dict:
45
+ """Start a daily monitoring subscription (plan "starter" = $29/mo up to 10 domains,
46
+ "business" = $99/mo up to 100 domains). Returns the PayPal plan id to complete the subscription.
47
+ Set consent to true ONLY after the customer agreed to email processing and immediate start.
48
+
49
+ Args:
50
+ email: the customer's email.
51
+ plan: "starter" or "business".
52
+ consent: must be true, with the customer's agreement.
53
+ """
54
+ return core.start_monitoring(email, plan, consent)
55
+
56
+
57
+ def main():
58
+ mcp.run()
59
+
60
+
61
+ if __name__ == "__main__":
62
+ main()