"This is the voice of world control..." Inspired by Colossus: The Forbin Project, where two computers learn to communicate - just like MCP enables systems to talk to each other.
An interactive CLI tool for testing remote MCP (Model Context Protocol) servers and their tools. Specifically designed for developing agentic workflows with support for suspended services (like Fly.io) that need automatic wake-up.
Forbin is named after Dr. Charles Forbin from the 1970 film Colossus: The Forbin Project. In the movie, two supercomputers (American "Colossus" and Soviet "Guardian") learn to communicate with each other, establishing their own protocol and sharing information - a perfect parallel to the Model Context Protocol enabling AI systems and tools to communicate seamlessly.
- Interactive CLI - Browse and test MCP tools with an intuitive command-line interface
- Automatic Wake-up - Handles suspended services (Fly.io, etc.) with health check probing
- Cold-Start Resilient - Built-in retry logic and extended timeouts for slow-starting servers
- Schema Inspection - View detailed tool schemas including parameters and types
- Generic Tool Calling - Test any MCP tool with interactive parameter input
- Type-Safe Parameter Parsing - Automatic conversion of strings, booleans, numbers, and JSON objects
- Connectivity Testing - Verify server connectivity without running tools
- Development - Test your FastAPI/FastMCP server tools during development
- Debugging - Verify tool schemas and responses in real-time
- Agentic Workflows - Validate tools before integrating them into AI agents
- CI/CD - Run connectivity tests as part of deployment pipelines
- Documentation - Explore available tools on any MCP server
- Python 3.13 or higher
uvpackage manager (or pip)
# Clone the repository
git clone https://github.com/chris-colinsky/Forbin.git
cd Forbin
# Install dependencies
uv syncpip install -e .Create a .env file in the project root (copy from .env.example):
cp .env.example .envEdit .env with your MCP server details:
# Required: Your MCP server endpoint
MCP_SERVER_URL=https://your-server.fly.dev/mcp
# Required: Authentication token
MCP_TOKEN=your-secret-token
# Optional: Health check endpoint for suspended services
MCP_HEALTH_URL=https://your-server.fly.dev/healthLocal Development:
MCP_SERVER_URL=http://localhost:8000/mcp
MCP_TOKEN=test-token-123Fly.io Production:
MCP_SERVER_URL=https://my-app.fly.dev/mcp
MCP_HEALTH_URL=https://my-app.fly.dev/health
MCP_TOKEN=prod-token-xyzRun the interactive tool browser:
forbinThis will:
- Wake up your server (if health URL is configured)
- Connect to the MCP server
- List all available tools
- Enter the two-level interactive browser
Tool List View:
Available Tools
1. generate_report - Generates a monthly summary report...
2. get_user_stats - Retrieves user statistics for a given...
Commands:
number - Select a tool
v - Toggle verbose logging (current: OFF)
q - Quit
Select tool: 1
Tool View:
─────────────────────────── generate_report ───────────────────────────
Options:
d - View details
r - Run tool
b - Back to tool list
q - Quit
Choose option:
From the tool view you can:
- d - View full schema with syntax-highlighted JSON
- r - Run the tool with interactive parameter input
- b - Go back to the tool list
- q - Quit
After running a tool, you stay in the tool view to run again with different parameters or navigate elsewhere.
For detailed usage instructions, see the Usage Guide.
Test server connectivity without entering interactive mode:
forbin --testThis is useful for:
- Verifying server is reachable
- Checking health endpoint configuration
- Validating authentication tokens
- CI/CD health checks
forbin --helpForbin is designed to handle the complexities of remote MCP servers, especially those on serverless or suspended platforms.
During operation, Forbin shows its progress using colored step indicators:
- [yellow]> Yellow[/yellow]: In Progress - The current action is being performed.
- [green]+ Green[/green]: Success - The step completed successfully.
- [dim]- Dim[/dim]: Skip - Step was skipped (e.g., wake-up not needed).
At any time during the connection process or while in the tool menu, you can press v to toggle verbose logging on or off. This is useful for debugging connection issues in real-time without restarting the tool.
For a deep dive into the wake-up process, connection retry logic, and technical architecture, see DOCS.md.
forbin/
forbin/ # Package directory
__init__.py
__main__.py
cli.py # Main CLI application
client.py # MCP connection logic
config.py # Configuration
display.py # UI logic
tools.py # Tool handling
utils.py # Utilities
pyproject.toml # Python project configuration
uv.lock # Dependency lock file
.env.example # Example environment configuration
.env # Your environment configuration (not committed)
CLAUDE.md # AI assistant guidance
README.md # This file
- fastmcp - MCP client library for Python
- httpx - Async HTTP client for health checks
- python-dotenv - Environment variable management
- tenacity - Retry logic utilities
# Test connectivity only
python -m forbin --test
# Run interactive session with your test server
python -m forbinThis tool is designed to work with FastAPI servers using the FastMCP library. Your server should:
- Expose an MCP endpoint (typically
/mcp) - Implement bearer token authentication
- Optionally expose a
/healthendpoint for wake-up detection - Follow the MCP protocol specification
Example FastAPI/FastMCP server:
from fastapi import FastAPI
from fastmcp import FastMCP
app = FastAPI()
mcp = FastMCP("My Tools")
@mcp.tool()
def my_tool(param: str) -> str:
"""A sample tool"""
return f"Result: {param}"
# Mount MCP at /mcp endpoint
app.include_router(mcp.get_router(), prefix="/mcp")
@app.get("/health")
def health():
return {"status": "ok"}- Verify your
MCP_HEALTH_URLis correct - Check if the health endpoint is accessible
- Try removing
MCP_HEALTH_URLif your server doesn't suspend - For
TimeoutErrorduring listing, check if your server is extremely slow or overloaded
- Increase the initialization wait time (edit
forbin/client.py) - Check your
MCP_SERVER_URLis correct - Verify your
MCP_TOKENis valid
- This is a harmless error from the FastMCP library
- Already suppressed in the tool output
- Safe to ignore
For detailed development instructions, testing, and automation, see DEVELOPMENT.md.
Quick commands:
make install-dev # Install dev dependencies
make test # Run tests
make check # Run all checks (format + lint + test)
make help # Show all available commandsTesting:
We have comprehensive test coverage with unit and integration tests:
make test # Run all tests
make test-coverage # Run with coverage report
make lint # Check code quality
make format # Format codePre-commit hooks:
Automatically run checks before each commit:
make pre-commit-installSee DEVELOPMENT.md for complete details on testing, CI/CD, and contributing.
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines.
Quick start:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install dev dependencies (
make install-dev) - Make your changes and add tests
- Run checks (
make check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
All pull requests must:
- Pass all tests (
make test) - Pass linting (
make lint) - Maintain or improve code coverage
- Include appropriate documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Name inspiration: Colossus: The Forbin Project (1970)
- Built with FastMCP - FastAPI integration for MCP
- Developed for better MCP tool testing during agentic workflow development