Command-line interface for running tests, managing test cases, and integrating with CI/CD pipelines.
npm install -g probefishOr run directly with npx:
npx probefish --helpGenerate a Personal Access Token from the web UI:
- Go to Settings → Access Tokens
- Create a token with required scopes
- Copy the token (starts with
pf_)
# Set your token
probefish auth token <your-token>
# Set API URL (required for self-hosted)
probefish config set api.baseUrl https://your-instance.com/apiprobefish auth statusprobefish auth token <token> # Set API token
probefish auth logout # Clear stored token
probefish auth status # Check authentication statusprobefish config set <key> <value> # Set config value
probefish config get <key> # Get config value
probefish config list # List all configConfig keys:
api.baseUrl- API endpoint URLoutput.format- Default output format (table/json)output.color- Enable colors (true/false)
# List projects
probefish list projects
# List test suites in a project
probefish list suites -p <project-id>
# List test runs for a suite
probefish list runs -p <project-id> -s <suite-id>
# List test cases in a suite
probefish list test-cases -p <project-id> -s <suite-id>Options:
-p, --project <id>- Project ID-s, --suite <id>- Test suite ID--format <format>- Output format (table/json)--limit <n>- Limit results
probefish run <suite-id> -p <project-id>Options:
-p, --project <id>- Project ID (required)-n, --iterations <n>- Run N times (default: 1)-m, --model <model>- Override model (e.g.,openai:gpt-4o)--note <note>- Add note to test run-o, --output <format>- Output format (table/json/junit)--output-file <path>- Write results to file-q, --quiet- Minimal output
Exit codes:
0- All tests passed1- Some tests failed2- Error (auth, network, etc.)
probefish export <suite-id> -p <project-id>Options:
-p, --project <id>- Project ID (required)-f, --format <format>- Export format (json/junit/csv)-o, --output <path>- Output file path
# Add a test case
probefish add test-case -p <project-id> -s <suite-id> \
-n "Test name" \
-i '{"variable": "value"}' \
-e "Expected output"Options:
-p, --project <id>- Project ID (required)-s, --suite <id>- Test suite ID (required)-n, --name <name>- Test case name (required)-i, --inputs <json>- Input variables as JSON-e, --expected <output>- Expected output--notes <notes>- Notes-t, --tags <tags>- Comma-separated tags-f, --file <path>- Read from JSON file--stdin- Read from stdin
# Update a test case
probefish update test-case <test-case-id> -p <project-id> -s <suite-id> \
-n "New name" \
--enableOptions:
-p, --project <id>- Project ID (required)-s, --suite <id>- Test suite ID (required)-n, --name <name>- New name-i, --inputs <json>- New inputs-e, --expected <output>- New expected output--notes <notes>- New notes-t, --tags <tags>- New tags--enable- Enable test case--disable- Disable test case-f, --file <path>- Read updates from JSON file--stdin- Read updates from stdin
# Delete a test case
probefish delete test-case <test-case-id> -p <project-id> -s <suite-id>Options:
-p, --project <id>- Project ID (required)-s, --suite <id>- Test suite ID (required)-y, --yes- Skip confirmation
probefish mcp serve # Start MCP server (stdio mode)
probefish mcp serve --http # Start HTTP server for remote access
probefish mcp serve --http -p 8080 # Custom port
probefish mcp serve --http --no-auth # Disable auth (not recommended)
probefish mcp info # Show configuration infoOptions:
--http- Run as HTTP server instead of stdio-p, --port <number>- HTTP server port (default: 3001)--no-auth- Disable authentication for HTTP mode (not recommended)
name: LLM Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install -g probefish
- run: probefish auth token ${{ secrets.PROBEFISH_TOKEN }}
- run: probefish config set api.baseUrl ${{ vars.PROBEFISH_URL }}
- run: probefish run ${{ vars.TEST_SUITE_ID }} -p ${{ vars.PROJECT_ID }} -o junit --output-file results.xml
- uses: dorny/test-reporter@v1
if: always()
with:
name: Probefish Tests
path: results.xml
reporter: java-junitllm-tests:
image: node:20
script:
- npm install -g probefish
- probefish auth token $PROBEFISH_TOKEN
- probefish config set api.baseUrl $PROBEFISH_URL
- probefish run $TEST_SUITE_ID -p $PROJECT_ID -o junit --output-file results.xml
artifacts:
reports:
junit: results.xmlThe CLI supports environment variables as an alternative to config:
PROBEFISH_TOKEN- API tokenPROBEFISH_BASE_URL- API base URL
The MCP (Model Context Protocol) server allows AI assistants to interact with Probefish directly. Your AI assistant can run tests, manage test cases, and analyze results.
MCP is an open protocol developed by Anthropic that enables AI assistants to connect to external tools and data sources. With Probefish MCP, you can ask your AI assistant to:
- "Run the test suite for my checkout prompt"
- "Add a test case for edge case handling"
- "Show me the results from the last test run"
- "Export test results as JUnit XML"
Before setting up MCP, ensure the CLI is configured:
# Install globally
npm install -g probefish
# Configure authentication
probefish auth token <your-token>
probefish config set api.baseUrl https://your-instance.com/api
# Verify setup
probefish mcp infoCreate a .mcp.json file in your project root:
{
"mcpServers": {
"probefish": {
"command": "probefish",
"args": ["mcp", "serve"]
}
}
}Or add to your global Claude Code settings (~/.claude/settings.json):
{
"mcpServers": {
"probefish": {
"command": "probefish",
"args": ["mcp", "serve"]
}
}
}Restart Claude Code after adding the configuration.
- Open Cursor Settings (Cmd/Ctrl + ,)
- Search for "MCP" or navigate to Features → MCP Servers
- Add a new MCP server with:
- Name:
probefish - Command:
probefish - Arguments:
mcp serve
- Name:
Or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"probefish": {
"command": "probefish",
"args": ["mcp", "serve"]
}
}
}For any MCP-compatible client, use stdio transport:
{
"mcpServers": {
"probefish": {
"command": "probefish",
"args": ["mcp", "serve"],
"transport": "stdio"
}
}
}If probefish is not installed globally, use npx:
{
"mcpServers": {
"probefish": {
"command": "npx",
"args": ["probefish", "mcp", "serve"]
}
}
}| Tool | Description |
|---|---|
probefish_list_projects |
List all accessible projects |
probefish_list_suites |
List test suites in a project |
probefish_get_suite |
Get test suite details with test cases |
probefish_list_test_cases |
List all test cases in a suite |
probefish_run_suite |
Run a test suite and get results |
probefish_list_runs |
List historical test runs |
probefish_export |
Export test data (json/junit/csv) |
probefish_add_test_case |
Create a new test case |
probefish_update_test_case |
Modify an existing test case |
probefish_delete_test_case |
Remove a test case |
Once configured, you can use natural language:
"List my Probefish projects"
"Run the test suite abc123 in project xyz789"
"Add a test case to suite abc123 with name 'Empty input handling'
and input variable query set to empty string"
"Show me the last 5 test runs for suite abc123"
"Export the test suite as JUnit XML"
Server not connecting:
# Check CLI is working
probefish mcp info
# Verify auth
probefish auth statusPermission errors: Ensure your token has the required scopes:
projects:read- List projectstest-suites:read- List/view suites and test casestest-suites:write- Create/update/delete test casestest-runs:execute- Run test suitesexports:read- Export data
For remote access or web-based MCP clients, you can run the MCP server in HTTP mode using the Streamable HTTP transport.
# Start on default port 3001
probefish mcp serve --http
# Start on custom port
probefish mcp serve --http --port 8080The server outputs connection info:
Probefish MCP Server (HTTP mode)
Endpoint: http://localhost:3001
Auth: Bearer token validated against API
By default, HTTP mode validates Bearer tokens against the Probefish API. Use any valid Probefish API token:
Authorization: Bearer pf_your_token_here
Tokens are validated by making a request to the Probefish API and cached for 5 minutes for performance.
Disabling Authentication (Not Recommended):
For local development or trusted networks only, you can disable authentication:
probefish mcp serve --http --no-authWhen disabled, the server accepts all requests without authentication.
Use the claude mcp add command to connect to the remote HTTP server:
claude mcp add --transport http probefish http://your-server:3001 \
--header "Authorization: Bearer <your-probefish-token>"Or use the interactive menu:
claude mcp add
# Select "http" transport, enter URL and headersFor other MCP clients that support Streamable HTTP transport, add to your config:
{
"mcpServers": {
"probefish": {
"type": "streamableHttp",
"url": "http://your-server:3001",
"headers": {
"Authorization": "Bearer <your-probefish-token>"
}
}
}
}# List available tools
curl -X POST http://localhost:3001 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Call a tool
curl -X POST http://localhost:3001 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"probefish_list_projects","arguments":{}},"id":2}'The HTTP server binds to localhost by default. For remote access:
Option 1: Reverse Proxy (Recommended for production)
Use nginx, Caddy, or similar to proxy requests with TLS:
# nginx example
location /mcp {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}Option 2: SSH Tunnel (Development/testing)
From your client machine:
ssh -L 3001:localhost:3001 user@your-server.comThen connect to http://localhost:3001 locally.
| Aspect | Stdio Mode | HTTP Mode |
|---|---|---|
| Use case | Local AI assistants | Remote clients, web apps |
| Connection | Process pipes | HTTP/SSE |
| Auth | Uses CLI config | Bearer token per request |
| Concurrency | Single client | Multiple clients |
| Command | probefish mcp serve |
probefish mcp serve --http |
Human-readable tabular output with colors.
Machine-readable JSON output. Automatically used when piping to other commands.
For CI/CD integration. Use --output junit or -o junit.
# List all projects
probefish list projects
# Run a test suite
probefish run 507f1f77bcf86cd799439011 -p 507f1f77bcf86cd799439012
# Run with model override
probefish run <suite-id> -p <project-id> -m openai:gpt-4o
# Export as JUnit XML
probefish export <suite-id> -p <project-id> -f junit -o results.xml
# Add test case from stdin
echo '{"name": "Test", "inputs": {"query": "Hello"}}' | probefish add test-case -p <project-id> -s <suite-id> --stdin
# Batch add test cases from file
probefish add test-case -p <project-id> -s <suite-id> -f test-cases.json