
Overview
The Gopher & Gemini MCP Server is a modern implementation of the Model Context Protocol that enables LLMs to explore two fascinating alternative internet protocols: the vintage Gopher protocol from the early 1990s and the modern, privacy-focused Gemini protocol. This server acts as a bridge between AI assistants and these minimalist, text-focused corners of the internet.
Why Gopher and Gemini?
- Gopher: A pre-web internet protocol from 1991, still maintained by enthusiasts with active servers hosting unique content
- Gemini: A modern alternative to the web, designed for privacy, simplicity, and sustainability
- Both: Text-focused, lightweight, and free from the complexity of modern web technologies
Architecture
LLM Client ←→ MCP Protocol ←→ Gopher/Gemini Client ←→ Remote Servers
↓
Protocol Handlers
↓
┌─────────┴─────────┐
Gopher (Port 70) Gemini (TLS)
↓ ↓
Legacy Servers Modern Servers
Design Philosophy
- Dual Protocol: Single server supporting both Gopher and Gemini
- Modern Implementation: Python 3.11+ with async/await
- Security First: TOFU certificate validation for Gemini
- Cross-Platform: Works on Windows, macOS, and Linux
Features
🌐 Dual Protocol Support
Gopher Protocol
- Fetch content from Gopher servers (port 70)
- Parse Gopher menus and directory listings
- Support for all Gopher item types
- Handle text files, binary files, and search queries
- Navigate hierarchical Gopher spaces
Gemini Protocol
- Fetch content over TLS (port 1965)
- Parse gemtext markup format
- TOFU (Trust On First Use) certificate validation
- Handle redirects and input requests
- Support for client certificates
🔐 Security Features
- TOFU Certificate Validation: Trust-on-first-use model for Gemini
- Certificate Pinning: Remember and verify server certificates
- TLS 1.2+: Modern encryption for Gemini connections
- Input Sanitization: Protect against malicious content
- Timeout Protection: Prevent hanging connections
🛠️ MCP Tools
- gopher_fetch: Retrieve content from Gopher servers
- gemini_fetch: Retrieve content from Gemini servers
- parse_gopher_menu: Parse Gopher directory listings
- parse_gemtext: Convert gemtext to readable format
📊 Content Parsing
- Gopher Menu Parsing: Extract links, text, and metadata
- Gemtext Parsing: Convert gemtext to markdown-like format
- Link Extraction: Identify and follow links in both protocols
- Content Type Detection: Handle different file types appropriately
Technical Implementation
Built With Modern Python
- Python 3.11+: Modern async/await syntax
- FastMCP: Rapid MCP server development
- Pituophis: Gopher protocol implementation
- SSL/TLS: Built-in Python SSL for Gemini
- Type Hints: Full type safety with mypy
Cross-Platform Compatibility
Tested and working on:
- Windows 10/11: PowerShell, Command Prompt, Git Bash
- macOS: Ventura, Sonoma (Intel and Apple Silicon)
- Linux: Ubuntu, Debian, Fedora, Arch
Getting Started
Installation
# Install with pip
pip install gopher-mcp
# Or install from source
git clone https://github.com/cameronrye/gopher-mcp.git
cd gopher-mcp
pip install -e .
Claude Desktop Integration
Add to your Claude Desktop configuration:
macOS/Linux (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"gopher": {
"command": "python",
"args": ["-m", "gopher_mcp"]
}
}
}
Windows (%APPDATA%\Claude\claude_desktop_config.json
):
{
"mcpServers": {
"gopher": {
"command": "python",
"args": ["-m", "gopher_mcp"]
}
}
}
Example Interactions
Once configured, you can ask Claude:
Gopher Exploration:
- “Fetch the main menu from gopher://gopher.floodgap.com”
- “Show me what’s on the SDF Gopher server”
- “Browse gopher://gopher.club”
Gemini Exploration:
- “Fetch the homepage from gemini://gemini.circumlunar.space”
- “Show me the content at gemini://warmedal.se/~antenna/”
- “Browse the Gemini protocol specification”
Content Discovery:
- “What’s the difference between Gopher and Gemini?”
- “Find interesting Gopher servers to explore”
- “Show me how gemtext formatting works”
Use Cases
For Users
- Alternative Internet: Explore the web before the web
- Privacy-Focused Browsing: Access Gemini’s privacy-first content
- Retro Computing: Experience 1990s internet protocols
- Content Discovery: Find unique, text-focused content
For Developers
- Protocol Learning: Understand Gopher and Gemini through AI interaction
- Historical Research: Access archived content on Gopher servers
- Gemini Development: Test Gemini sites with AI assistance
- Educational Tools: Teach internet history and protocols
For Researchers
- Internet History: Study the evolution of internet protocols
- Alternative Networks: Analyze non-web internet spaces
- Protocol Comparison: Compare modern and vintage approaches
- Content Analysis: Study text-focused internet communities
Popular Servers to Explore
Gopher Servers
- gopher://gopher.floodgap.com - Floodgap Systems (Gopher history and resources)
- gopher://gopher.club - Community Gopher server
- gopher://sdf.org - Super Dimension Fortress (vintage computing)
- gopher://gopherpedia.com - Wikipedia mirror in Gopherspace
Gemini Servers
- gemini://gemini.circumlunar.space - Project Gemini homepage
- gemini://warmedal.se/~antenna/ - Gemini feed aggregator
- gemini://gmi.skyjake.fi/lagrange/ - Lagrange browser homepage
- gemini://geminiprotocol.net - Gemini protocol documentation
Development
Testing
# Run tests
pytest
# Run with coverage
pytest --cov=gopher_mcp
# Test specific protocol
pytest tests/test_gopher.py
pytest tests/test_gemini.py
Development Setup
# Clone repository
git clone https://github.com/cameronrye/gopher-mcp.git
cd gopher-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
Protocol Specifications
Gopher Protocol (RFC 1436)
- Port: 70 (TCP)
- Format: Plain text menus with item types
- Item Types: Text, directory, binary, search, etc.
- Navigation: Hierarchical directory structure
Gemini Protocol
- Port: 1965 (TLS)
- Format: Gemtext markup language
- Security: Mandatory TLS with TOFU
- Status Codes: Simple numeric response codes
- MIME Types: text/gemini for gemtext content
Community Impact
This project enables:
- Protocol Preservation: Keep vintage internet protocols accessible
- AI-Powered Exploration: Natural language interaction with alternative internet
- Educational Value: Learn about internet history through practical use
- Privacy Advocacy: Promote privacy-focused alternatives to the modern web
Future Roadmap
- Enhanced gemtext rendering
- Gopher search support (type 7 items)
- Client certificate support for Gemini
- Content caching for performance
- Bookmark management
- History tracking
Acknowledgments
- Gopher Community: Keeping the protocol alive since 1991
- Project Gemini: Creating a modern alternative internet
- FastMCP: Rapid MCP server development framework
- Pituophis: Python Gopher protocol library
Status: Production Ready
License: MIT
Maintained: Active Development