Bellwether is an open-source testing tool designed to validate Model Context Protocol (MCP) servers by detecting breaking schema changes before they affect users. With CI/CD integration and LLM-powered behavioral exploration, it ensures reliable deployments and robust testing frameworks, all while being free to use.
Bellwether is an open-source testing tool specifically designed for Model Context Protocol (MCP) servers. This innovative tool helps detect breaking schema changes before they impact production environments, ensuring that AI workflows remain functional and reliable. With deterministic validation and optional large language model (LLM)-powered behavioral exploration, Bellwether seamlessly integrates into CI/CD pipelines, offering optimal support through GitHub Actions.
Model Context Protocol serves as the bridge for AI assistants, enabling connections to external tools that allow interactions such as reading files, querying databases, and calling APIs. Changes in the underlying tool schemas can often lead to silent failures in AI workflows, making early detection crucial.
CONTRACT.md documentation based on actual tool behavior, ensuring that documentation remains up-to-date and reflective of system capabilities.Embark on testing with Bellwether by executing simple commands directly in your CLI:
npm install -g @dotsetlabs/bellwether
bellwether init npx @mcp/your-server
bellwether check
This streamlined process eliminates the need for API keys and incurs no LLM costs, running efficiently in seconds.
Bellwether operates in two distinct modes:
check: Utilized for schema drift detection; this mode is free and should be run during every pull request to ensure the integrity of the schema.explore: Enables LLM-powered behavioral testing for thorough analysis. While this mode may incur LLM API costs, it provides deeper insights for local development.Integrating Bellwether into a CI/CD workflow is straightforward. Firstly, establish a baseline using the following commands:
bellwether init npx @mcp/your-server
bellwether check
bellwether baseline save
The generated baseline can then be included in CI checks to continuously ensure compliance with expected schema definitions:
# .github/workflows/bellwether.yml
name: MCP Drift Detection
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx @dotsetlabs/bellwether check --fail-on-drift
Bellwether is capable of identifying various types of changes, including:
delete_file.path to file_path.Some essential commands include:
bellwether init <server-command> # Create configuration
bellwether check # Detect schema drift
bellwether baseline save # Secure baseline state
bellwether baseline compare # Compare current state with baseline
For further assistance and enhanced usage of Bellwether, consult the following resources:
By implementing Bellwether, organizations can enhance their AI applications' resilience, ensuring that schema changes are detected and managed effectively, thus preserving the integrity of AI functionalities.
No comments yet.
Sign in to be the first to comment.