# GEP MCP Repository - Final Deployment Checklist
**Author**: Gary W. Floyd
**Date**: December 2025
**Paper**: "Entropy-Guided Motor Control for Autonomous Tool Execution"
---
## Pre-Deployment Verification
### ✅ Files Ready to Ship
1. **gep_mcp_control_layer.sql**
- ✅ Creates `gep_mcp_v2` database
- ✅ Enables `pgvector` and `uuid-ossp` extensions
- ✅ Creates `gep` schema with 5-layer architecture
- ✅ Function `gep_route_and_gate(...)` signature matches Python calls
- ✅ Function `log_and_update(...)` signature matches Python calls
- ✅ Creates roles: `nexus_mcp`, `nexus_readonly`
- ✅ Author: Gary W. Floyd (not Gilbertson)
- ✅ Date: December 2025
2. **gep_mcp_motor.py**
- ✅ Author: Gary W. Floyd
- ✅ Date: December 2025
- ✅ `local_exec` uses JSON stdin (not positional args)
- ✅ Calls `gep_route_and_gate()` with 7 params
- ✅ Calls `log_and_update()` with 19 params
- ✅ Proper imports (json, psycopg2, etc.)
3. **README.md**
- ✅ Paper title and author (Gary W. Floyd)
- ✅ Year: 2025
- ✅ Citations to Friston (2010) and Wolpert & Ghahramani (2000)
- ✅ No false claims ("No static permission allowlists" not "No allowlists")
- ✅ Accurate protocol descriptions (JSON stdin for local_exec)
- ✅ Proper scope and limitations from paper
4. **LICENSE**
- ✅ MIT License
- ✅ Copyright 2025 Gary W. Floyd
- ✅ Defensive prior art notice
5. **install.sh**
- ✅ No hardcoded passwords
- ✅ Handles existing database gracefully
- ✅ Doesn't assume sudo when not needed
- ✅ Filters out CREATE DATABASE from SQL when running
- ✅ Creates user directory for tools (~/.local/share/nexus/tools)
- ✅ Prompts for required passwords
- ✅ Creates config file with chmod 600
6. **Tool Scripts**
- ✅ sys_health.sh - reads JSON from stdin
- ✅ journal_tail.sh - reads JSON from stdin
- ✅ config_update.sh - reads JSON from stdin
- ✅ All executable
7. **requirements.txt**
- ✅ psycopg2-binary>=2.9.9
- ✅ sentence-transformers>=2.2.2
- ✅ numpy>=1.24.0
- ✅ requests>=2.31.0
---
## Critical Fixes Applied
### 1. ✅ Author Name Consistency
**Fixed**: All "Gary Gilbertson" → "Gary W. Floyd"
- gep_mcp_motor.py header
- gep_mcp_control_layer.sql header
### 2. ✅ Year Consistency
**Fixed**: All 2024 → 2025
- README.md
- Paper citations
- BibTeX reference
### 3. ✅ Free Energy Principle Citation
**Fixed**: Added proper citations
- Friston, K. (2010) in Related Work
- Changed "derives from" → "inspired by"
- Wolpert & Ghahramani (2000) for motor control
### 4. ✅ "No Allowlists" Accuracy
**Fixed**: More precise wording
- Changed to: "No static permission allowlists"
- Clarifies this is about permissions, not tool registry
### 5. ✅ local_exec JSON stdin
**Fixed**: Positional args → JSON stdin
```python
# OLD (fragile, order-dependent)
cmd = [endpoint] + [str(v) for v in input_data.values()]
# NEW (deterministic, auditable)
input_json = json.dumps(input_data)
subprocess.run([endpoint], input=input_json, ...)
```
### 6. ✅ install.sh Production Ready
**Fixed**:
- No hardcoded passwords
- Handles existing database
- Doesn't require sudo unnecessarily
- Uses user directories when possible
- Proper error handling
---
## Function Signature Verification
### gep_route_and_gate()
**SQL Signature** (line 332):
```sql
CREATE OR REPLACE FUNCTION gep.gep_route_and_gate(
p_session_id TEXT,
p_operator_id TEXT,
p_intent TEXT,
p_intent_embedding vector(384),
p_entropy_current DOUBLE PRECISION,
p_alignment_current DOUBLE PRECISION,
p_context JSONB DEFAULT '{}'::jsonb
)
```
**Python Call**:
```python
cur.execute("""
SELECT * FROM gep.gep_route_and_gate(
%s, %s, %s, %s::vector, %s, %s, %s::jsonb
)
""", (session_id, operator_id, intent, str(intent_vec),
entropy_current, alignment_current, psycopg2.extras.Json(context)))
```
✅ **MATCH**: 7 parameters in correct order
### log_and_update()
**SQL Signature** (line 594):
```sql
CREATE OR REPLACE FUNCTION gep.log_and_update(
p_event_id UUID,
p_session_id TEXT,
p_operator_id TEXT,
p_intent TEXT,
p_intent_embedding vector(384),
p_tool_id BIGINT,
p_action TEXT,
p_input_digest TEXT,
p_input_nonce TEXT,
p_outcome TEXT,
p_latency_ms INTEGER,
p_entropy_before DOUBLE PRECISION,
p_entropy_after DOUBLE PRECISION,
p_alignment_before DOUBLE PRECISION,
p_output_digest TEXT DEFAULT NULL,
p_output_validated BOOLEAN DEFAULT NULL,
p_validation_errors TEXT DEFAULT NULL,
p_constraints JSONB DEFAULT '{}'::jsonb,
p_notes TEXT DEFAULT NULL
)
```
**Python Call**:
```python
cur.execute("""
SELECT gep.log_and_update(
%s, %s, %s, %s, %s::vector, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s::jsonb, %s
)
""", args) # 19 parameters
```
✅ **MATCH**: 19 parameters in correct order
---
## Installation Test Procedure
### 1. Fresh System Test
```bash
# On clean Ubuntu system
git clone <repo>
cd gep-mcp-motor
chmod +x install.sh
./install.sh
# Should prompt for:
# - PostgreSQL user (default: postgres)
# - PostgreSQL password
# - nexus_mcp password
# - nexus_readonly password
# - Database drop confirmation (if exists)
# Should succeed without sudo (except pgvector install)
```
### 2. Verify Installation
```bash
source gep_mcp_config.env
# Test database connection
psql -U nexus_mcp -d gep_mcp_v2 -c "SELECT count(*) FROM gep.tool_registry;"
# Test Python motor
python3 gep_mcp_motor.py --db "$GEP_DB_CONN" --stats
# Test execution
python3 gep_mcp_motor.py --db "$GEP_DB_CONN" --test
```
### 3. Test Tool Execution
```bash
# Test sys_health.sh with JSON input
echo '{"verbose": true}' | ~/.local/share/nexus/tools/sys_health.sh
# Should output valid JSON
```
---
## Deployment to GitHub
### Repository Setup
```bash
git init
git add .
git commit -m "Initial release - Entropy-Guided Motor Control for MCP"
git branch -M main
git remote add origin git@github.com:lumiea-systems/gep-mcp-motor.git
git push -u origin main
```
### Release Tag
```bash
git tag -a v1.0.0 -m "Initial public release - Paper implementation"
git push origin v1.0.0
```
### Repository Description
```
Entropy-Guided Motor Control for Autonomous Tool Execution - A GEP-Native
Control Layer for Model Context Protocol (MCP) systems. Reference
implementation for academic paper by Gary W. Floyd.
```
### Topics/Tags
- gep
- model-context-protocol
- mcp
- entropy
- motor-control
- ai-safety
- tool-execution
- autonomous-systems
---
## Paper Integration
### Update Paper Repository Link
In paper DOCX, update implementation section:
```
Implementation available at: https://github.com/lumiea-systems/gep-mcp-motor
```
### Academia.edu Upload
1. Upload paper PDF
2. Add repository link in abstract
3. Tag: "Entropy", "Model Context Protocol", "Motor Control", "AI Safety"
### LinkedIn Announcement
```
Released: GEP-Native MCP Control Layer
New paper + open-source implementation treating tool execution
as motor control governed by entropy regulation.
Paper: [link]
Code: https://github.com/lumiea-systems/gep-mcp-motor
No static permissions. No RBAC. Just physics.
#AI #MachineLearning #OpenSource
```
---
## Post-Deployment Monitoring
### Watch For
1. **Issues with function signatures** - parameter mismatches
2. **pgvector installation problems** - different OS versions
3. **Tool execution failures** - JSON stdin parsing
4. **Password handling** - config file permissions
### Response Templates Ready
- "Function signature mismatch" → Check Python/SQL alignment
- "pgvector not found" → Manual installation instructions
- "Tool not receiving JSON" → Verify stdin reading in tool script
- "Permission denied on config" → chmod 600 gep_mcp_config.env
---
## Success Criteria
✅ Repository is public and accessible
✅ install.sh completes without errors on fresh Ubuntu
✅ Test execution succeeds with example tools
✅ Paper links to working repository
✅ No hardcoded credentials in any file
✅ All author attributions correct (Gary W. Floyd)
✅ All dates consistent (2025)
✅ Function signatures match between SQL and Python
✅ No false claims in documentation
---
## Final Checklist Before Push
- [ ] All files in outputs directory
- [ ] install.sh is executable
- [ ] Tool scripts are executable
- [ ] No passwords in any file
- [ ] Author name correct everywhere
- [ ] Year is 2025 everywhere
- [ ] README matches paper structure
- [ ] LICENSE has correct copyright
- [ ] Function signatures verified
- [ ] local_exec uses JSON stdin
- [ ] .gitignore includes gep_mcp_config.env
---
**Ready to deploy!**
Gary W. Floyd
Lumiea Systems Research Division
New Caney, Texas, United States