Gopher & Gemini MCP Server
A modern Model Context Protocol server for AI-driven exploration of Gopher and Gemini resources.
Key Features
Use Cases
README
Gopher & Gemini MCP Server
A modern, cross-platform Model Context Protocol (MCP) server that enables AI assistants to browse and interact with both Gopher protocol and Gemini protocol resources safely and efficiently.
π Overview
The Gopher & Gemini MCP Server bridges vintage and modern alternative internet protocols with AI assistants, allowing LLMs like Claude to explore the unique content and communities that thrive on both Gopherspace and Geminispace. Built with FastMCP and modern Python practices, it provides secure, efficient gateways to these distinctive internet protocols.
Key Benefits:
- π Discover alternative internet content - Access unique resources on both Gopher and Gemini protocols
- π‘οΈ Safe exploration - Built-in security safeguards, TLS encryption, and content filtering
- π Modern implementation - Uses FastMCP framework with async/await patterns
- π§ Developer-friendly - Comprehensive testing, type hints, and documentation
- π Advanced security - TOFU certificate validation and client certificate support for Gemini
β¨ Features
- π§ Dual Protocol Support:
gopher_fetchandgemini_fetchtools for comprehensive protocol coverage - π Comprehensive Gopher Support: Handles menus (type 1), text files (type 0), search servers (type 7), and binary files
- π Full Gemini Implementation: Native gemtext parsing, TLS security, and status code handling
- π Advanced Security: TOFU certificate validation, client certificates, and secure TLS connections
- π‘οΈ Safety First: Built-in timeouts, size limits, input sanitization, and host allowlists
- π€ LLM-Optimized: Returns structured JSON responses designed for AI consumption
- π₯οΈ Cross-Platform: Works seamlessly on Windows, macOS, and Linux
- π¬ Modern Development: Full type checking, linting, testing, and CI/CD pipeline
- β‘ High Performance: Async/await patterns with intelligent caching
π Documentation
Complete documentation is available at cameronrye.github.io/gopher-mcp
- π Installation Guide
- π§ API Reference
- π Advanced Features
- π€ AI Assistant Guide
π Quick Start
π Prerequisites
- Python 3.11+ - Download here
- uv package manager - Install uv
π¦ Installation
Option 1: Development Installation (Recommended)
# Clone the repository
git clone https://github.com/cameronrye/gopher-mcp.git
cd gopher-mcp
# Set up development environment
./scripts/dev-setup.sh # Unix/macOS
# or
scripts\dev-setup.bat # Windows
# Run the server
uv run task serve
Option 2: PyPI Installation
# Install from PyPI (recommended for end users)
pip install gopher-mcp
# Or with uv
uv add gopher-mcp
Option 3: Development Installation
# Install directly from GitHub
uv add git+https://github.com/cameronrye/gopher-mcp.git
# Or install in development mode
git clone https://github.com/cameronrye/gopher-mcp.git
cd gopher-mcp
uv sync --all-extras
methods above.
π§ Claude Desktop Integration
Add to your claude_desktop_config.json:
Unix/macOS/Linux:
{
"mcpServers": {
"gopher": {
"command": "uv",
"args": ["--directory", "/path/to/gopher-mcp", "run", "task", "serve"],
"env": {
"MAX_RESPONSE_SIZE": "1048576",
"TIMEOUT_SECONDS": "30"
}
}
}
}
Windows:
{
"mcpServers": {
"gopher": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\gopher-mcp",
"run",
"task",
"serve"
],
"env": {
"MAX_RESPONSE_SIZE": "1048576",
"TIMEOUT_SECONDS": "30"
}
}
}
}
π οΈ Cross-Platform Development
This project includes a unified Python-based task management system that works across all platforms:
Recommended (All Platforms)
python task.py <command> # Unified Python task runner (recommended)
Alternative Options
# Unix/macOS/Linux
make <command> # Traditional make (delegates to task.py)
# Universal fallback
uv run task <command> # Direct taskipy usage
Available Commands
| Command | Description |
|---|---|
dev-setup |
Set up development environment |
install-hooks |
Install pre-commit hooks |
lint |
Run ruff linting |
format |
Format code with ruff |
typecheck |
Run mypy type checking |
quality |
Run all quality checks |
check |
Run lint + typecheck |
test |
Run all tests |
test-cov |
Run tests with coverage |
test-unit |
Run unit tests only |
test-integration |
Run integration tests |
serve |
Run MCP server (stdio) |
serve-http |
Run MCP server (HTTP) |
docs-serve |
Serve docs locally |
docs-build |
Build documentation |
clean |
Clean build artifacts |
ci |
Run CI pipeline locally |
π Usage
The server provides two powerful MCP tools for exploring alternative internet protocols:
gopher_fetch Tool
Fetches Gopher menus, text files, or metadata by URL with comprehensive error handling and security safeguards.
Parameters:
url(string, required): Full Gopher URL (e.g.,gopher://gopher.floodgap.com/1/)
Response Types:
- MenuResult: For Gopher menus (type 1) and search results (type 7)
- Contains structured menu items with type, display text, selector, host, and port
- TextResult: For text files (type 0)
- Returns the full text content with metadata
- BinaryResult: Metadata only for binary files (types 4, 5, 6, 9, g, I)
- Provides file information without downloading binary content
- ErrorResult: For errors or unsupported content
- Includes detailed error messages and troubleshooting hints
gemini_fetch Tool
Fetches Gemini content with full TLS security, TOFU certificate validation, and native gemtext parsing.
Parameters:
url(string, required): Full Gemini URL (e.g.,gemini://geminiprotocol.net/)
Response Types:
- GeminiGemtextResult: For gemtext content (text/gemini)
- Parsed gemtext document with structured lines, links, and headings
- GeminiSuccessResult: For other text and binary content
- Raw content with MIME type information
- GeminiInputResult: For input requests (status 10-11)
- Prompts for user input with optional sensitive flag
- GeminiRedirectResult: For redirects (status 30-31)
- New URL for temporary or permanent redirects
- GeminiErrorResult: For errors (status 40-69)
- Detailed error information with status codes
- GeminiCertificateResult: For certificate requests (status 60-69)
- Certificate requirement information
π Example URLs to Try
Gopher Protocol
# Classic Gopher menu
gopher://gopher.floodgap.com/1/
# Gopher news and information
gopher://gopher.floodgap.com/1/gopher
# Search example (type 7)
gopher://gopher.floodgap.com/7/v2/vs
# Text file example
gopher://gopher.floodgap.com/0/gopher/welcome
Gemini Protocol
# Gemini protocol homepage
gemini://geminiprotocol.net/
# Gemini software directory
gemini://geminiprotocol.net/software/
# Example personal gemlog
gemini://warmedal.se/~antenna/
# Gemini search aggregator
gemini://kennedy.gemi.dev/
π€ Example AI Interactions
Once configured, you can ask Claude:
Gopher Exploration:
- "Browse the main Gopher menu at gopher.floodgap.com"
- "Search for 'python' on the Veronica-2 search server"
- "Show me the welcome text from Floodgap's Gopher server"
- "What's available in the Gopher community directory?"
Gemini Exploration:
- "Fetch the Gemini protocol homepage"
- "Show me the software directory on geminiprotocol.net"
- "Browse the latest posts from a gemlog"
- "What's the difference between Gopher and Gemini protocols?"
π§ Development
π Project Structure
gopher-mcp/
βββ src/gopher_mcp/ # Main package
β βββ __init__.py # Package initialization
β βββ server.py # FastMCP server implementation
β βββ gopher_client.py # Gopher protocol client
β βββ models.py # Pydantic data models
β βββ tools.py # MCP tool definitions
β βββ utils.py # Utility functions
βββ tests/ # Comprehensive test suite
β βββ test_server.py # Server tests
β βββ test_gopher_client.py # Client tests
β βββ test_integration.py # Integration tests
βββ docs/ # MkDocs documentation
βββ scripts/ # Development scripts
βββ .github/workflows/ # CI/CD pipelines
βββ Makefile # Unix/macOS task runner
βββ task.bat # Windows task runner
βββ pyproject.toml # Modern Python project config
π Development Workflow
- Setup:
uv run task dev-setup- Install dependencies and pre-commit hooks - Code: Make your changes with full IDE support (type hints, linting)
- Quality:
uv run task quality- Run all quality checks (lint + typecheck + test) - Test:
uv run task test-cov- Run tests with coverage reporting - Commit: Pre-commit hooks ensure code quality automatically
π§ͺ Testing
# Run all tests
uv run task test
# Run with coverage
uv run task test-cov
# Run specific test types
uv run task test-unit
uv run task test-integration
# Run tests in watch mode during development
uv run pytest --watch
βοΈ Configuration
The server can be configured through environment variables for both protocols:
Gopher Configuration
| Variable | Description | Default | Example |
|---|---|---|---|
GOPHER_MAX_RESPONSE_SIZE |
Maximum response size in bytes | 1048576 (1MB) |
2097152 |
GOPHER_TIMEOUT_SECONDS |
Request timeout in seconds | 30 |
60 |
GOPHER_CACHE_ENABLED |
Enable response caching | true |
false |
GOPHER_CACHE_TTL_SECONDS |
Cache time-to-live in seconds | 300 |
600 |
GOPHER_ALLOWED_HOSTS |
Comma-separated allowed hosts | None (all) |
example.com,test.com |
Gemini Configuration
| Variable | Description | Default | Example |
|---|---|---|---|
GEMINI_MAX_RESPONSE_SIZE |
Maximum response size in bytes | 1048576 (1MB) |
2097152 |
GEMINI_TIMEOUT_SECONDS |
Request timeout in seconds | 30 |
60 |
GEMINI_CACHE_ENABLED |
Enable response caching | true |
false |
GEMINI_CACHE_TTL_SECONDS |
Cache time-to-live in seconds | 300 |
600 |
GEMINI_ALLOWED_HOSTS |
Comma-separated allowed hosts | None (all) |
example.org,test.org |
GEMINI_TOFU_ENABLED |
Enable TOFU certificate validation | true |
false |
GEMINI_CLIENT_CERTS_ENABLED |
Enable client certificate support | true |
false |
Example Configuration
# Gopher settings
export GOPHER_MAX_RESPONSE_SIZE=2097152
export GOPHER_TIMEOUT_SECONDS=60
export GOPHER_CACHE_ENABLED=true
export GOPHER_ALLOWED_HOSTS="gopher.floodgap.com,gopher.quux.org"
# Gemini settings
export GEMINI_MAX_RESPONSE_SIZE=2097152
export GEMINI_TIMEOUT_SECONDS=60
export GEMINI_TOFU_ENABLED=true
export GEMINI_CLIENT_CERTS_ENABLED=true
export GEMINI_ALLOWED_HOSTS="geminiprotocol.net,warmedal.se"
# Run with custom config
uv run task serve
π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Quick Contribution Steps
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/gopher-mcp.git - Setup development environment:
uv run task dev-setup - Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes with tests
- Quality check:
uv run task quality - Commit your changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Submit a pull request with a clear description
Development Standards
- β Type hints for all functions and methods
- β Comprehensive tests with >90% coverage
- β Documentation for all public APIs
- β Security considerations for all network operations
- β Cross-platform compatibility (Windows, macOS, Linux)
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Model Context Protocol by Anthropic - The foundation that makes this integration possible
- FastMCP - High-level Python framework for building MCP servers
- Pituophis - Excellent Python Gopher client library
- The Gopher Protocol Community - Keeping the spirit of the early internet alive
π Related Projects
- Model Context Protocol Servers - Official MCP server implementations
- Awesome MCP Servers - Curated list of MCP servers
- Claude Desktop - AI assistant that supports MCP
π Support
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π Documentation: Project Docs
- π¬ Community: MCP Discord
Made with β€οΈ for the intersection of vintage internet protocols and modern AI
β Star this project if you find it useful!
Star History
Repository Owner
User
Repository Details
Programming Languages
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
FastMCP
The fast, Pythonic way to build MCP servers and clients.
FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.
- β 20,201
- MCP
- jlowin/fastmcp
Google Workspace MCP Server
Full natural language control of Google Workspace through the Model Context Protocol.
Google Workspace MCP Server enables comprehensive natural language interaction with Google services such as Calendar, Drive, Gmail, Docs, Sheets, Slides, Forms, Tasks, and Chat via any MCP-compatible client or AI assistant. It supports both single-user and secure multi-user OAuth 2.1 authentication, providing a production-ready backend for custom apps. Built on FastMCP, it delivers high performance and advanced context handling, offering deep integration with the entire Google Workspace suite.
- β 890
- MCP
- taylorwilsdon/google_workspace_mcp
godoc-mcp
Token-efficient Go documentation server for LLMs using Model Context Protocol.
godoc-mcp is a Model Context Protocol (MCP) server that provides efficient, structured access to Go package documentation for large language models. It enables LLMs to understand Go projects without reading entire source files by supplying essential documentation and source code at varying levels of granularity. The tool supports project navigation, automatic module setup, caching, and works offline for both standard and third-party Go packages.
- β 88
- MCP
- mrjoshuak/godoc-mcp
AIM Guard MCP
AI-powered security and safety server for Model Context Protocol environments.
AIM Guard MCP is a server implementing the Model Context Protocol (MCP), providing AI-powered security analysis and safety instruction tools tailored for AI agents. It offers features such as contextual security instructions, harmful content detection, API key scanning, and prompt injection detection, all designed to guard and protect interactions with various MCPs and external services. Built for fast integration, it connects with the AIM Intelligence API and is compatible with any MCP-compliant AI assistant.
- β 13
- MCP
- AIM-Intelligence/AIM-MCP
Google Workspace MCP Server
A secure MCP server bridging Google Workspace and AI clients.
Google Workspace MCP Server implements the Model Context Protocol to enable secure integration between Google Workspace servicesβsuch as Gmail, Calendar, and Driveβand any MCP-compatible AI client. It allows users to read, search, create, update, and delete Google Calendar events, emails, and Drive files directly through an AI agent interface. The tool ensures authentication via Google OAuth and provides a seamless setup process for both server and client sides. This makes it easier for AI-powered workflows to interact with Google Workspace data securely and contextually.
- β 20
- MCP
- giuseppe-coco/Google-Workspace-MCP-Server
Scrapeless MCP Server
A real-time web integration layer for LLMs and AI agents built on the open MCP standard.
Scrapeless MCP Server is a powerful integration layer enabling large language models, AI agents, and applications to interact with the web in real time. Built on the open Model Context Protocol, it facilitates seamless connections between models like ChatGPT, Claude, and tools such as Cursor to external web capabilities, including Google services, browser automation, and advanced data extraction. The system supports multiple transport modes and is designed to provide dynamic, real-world context to AI workflows. Robust scraping, dynamic content handling, and flexible export formats are core parts of the feature set.
- β 57
- MCP
- scrapeless-ai/scrapeless-mcp-server
Didn't find tool you were looking for?