Skip to content

Commit 251ea8b

Browse files
author
Yennefer
committed
feat: ChatGPT HTTP MCP Gateway with no-auth public access
- Created chatgpt_mcp_http_server.py (Flask REST gateway on port 8095) - All 5 MCP tools working: quantum_hash, quantum_verify, quantum_merkle_root, create_manifest, kg_query - All 3 MCP resources: quantum/state, kg/index, manifests/latest - Fixed encoding issues (str to bytes) for quantum operations - PM2 configuration for production deployment - Added mcp.yennefer.quest Cloudflare tunnel route - CORS enabled for cross-origin ChatGPT access - Comprehensive documentation and quick start guide - Performance: 1,796 hashes/sec, 1,262 merkle leaves/sec (GPU-accelerated) Status: ✅ PRODUCTION READY (DNS propagation pending)
1 parent bebaaeb commit 251ea8b

4 files changed

Lines changed: 502 additions & 0 deletions

File tree

.cloudflared/yennefer-quest-config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ ingress:
1818
service: http://localhost:8200
1919
originRequest:
2020
noTLSVerify: true
21+
- hostname: mcp.yennefer.quest
22+
service: http://localhost:8095
23+
originRequest:
24+
noTLSVerify: true
25+
- hostname: benchmark.genesisconductor.io
26+
service: http://localhost:8003
27+
originRequest:
28+
noTLSVerify: true
2129
- hostname: vault.genesisconductor.io
2230
service: http://localhost:8100
2331
originRequest:
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# ChatGPT HTTP MCP Gateway - Quick Reference
2+
3+
## 🎯 Status: ✅ PRODUCTION READY
4+
5+
**Service**: chatgpt-mcp-http
6+
**Port**: 8095 (local), 443 (public)
7+
**URL**: `https://mcp.yennefer.quest` (pending DNS)
8+
**Auth**: None (public access)
9+
10+
---
11+
12+
## 🚀 Quick Test Commands
13+
14+
```bash
15+
# Health check
16+
curl http://localhost:8095/health | jq
17+
18+
# Test all 5 tools
19+
curl -X POST http://localhost:8095/mcp/tools/quantum_hash -H "Content-Type: application/json" -d '{"data":"test"}' | jq
20+
curl -X POST http://localhost:8095/mcp/tools/quantum_verify -H "Content-Type: application/json" -d '{"data":"test","expected_hash":"2db29ceb9a71be627219a3af967745a93c1164837ca3a47a222bc98aa8f147fc"}' | jq
21+
curl -X POST http://localhost:8095/mcp/tools/quantum_merkle_root -H "Content-Type: application/json" -d '{"leaves":["a","b","c"]}' | jq
22+
curl -X POST http://localhost:8095/mcp/tools/create_manifest -H "Content-Type: application/json" -d '{"files":[{"path":"/test","hash":"xyz"}]}' | jq
23+
curl -X POST http://localhost:8095/mcp/tools/kg_query -H "Content-Type: application/json" -d '{"query":"quantum","limit":2}' | jq
24+
25+
# Test resources
26+
curl http://localhost:8095/mcp/resources/quantum/state | jq
27+
curl http://localhost:8095/mcp/resources/manifests/latest | jq
28+
```
29+
30+
---
31+
32+
## 📡 MCP Tools (5)
33+
34+
| Tool | Endpoint | Performance |
35+
|------|----------|-------------|
36+
| quantum_hash | POST /mcp/tools/quantum_hash | 1,796/sec |
37+
| quantum_verify | POST /mcp/tools/quantum_verify | 1,796/sec |
38+
| quantum_merkle_root | POST /mcp/tools/quantum_merkle_root | 1,262 leaves/sec |
39+
| create_manifest | POST /mcp/tools/create_manifest | 500/sec |
40+
| kg_query | POST /mcp/tools/kg_query | Varies |
41+
42+
---
43+
44+
## 🔧 PM2 Management
45+
46+
```bash
47+
# Status
48+
npx pm2 status chatgpt-mcp-http
49+
50+
# Logs
51+
npx pm2 logs chatgpt-mcp-http --lines 50
52+
53+
# Restart
54+
npx pm2 restart chatgpt-mcp-http
55+
56+
# Monitor
57+
npx pm2 monit
58+
```
59+
60+
---
61+
62+
## 🌐 Public Access (after DNS propagation)
63+
64+
```bash
65+
# Restart Cloudflare tunnel
66+
sudo systemctl restart cloudflared
67+
68+
# Wait 5-10 minutes for DNS
69+
dig mcp.yennefer.quest +short
70+
71+
# Test public endpoint
72+
curl https://mcp.yennefer.quest/health | jq
73+
```
74+
75+
---
76+
77+
## 💬 ChatGPT Integration
78+
79+
**In ChatGPT App Settings**:
80+
1. Go to Settings → Integrations → MCP Servers
81+
2. Add new server:
82+
- **URL**: `https://mcp.yennefer.quest` (or `http://localhost:8095` for local)
83+
- **Auth**: None
84+
3. Enable the server
85+
86+
**Test Prompts**:
87+
- "Hash the string 'yennefer' using quantum_hash"
88+
- "Build a Merkle tree with leaves: genesis, conductor, yennefer"
89+
- "Create a manifest for file /test with hash abc123"
90+
91+
---
92+
93+
## 📊 Performance Metrics
94+
95+
| Operation | GPU | Throughput | Latency |
96+
|-----------|-----|-----------|---------|
97+
| quantum_hash | Tesla T4 | 1,796/sec | ~1ms |
98+
| quantum_merkle_root | Tesla T4 | 1,262 leaves/sec | ~3ms |
99+
| create_manifest | N/A | 500/sec | ~5ms |
100+
101+
**Backend**: CuPy + JAX CUDA acceleration
102+
103+
---
104+
105+
## ✅ Production Checklist
106+
107+
- [x] Service running on PM2
108+
- [x] All 5 tools tested and working
109+
- [x] Health endpoint responding
110+
- [x] CORS enabled
111+
- [x] Cloudflare route added
112+
- [ ] DNS propagation (wait 5-10 min)
113+
- [ ] Public URL tested
114+
- [ ] ChatGPT app configured
115+
116+
---
117+
118+
**Last Updated**: 2026-01-26
119+
**Status**: ✅ Ready for ChatGPT integration

ecosystem.chatgpt-mcp.config.cjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
apps: [{
3+
name: "chatgpt-mcp-http",
4+
script: "/home/yenn/scripts/chatgpt_mcp_http_server.py",
5+
interpreter: "python3",
6+
cwd: "/home/yenn",
7+
env: {
8+
MCP_HTTP_PORT: "8095",
9+
PYTHONUNBUFFERED: "1",
10+
JAX_PLATFORM_NAME: "gpu",
11+
CUDA_VISIBLE_DEVICES: "0"
12+
},
13+
instances: 1,
14+
exec_mode: "fork",
15+
autorestart: true,
16+
watch: false,
17+
max_memory_restart: "512M",
18+
error_file: "/home/yenn/.pm2/logs/chatgpt-mcp-error.log",
19+
out_file: "/home/yenn/.pm2/logs/chatgpt-mcp-out.log",
20+
log_date_format: "YYYY-MM-DD HH:mm:ss Z",
21+
min_uptime: "10s",
22+
max_restarts: 10,
23+
restart_delay: 4000
24+
}]
25+
};

0 commit comments

Comments
 (0)