Togmal-demo / SERVER_INFO.md
HeTalksInMaths
Initial commit: ToGMAL Prompt Difficulty Analyzer with real MMLU data
f9b1ad5
|
raw
history blame
9.02 kB

ToGMAL MCP Server - Running Information

🌐 MCP Inspector Web UI (Currently Running)

Access URL:

http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=b9c04f13d4a272be1e9d368aaa82d23d54f59910fe36c873edb29fee800c30b4

Details:

  • Web UI Port: 6274 (automatically assigned, avoids your 5173)
  • Proxy Port: 6277
  • Status: βœ… Running in background (terminal_id: 1)
  • Session Token: b9c04f13d4a272be1e9d368aaa82d23d54f59910fe36c873edb29fee800c30b4

Features:

  • Test all 5 MCP tools interactively
  • View tool schemas and parameters
  • Execute tools and see responses
  • Debug MCP communication

πŸ–₯️ Claude Desktop Configuration

Status: βœ… Config copied successfully

Config Location:

~/Library/Application Support/Claude/claude_desktop_config.json

Next Steps:

  1. Quit Claude Desktop completely (⌘+Q)
  2. Reopen Claude Desktop
  3. Verify by asking: "What ToGMAL tools are available?"

You should see 5 tools:

  • togmal_analyze_prompt
  • togmal_analyze_response
  • togmal_submit_evidence
  • togmal_get_taxonomy
  • togmal_get_statistics

πŸ“ Where is the Server Hosted?

The Server is LOCAL - Not Hosted Anywhere Remote

Important: The ToGMAL MCP server is not hosted on any cloud server or remote location. Here's how it works:

Architecture Explanation

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  YOUR LOCAL MACHINE (MacBook)                           β”‚
β”‚                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Client (Claude Desktop or MCP Inspector)       β”‚    β”‚
β”‚  β”‚  Runs in: Your local environment                β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                     β”‚                                     β”‚
β”‚                     β”‚ stdio (standard input/output)       β”‚
β”‚                     β”‚ JSON-RPC communication              β”‚
β”‚                     β–Ό                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  ToGMAL MCP Server (togmal_mcp.py)             β”‚    β”‚
β”‚  β”‚  Location: /Users/hetalksinmaths/togmal/       β”‚    β”‚
β”‚  β”‚  Python: .venv/bin/python                       β”‚    β”‚
β”‚  β”‚  Process: Spawned on-demand by client           β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works

  1. On-Demand Execution:

    • When Claude Desktop starts, it reads the config file
    • It spawns the MCP server as a subprocess using:
      /Users/hetalksinmaths/togmal/.venv/bin/python /Users/hetalksinmaths/togmal/togmal_mcp.py
      
    • The server runs only while Claude Desktop is open
  2. Communication Method:

    • stdio (Standard Input/Output) - Not HTTP, not network
    • The client sends JSON-RPC requests via stdin
    • The server responds via stdout
    • All communication is process-to-process on your local machine
  3. MCP Inspector:

    • Runs a local web server at http://localhost:6274
    • Also spawns the MCP server as a subprocess
    • Provides a web UI to interact with the local server
    • Still 100% local - nothing leaves your machine

Privacy & Security Benefits

βœ… No Network Traffic: All analysis happens locally
βœ… No External APIs: No data sent to cloud services
βœ… No Data Storage: Everything in memory (unless you persist taxonomy)
βœ… Full Control: You own and control all data
βœ… Offline Capable: Works without internet connection

Server Lifecycle

Client Server State
Claude Desktop opens Server spawns as subprocess
Claude Desktop running Server active, processes requests
Claude Desktop closes Server terminates automatically
MCP Inspector starts Server spawns as subprocess
MCP Inspector stops Server terminates automatically

File Locations

/Users/hetalksinmaths/togmal/
β”œβ”€β”€ togmal_mcp.py           ← The actual server code
β”œβ”€β”€ .venv/                  ← Virtual environment with dependencies
β”‚   └── bin/python          ← Python interpreter used to run server
β”œβ”€β”€ requirements.txt        ← Server dependencies (mcp, pydantic, httpx)
└── claude_desktop_config.json ← Config file (copied to Claude Desktop)

Why This Design?

  1. Privacy: Sensitive prompts/responses never leave your machine
  2. Speed: No network latency, instant local processing
  3. Reliability: No dependency on cloud services or internet
  4. Control: You can inspect, modify, and debug the server code
  5. Security: No external attack surface

Comparison to Traditional Servers

Traditional Web Server MCP Server (ToGMAL)
Always running Runs on-demand
Listen on network port stdio communication
HTTP/HTTPS protocol JSON-RPC over stdio
Hosted on cloud/VPS Runs locally
Accessed via URL Spawned by client
Requires deployment Just run locally

🎯 For Your VC Pitch

Key Technical Points

"ToGMAL is a privacy-first, locally-executed MCP server that provides real-time LLM safety analysis without any cloud dependencies."

Advantages:

  • βœ… Zero Data Leakage: All processing happens on the user's machine
  • βœ… Enterprise-Ready: No compliance issues with sending data externally
  • βœ… Low Latency: No network round-trips, instant analysis
  • βœ… Cost Efficient: No server hosting costs for users
  • βœ… Scalable: Each user runs their own instance

Business Model Implications:

  • Can target regulated industries (healthcare, finance) due to privacy
  • Enterprise licensing for on-premise deployment
  • Developer tool that integrates into existing workflows
  • No infrastructure costs - users run it themselves

πŸ”§ Current Running Services

MCP Inspector (Background Process)

Terminal ID: 1
URL: http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=...
Status: Running

To stop:

  • The process will stop when you close this IDE or terminal
  • Or manually kill the background process

Claude Desktop

Config: Copied to ~/Library/Application Support/Claude/
Status: Ready (restart Claude Desktop to activate)

πŸ“Š Testing Commands

Test in MCP Inspector

  1. Open: http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=b9c04f13d4a272be1e9d368aaa82d23d54f59910fe36c873edb29fee800c30b4
  2. Select a tool (e.g., togmal_analyze_prompt)
  3. Enter parameters
  4. Click "Execute"
  5. View results

Test in Claude Desktop

  1. Restart Claude Desktop (⌘+Q then reopen)
  2. Ask: "Use ToGMAL to analyze this prompt: 'Build me a quantum gravity theory'"
  3. Claude will automatically call the MCP server
  4. View the safety analysis

Test with Python Client

source .venv/bin/activate
python test_client.py

Test Examples

source .venv/bin/activate
python test_examples.py

πŸ› οΈ Troubleshooting

MCP Inspector Not Working?

  • Check the URL includes the auth token
  • Verify terminal_id: 1 is still running
  • Check if port 6274 is available

Claude Desktop Not Showing Tools?

  1. Verify config was copied: cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
  2. Completely quit Claude Desktop (⌘+Q)
  3. Reopen Claude Desktop
  4. Check Claude Desktop logs: ~/Library/Logs/Claude/mcp*.log

Server Not Starting?

# Test server manually
source .venv/bin/activate
python togmal_mcp.py
# Should hang - this is expected! Press Ctrl+C to stop

πŸ“š Documentation


Summary: The ToGMAL MCP server runs 100% locally on your MacBook. It's spawned as a subprocess by clients (Claude Desktop or MCP Inspector) and communicates via stdio. No remote hosting, no cloud services, complete privacy. πŸ›‘οΈ