Interactive CLI tool for testing remote MCP servers - inspired by Colossus: The Forbin Project, where systems learn to communicate
Project description
Forbin
"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.
Name Origin
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.
Table of Contents
Features
- 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
- Clipboard Copy - Press
cafter any tool response to copy it to the system clipboard
Use Cases
- 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
Installation
Requirements: Python 3.13 or higher (handled automatically when installing with Homebrew).
End-User Installation
Homebrew (macOS — recommended)
brew tap chris-colinsky/forbin-mcp
brew install forbin-mcp
Prebuilt bottles are published for Apple Silicon (Sequoia, Tahoe). On other platforms, Homebrew falls back to building from source.
pipx (cross-platform)
pipx installs Python applications in isolated environments:
pipx install forbin-mcp
pip
pip install forbin-mcp
After any of the above:
forbin --help
For upgrade, uninstall, and platform-specific notes (including Windows/WSL), see docs/INSTALLATION.md.
Developer Installation
Clone and install in editable mode using uv:
git clone https://github.com/chris-colinsky/forbin-mcp.git
cd forbin-mcp
uv sync
Then run from source:
uv run forbin
For dev dependencies, testing, linting, and pre-commit hooks, see CONTRIBUTING.md and the Development section below.
Configuration
Forbin reads its settings from environment variables (or a .env file) and from ~/.forbin/config.json. Environment wins when both are set. You have two ways to set up:
Option 1 — First-run wizard (easiest): just run forbin. If no config exists, you'll be prompted for the required values and they'll be saved to ~/.forbin/config.json. Re-run anytime with forbin --config.
Option 2 — .env file (best for CI/CD or scripted setups):
cp .env.example .env
Edit .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. Forbin uses this to verify availability
# (like an LLM provider's /models) and to wake up suspended services.
# Leave unset (or remove) to skip the wake-up step entirely.
MCP_HEALTH_URL=https://your-server.fly.dev/health
For full details on configuration precedence, the JSON config file, and platform-specific examples, see docs/CONFIGURATION.md.
Configuration Examples
Local Development:
MCP_SERVER_URL=http://localhost:8000/mcp
MCP_TOKEN=test-token-123
Fly.io Production:
MCP_SERVER_URL=https://my-app.fly.dev/mcp
MCP_HEALTH_URL=https://my-app.fly.dev/health
MCP_TOKEN=prod-token-xyz
Usage
Interactive Mode (Default)
Run the interactive tool browser:
forbin
This will:
- Show the current configuration and let you confirm or edit it before connecting
- Wake up your server (only if
MCP_HEALTH_URLis configured — otherwise this step is skipped) - 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.
Connectivity Test Mode
Test server connectivity without entering interactive mode:
forbin --test
This is useful for:
- Verifying server is reachable
- Checking health endpoint configuration
- Validating authentication tokens
- CI/CD health checks
Config Wizard
Re-run the first-time setup wizard at any time:
forbin --config
Help
forbin --help
How It Works
Forbin is designed to handle the complexities of remote MCP servers, especially those on serverless or suspended platforms.
Health Endpoint Strategy
When MCP_HEALTH_URL is configured, Forbin probes the health endpoint before opening the MCP connection. The probe does two things at once:
- Availability check — confirms the server is reachable, similar to hitting an LLM provider's
/modelsendpoint to verify the API is up before issuing real requests. - Wake-up trigger — on platforms that suspend or stop idle instances (Fly.io scale-to-zero, Railway, Render, etc.), the same request rouses the service.
If you don't configure a health URL, Forbin skips the probe and connects directly — the right choice for always-on servers and local development.
Step Output Colors
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).
Interactive Toggle
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.
Cancelling a Running Tool
While a tool call is in flight, press ESC to cancel it. You stay in the tool view instead of having to ctrl-C the whole CLI — handy for tools that hang or take longer than you're willing to wait.
Terminal Compatibility
Forbin's single-key shortcuts (v, c, ESC-to-cancel, post-call clipboard prompt) rely on POSIX termios/tty to read keypresses without requiring Enter. That has a few practical implications:
- macOS and Linux — fully supported in any modern terminal (Terminal.app, iTerm2, Alacritty, GNOME Terminal, Konsole, etc.).
- Native Windows —
termiosisn't available, so the single-key shortcuts silently no-op. Numbered tool selection, prompts, and tool execution still work, but you won't be able to toggle verbose mid-run, cancel a hanging tool withESC, or use the one-key clipboard prompt. Run Forbin under WSL for the full experience. - Piped or non-TTY stdin (e.g.
forbin < script.txt, some CI runners) — the shortcuts and the post-call clipboard prompt are skipped automatically.forbin --testis the right mode for non-interactive contexts. - Linux clipboard copy — the
cshortcut after a tool call requiresxcliporxselto be installed (pyperclipuses them as backends). Without one, Forbin tells you it couldn't access the clipboard and continues.
Detailed Documentation
- docs/CONFIGURATION.md — full health-URL strategy, timeout knobs, and troubleshooting tables.
- docs/ARCHITECTURE.md — internal package layout, connection lifecycle, and error-handling plumbing.
- docs/ — index of all long-form documentation.
Development
Project Structure
forbin/
forbin/ # Package directory
__init__.py
__main__.py # python -m forbin entry point
cli.py # Main CLI application
client.py # MCP connection + wake-up
config.py # Configuration + first-run wizard
display.py # Rich-based UI primitives
tools.py # Parameter parsing + tool calls
utils.py # FilteredStderr + key listeners
verbose.py # vlog helpers (gated on VERBOSE flag)
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
Dependencies
- fastmcp - MCP client library for Python
- httpx - Async HTTP client for health checks
- python-dotenv - Environment variable management
- pyperclip - Clipboard copy for tool responses
- rich - Terminal UI rendering
Running Tests
# Test connectivity only
python -m forbin --test
# Run interactive session with your test server
python -m forbin
FastAPI/FastMCP Server Compatibility
This 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"}
Troubleshooting
"Failed to wake up server" or "Failed to list tools: TimeoutError"
- 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
"Connection error (server not ready)"
- Increase the initialization wait time (edit
forbin/client.py) - Check your
MCP_SERVER_URLis correct - Verify your
MCP_TOKENis valid
"Session termination failed: 400"
- This is a harmless error from the FastMCP library
- Already suppressed in the tool output
- Safe to ignore
Development
For detailed development instructions, testing, and automation, see docs/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 commands
Testing:
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 code
Pre-commit hooks:
Automatically run checks before each commit:
make pre-commit-install
See docs/DEVELOPMENT.md for complete details on testing, CI/CD, and contributing.
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
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Name inspiration: Colossus: The Forbin Project (1970)
- Built with FastMCP - FastAPI integration for MCP
- Developed for better MCP tool testing during agentic workflow development
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forbin_mcp-0.1.4.tar.gz.
File metadata
- Download URL: forbin_mcp-0.1.4.tar.gz
- Upload date:
- Size: 618.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0667f75e355e8cb82a3d43bd3a4ed869b3abe9629af4786ab263c3c6d00e81c1
|
|
| MD5 |
113f70e773b9d8598a733d6822685077
|
|
| BLAKE2b-256 |
e1d46514a57855e0714bddf0dd2bd5d3ddfe7fc565a4e353d64f7b2d4c34688a
|
Provenance
The following attestation bundles were made for forbin_mcp-0.1.4.tar.gz:
Publisher:
release.yml on chris-colinsky/forbin-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forbin_mcp-0.1.4.tar.gz -
Subject digest:
0667f75e355e8cb82a3d43bd3a4ed869b3abe9629af4786ab263c3c6d00e81c1 - Sigstore transparency entry: 1397644445
- Sigstore integration time:
-
Permalink:
chris-colinsky/forbin-mcp@6ecd8fd96ec1f776946c6e141526884782c46e5c -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/chris-colinsky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ecd8fd96ec1f776946c6e141526884782c46e5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file forbin_mcp-0.1.4-py3-none-any.whl.
File metadata
- Download URL: forbin_mcp-0.1.4-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7ab4ddb36a43f4b89ea0014a3a6a1cc6d142801ea601403c2dede591dd1e86
|
|
| MD5 |
947bf8247db194f54925d7f1c76cc5be
|
|
| BLAKE2b-256 |
2c9e4f8ab84e1942a92b12b435561fe4ba883c3c75287ccd2622c72680ff0c06
|
Provenance
The following attestation bundles were made for forbin_mcp-0.1.4-py3-none-any.whl:
Publisher:
release.yml on chris-colinsky/forbin-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forbin_mcp-0.1.4-py3-none-any.whl -
Subject digest:
cc7ab4ddb36a43f4b89ea0014a3a6a1cc6d142801ea601403c2dede591dd1e86 - Sigstore transparency entry: 1397644470
- Sigstore integration time:
-
Permalink:
chris-colinsky/forbin-mcp@6ecd8fd96ec1f776946c6e141526884782c46e5c -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/chris-colinsky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ecd8fd96ec1f776946c6e141526884782c46e5c -
Trigger Event:
push
-
Statement type: