tb lets you view web pages and perform searches directly from your terminal using the Jina Reader API.
Works on Linux, macOS, Windows (CMD, PowerShell, WSL, Git Bash).
- 🚀 Instant text‑only version of any page
- 🔍 Search using
s.jina.ai - 🎨 Optional pager (
less/more) with--pagerflag - 🔐 Optional token authentication & context token
- 📦 One‑command installation
- 🤖 MCP Server for AI agent integration (Claude Desktop, Cursor, etc.)
curl -sSL https://raw.githubusercontent.com/falcga/tb/main/install.sh | bashThen restart your terminal or run source ~/.bashrc / source ~/.zshrc.
powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/falcga/tb/main/install.ps1' -OutFile install.ps1; ./install.ps1"Or manually: download tb.bat and place it in a folder that is in your %PATH%.
# Clone the repository
git clone https://github.com/falcga/tb.git
cd tb
# Install Python dependencies
pip install -r requirements.txt
# Copy .env.example to .env and add your Jina API key
cp .env.example .env
# Edit .env and add your JINA_API_KEYAnonymous usage is not supported. You must obtain a free API token from Jina AI Reader to use this tool.
On first use, provide your token via the --token flag. It will be saved securely to a config file (~/.config/tb/config on Linux/macOS, %APPDATA%\tb\config on Windows) so you don't need to pass it again:
# Linux/macOS/WSL/Git Bash
tb --token jina_your_token_here https://example.com
# ✓ Token saved to ~/.config/tb/config
# Windows CMD
tb.bat --token jina_your_token_here https://example.com
# ✓ Token saved to %APPDATA%\tb\config
# Windows PowerShell
tb.bat --token jina_your_token_here https://example.com
# ✓ Token saved to %APPDATA%\tb\configAfter this, you can use tb without the --token flag:
tb https://example.com
tb "search query"Instead of using --token, you can set the token via environment variables:
export JINA_API_KEY="jina_your_token_here" # Linux/macOS (preferred)
export JINA_TOKEN="jina_your_token_here" # Linux/macOS (legacy)
set JINA_API_KEY=jina_your_token_here # Windows CMD
$env:JINA_API_KEY="jina_your_token_here" # Windows PowerShellFor a context token (sent as X-Context header):
export JINA_CONTEXT_TOKEN="your_context"Open a webpage:
tb https://example.comSearch the web:
tb "how to install python"| Flag | Description |
|---|---|
--token TOKEN |
Jina API token (overrides JINA_API_KEY/JINA_TOKEN) |
--context TOKEN |
Context token (sent as X-Context header) |
--raw |
Output raw text (default) |
--pager |
Output with pager (less/more) |
--help, -h |
Show help message |
# Open a page (raw output by default)
tb https://example.com
# Open a page with pager
tb --pager https://example.com
# Open a page with a temporary token (overrides environment)
tb --token jina_xyz https://news.ycombinator.com
# Search with a context token
tb --context session_123 "bash best practices"
# Save output to a file (raw by default)
tb https://example.com > page.txtThe MCP server runs locally on your machine and uses your Jina API key from environment variables or a .env file. No credentials are shared or hardcoded.
# From the tb directory
python -m mcp_serverThe server communicates via stdio (standard input/output) and is designed to be launched by an MCP-compatible client.
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"tb": {
"command": "python",
"args": ["-m", "mcp_server"],
"cwd": "/path/to/tb",
"env": {
"JINA_API_KEY": "your_jina_api_key_here",
"JINA_CONTEXT_TOKEN": "optional_context_token"
}
}
}
}See mcp_config_claude_desktop.json for a template.
Add to your Cursor MCP configuration (.cursor/mcp.json in your workspace):
{
"mcpServers": {
"tb": {
"command": "python",
"args": ["-m", "mcp_server"],
"cwd": "${workspaceFolder}",
"env": {
"JINA_API_KEY": "${env:JINA_API_KEY}",
"JINA_CONTEXT_TOKEN": "${env:JINA_CONTEXT_TOKEN}"
}
}
}
}See mcp_config_cursor.json for a template.
| Tool | Description | Parameters |
|---|---|---|
fetch_page |
Fetch a web page and return its text content via Jina Reader API | url (string, required) |
search_web |
Search the web and return results via Jina Search API | query (string, required) |
Once configured, AI agents can use the tools like:
User: "Fetch the content of https://example.com"
Agent: [calls fetch_page with url="https://example.com"]
User: "Search for 'python async best practices'"
Agent: [calls search_web with query="python async best practices"]
| Variable | Description | Required |
|---|---|---|
JINA_API_KEY |
API token for Jina Reader (preferred) | Yes |
JINA_TOKEN |
API token for Jina Reader (legacy, also supported) | Yes |
JINA_CONTEXT_TOKEN |
Context token (sent as X-Context) |
No |
An API key (JINA_API_KEY or JINA_TOKEN) is required. Requests without a token will fail.
- curl (pre‑installed on most systems, required)
- less or more (for paging, optional – use
--rawto bypass) - No other dependencies
- Python 3.10+
- mcp package (
pip install mcp) - httpx package (
pip install httpx)
- Linux/macOS:
sudo rm /usr/local/bin/tb - Windows: Delete
tb.batfrom your%USERPROFILE%\bin(or wherever you placed it) and remove that folder from yourPATHif desired. - MCP Server: Remove the server configuration from your AI client config.
| Problem | Solution |
|---|---|
curl: command not found |
Install curl (e.g., apt install curl / brew install curl) |
Error: Request failed |
Check your internet connection. If you provided a token, ensure it is valid. |
| No output or strange characters | Try --raw mode or check if the URL/search query is correct. |
| MCP server fails to start | Ensure Python 3.10+ is installed and run pip install -r requirements.txt |
| "JINA_API_KEY not set" warning | Set JINA_API_KEY in your environment or .env file for higher rate limits |
MIT © 2025 falcga
This tool is an unofficial third‑party client for the public Jina Reader API.
It respects the API's intended usage:
- No web scraping or automated extraction from jina.ai
- No reverse engineering or creation of competing services
- API tokens are optional and passed exactly as documented (
Authorization: Bearerheader) - The required
X-Engine: browserheader is always sent
For heavy or automated usage, please obtain your own free token from Jina AI Reader and respect their rate limits.
See Jina AI Terms and Privacy Policy for details.
- This tool uses the public Jina Reader API which is subject to Jina AI Terms of Service.
- Free tier usage may be limited to non-commercial purposes only. Review Jina's current terms before using in production or commercial contexts.
- Rate limits apply. Anonymous usage has stricter limits than authenticated requests.
- Do not create public proxies or services that bypass Jina's rate limits or terms.
- No hardcoded credentials: API keys are read only from environment variables or
.envfiles. - Local-only execution: The MCP server runs on your machine. No data is sent to third parties except Jina AI.
- No secret logging: The server never logs API keys or tokens.
- User-supplied keys: Each user must provide their own Jina API key.
- The MCP server is designed for local, single-user use only.
- Do not deploy as a public/shared service using your credentials.
- Each user/agent should run their own instance with their own API key.