This is a Model Context Protocol (MCP) server for querying bunsen test suite databases and bugzilla, buildbot, and patchwork data on sourceware.org.
To use it, configure an MCP client (such as an MCP-enabled IDE or AI assistant) to connect to this server endpoint via HTTP.
Available Tools
overview: Return a usage guide for this bunsen MCP server.
Read this first. It explains the core concepts (testruns keyed by testrun commit
hashes, metadata, source access), the recommended query workflow,
and the critical distinction between testrun tools and source tools.
Note the most important rule: tools named show_upstream_*/list_upstream_*/
upstream_git_grep take a git commitish (branch/tag/commit hash) as
their `commitish` argument, NOT a testrun commit hash.
date_time: Return the current date and time in ISO-8601 format.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
get_upstream_url: Return a clickable web URL for an upstream repository, commit, branch, or file.
Use this to turn raw hashes and filenames into clickable links for the user.
Examples for url_type:
- "gitweb": Main repository page (param/param2 ignored)
- "gitwebcommit": A specific commit (param = commit hash)
- "gitwebbranch": A specific branch/tag (param = branch/tag name)
- "gitwebfile": A specific file at a commit (param = commit hash, param2 = filename)
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
url_type: The type of URL to generate ("gitweb", "gitwebcommit", "gitwebbranch", "gitwebfile").
param: Optional parameter for the URL (e.g. commit hash or branch name).
param2: Optional second parameter for the URL (e.g. filename for gitwebfile).
get_testrun_url: Return a clickable web URL for a testrun in the bunsen web UI.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
list_metadata_keys: List the metadata keys that are generally available for
testruns. source.* ones refer to upstream repository and git
commit. source.gitrepo.canon is a good way to identify the
upstream project. The others generally relate to the testrun
itself.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
list_metadata_values: Return the distinct values for a given metadata key (optionally
filtered by glob). Useful to discover what upstream gitrepos or
other attributes have been registered via toy testruns.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
metadata_key: The metadata key whose distinct values to list.
metadata_value_glob: Glob pattern to filter which values are returned.
limit: Maximum number of distinct values to return.
show_testrun_metadata: Fetch all metadata key/value pairs for a given testrun, with keys matching given basic glob.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
metadata_key_glob: Simple glob pattern to match metadata keys (use * and ? wildcards).
find_testruns: Return the list of testruns that have the given metadata key
and a value matching the given basic-glob. Sort (ASC/DESC) in a sequence
by another metadata value. There may be many testruns, so offset &
limit are passed to SQL SELECT for paging. If metadata2_key is
provided, an additional conjunctive (AND) filter is applied.
The optional metadata_value_min / metadata_value_max parameters apply
range filters (value >= min, value <= max) on the primary metadata_key.
Returns a dictionary mapping testrun commit hashes to dictionaries
of metadata key/value pairs.
Example: find_testruns(metadata_key="source.gitrepo", metadata_value_glob="*gcc*") returns
testruns for GCC-related upstream repos, keyed by their commit hash. Pass one of those
commit hashes as the `testrun` argument to the show_testrun_* / list_testrun_* tools.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
metadata_key: The metadata key to search for.
metadata_value_glob: Glob pattern to match metadata values.
metadata_value_min: Optional minimum value (inclusive) for the primary metadata_key value.
metadata_value_max: Optional maximum value (inclusive) for the primary metadata_key value.
metadata_key_sort: Metadata key to sort results by (order controlled by metadata_key_sort_order).
metadata_key_sort_order: Sort order for metadata_key_sort: "ASC" or "DESC".
limit: Maximum number of results to return.
offset: Number of results to skip for paging.
metadata2_key: Optional second metadata key to search for.
metadata2_value_glob: Optional glob pattern to match second metadata values.
return_metadata_keys: Optional list of additional metadata keys to return values for.
list_testrun_testcases: Return a list of test cases for the given testrun. Test groups are
directories or dejagnu '.exp' files. Individual test cases have
results like 'PASS'. Use simple glob patterns only. There may be
many testruns, so offset & limit are passed to SQL SELECT for
paging.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
test_family: The test suite family.
test_group_glob: Simple glob pattern to match test groups (use * and ? wildcards).
test_case_glob: Simple glob pattern to match test cases (use * and ? wildcards).
test_result: Filter by specific test result.
limit: Maximum number of results to return.
offset: Number of results to skip for paging.
list_testrun_diffs: Return a list of test cases for which the given two testruns
have differing results. Use simple glob patterns only. If outer
is True, includes cases missing from either testrun (filter for
these specifically by passing 'NULL' to test_result1 or
test_result2). If regressions_only is True, only show cases where
testrun1 result is PASS/XFAIL/KFAIL and testrun2 result differs.
Suffix parameters may be used to align test groups from different
dejagnu target-boards (e.g. suffix1=" [unix]" suffix2=" [unix/m32]").
There may be many differences, so limit, offset, and count_only
parameters are provided for paging.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun1: The git commit hash identifying the first testrun.
testrun2: The git commit hash identifying the second testrun.
test_family: The test suite family.
test_group_glob: Simple glob pattern to match test groups (use * and ? wildcards).
test_case_glob: Simple glob pattern to match test cases (use * and ? wildcards).
test_result1: Filter by specific test result for testrun1. Use "NULL" (with outer=True) to match tests missing from testrun1.
test_result2: Filter by specific test result for testrun2. Use "NULL" (with outer=True) to match tests missing from testrun2.
outer: If True, include test cases that are present in only one of the testruns (missing or newly arrived).
regressions_only: If True, only show regressions.
test_group_suffix1: Optional suffix to trim from testrun1 test_group strings (e.g. " [unix]").
test_group_suffix2: Optional suffix to trim from testrun2 test_group strings (e.g. " [unix/debug]").
limit: Maximum number of results to return.
offset: Number of results to skip for paging.
count_only: If True, return only the total number of differences found.
show_testrun_testcase_log: Return the segment of the detailed test log file related to the given test case.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
test_family: The test suite family.
test_group: The test group name.
test_case: The test case name.
list_testrun_files: Return the complete file list and their sizes from the given testrun, optionally filtered by include_regex and exclude_regex Python regular expression patterns.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
include_regex: Python regular expression to filter filenames.
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching filenames (like grep -v).
show_testrun_file: Return parts of a file from the given testrun.
Pipeline: (1) slice input by startline/numlines, (2) filter with include_regex/exclude_regex/ignorecase, (3) return at most maxhits hits with context_lines.
Prefer this tool over sourceware_bb_get_log when examining test or build logs, as this provides the full, high-fidelity raw data.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
testrun: The git commit hash identifying the testrun.
filename: The path to the file in the testrun.
include_regex: Python regular expression to keep matching lines (None means match all).
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching lines (like grep -v).
startline: 1-based starting line of the input slice (negative counts from end). Applied before regex filtering.
numlines: Number of input lines to include from startline before regex filtering. <=0 means through EOF.
maxhits: Maximum number of regex hits to return (context_lines around each hit are extra). <=0 means no cap.
context_lines: Number of context lines to include around matched lines.
show_upstream_commit: Return the full patch/diff for a git commitish from the given upstream repo.
IMPORTANT: `commitish` is an upstream git commitish (branch/tag/hash), NOT a
testrun id from find_testruns. If you only have a testrun commit hash, it must
be a real git object in `gitrepo` to resolve.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
show_upstream_file: Return parts of a file from a commitish from the given upstream repo.
Pipeline: (1) slice input by startline/numlines, (2) filter with include_regex/exclude_regex/ignorecase, (3) return at most maxhits hits with context_lines.
IMPORTANT: `commitish` is an upstream git commitish (branch/tag/hash), NOT a
testrun id. If you have a testrun commit hash, it resolves only if it is a real
git object in `gitrepo`.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
filename: The path to the file in the repository.
include_regex: Python regular expression to keep matching lines (None means match all).
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching lines (like grep -v).
startline: 1-based starting line of the input slice (negative counts from end). Applied before regex filtering.
numlines: Number of input lines to include from startline before regex filtering. <=0 means through EOF.
maxhits: Maximum number of regex hits to return (context_lines around each hit are extra). <=0 means no cap.
context_lines: Number of context lines to include around matched lines.
list_upstream_files: Return the complete file list and their sizes from a commitish from the given upstream repo, optionally filtered by include_regex and exclude_regex Python regular expression patterns.
IMPORTANT: `commitish` is an upstream git commitish (branch/tag/hash), NOT a testrun id.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
include_regex: Python regular expression to filter filenames.
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching filenames (like grep -v).
list_upstream_commits: List the upstream git commits for the given repository.
Returns a list of commits that are ancestors of the given commitish,
starting from the commitish itself and going backwards in history.
Optionally filtered by author, path, or search terms.
Note that provided filters (`author_filter`, `path_filter`, `message_filter`, `patch_filter`) are applied conjunctively (logical AND).
Use multiple queries for OR. Example: To find commits where the message OR the patch mentions `CVE-2026-1234`, call once
with `message_filter="CVE-2026-1234"` and once with `patch_filter="CVE-2026-1234"`, then union the returned commits.
IMPORTANT: `commitish` is an upstream git commitish (branch/tag/hash), NOT a testrun id.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
limit: Maximum number of commits to return.
subject_only: If True, return only commit subjects; if False, full messages.
author_filter: Optional author name or email to filter commits by.
path_filter: Optional path to filter commits (passed as -- PATH to git log).
message_filter: Optional string to search for in commit messages (git log --grep). Set subject_only=False to see the matching text in the returned message field.
patch_filter: Optional string to search for in commit patches (git log -S).
upstream_git_grep: Run git grep on an upstream repository.
IMPORTANT: `commitish` is an upstream git commitish (branch/tag/hash), NOT a testrun id.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
regex: The extended regular expression to search for (uses git grep -E).
ignorecase: Whether to ignore case in regex matching.
pathspec: Optional pathspec to filter files (e.g. *.c, src/).
list_upstream_refs: Run git for-each-ref on an upstream repository to list branches, tags, etc.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
pattern: Optional pattern for refs (e.g. heads/*, tags/*, or refs/heads/*). Shorthand forms are automatically prefixed with refs/.
since: Only include refs whose tip is a commit younger than this timestamp (ISO-8601 or unix timestamp).
list_upstream_commit_contains: List branches and tags that contain the given commitish in an upstream repository.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
gitrepo: The upstream git repository URL or path.
commitish: The git commitish (hash, branch, tag, etc.).
sourceware_bb_get_builders: Enumerate Sourceware buildbot builders.
name: optional filter by builder name (simple substring search, do not use SQL wildcards like '%').
tag: optional filter by builder tag (e.g. 'systemtap', 'elfutils').
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
offset:
limit:
name:
tag:
sourceware_bb_get_builds: Enumerate Sourceware buildbot builds for a given builder. Provide either builderid or buildername. Returns a succinct list of builds, exposing `buildid` which can be used to query steps.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
builderid:
buildername:
offset:
limit:
sourceware_bb_get_active_builds: Enumerate currently active (incomplete) Sourceware buildbot builds.
If builderid or buildername is provided, only active builds for that builder are returned. Returns a succinct list including `buildid` which can be used to query steps.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
builderid:
buildername:
offset:
limit:
sourceware_bb_get_steps: Enumerate Sourceware buildbot steps for a given buildid.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
buildid:
offset:
limit:
sourceware_bb_get_log: Return parts of a Sourceware Buildbot log.
Pipeline: (1) slice input by startline/numlines, (2) filter with include_regex/exclude_regex/ignorecase, (3) return at most maxhits hits with context_lines.
Note: Log lines are prefixed with their stream channel source character ('h' for header metadata, 'o' for stdout, 'e' for stderr, 'i' for input).
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
stepid: Buildbot step ID to fetch logs for.
logname: Log name to fetch (default "stdio").
include_regex: Python regular expression to keep matching lines (None means match all).
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching lines (like grep -v).
startline: 1-based starting line of the input slice (negative counts from end). Applied before regex filtering.
numlines: Number of input lines to include from startline before regex filtering. <=0 means through EOF.
maxhits: Maximum number of regex hits to return (context_lines around each hit are extra). <=0 means no cap.
context_lines: Number of context lines to include around matched lines.
sourceware_bb_get_workers: Enumerate Sourceware buildbot workers (actual server machines).
By default, only workers configured with at least one builder are returned.
Set all_workers=True to return all workers, including inactive/unconfigured ones.
Optionally filter by name using a glob pattern.
Returns worker names, workerinfo structs, and list of configured builders.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
name_glob: Simple glob pattern to match worker names (use * and ? wildcards).
all_workers:
sourceware_bz_search: Search for bugs in a Bugzilla instance.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
status: filter by bug status (e.g. ['NEW', 'RESOLVED'])
instance: Bugzilla instance to query
product: optional filter by product name
component: optional filter by component name
summary: optional filter by substring in the summary
chfield: optional field to track changes for. '[Bug creation]' filters by creation time, 'bug_status' filters by status change time.
chfieldfrom: optional start time for chfield filter (e.g. '2026-06-01')
chfieldto: optional end time for chfield filter (e.g. 'Now')
limit: maximum number of bugs to return
offset: pagination offset
order: optional sort field
order_desc: if true, sort in descending order (only applies if order is set)
sourceware_bz_get_bug: Retrieve detailed information about a specific bug, including comment and attachment counts.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
bugid: the numeric bug ID
instance: Bugzilla instance to query
all_fields: if true, fetch all available fields for the bug
sourceware_bz_get_comments: Retrieve comments for a specific bug.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
bugid: the numeric bug ID
instance: Bugzilla instance to query
sourceware_bz_list_attachments: List metadata for attachments of a specific bug.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
bugid: the numeric bug ID
instance: Bugzilla instance to query
sourceware_bz_get_attachment: Retrieve a specific attachment by ID, with optional text filtering.
Pipeline: (1) slice input by startline/numlines, (2) filter with include_regex/exclude_regex/ignorecase, (3) return at most maxhits hits with context_lines.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
attachment_id: the numeric attachment ID
instance: Bugzilla instance to query
include_regex: Python regular expression to keep matching lines (None means match all).
ignorecase: Whether to ignore case in regex matching.
exclude_regex: Python regular expression to filter out matching lines (like grep -v).
startline: 1-based starting line of the input slice (negative counts from end). Applied before regex filtering.
numlines: Number of input lines to include from startline before regex filtering. <=0 means through EOF.
maxhits: Maximum number of regex hits to return (context_lines around each hit are extra). <=0 means no cap.
context_lines: Number of context lines to include around matched lines.
sourceware_pw_get_patches: Search and retrieve a list of patches from the Sourceware Patchwork instance.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
project: Optional filter by project name, link_name, or ID (e.g., 'glibc', 'gcc', '6').
state: Optional filter by patch state or list of states. If not specified, defaults to ['new', 'under-review', 'rfc'] to return active patches. Supported states: 'new', 'under-review', 'rfc', 'changes-requested', 'deferred', 'committed', 'accepted', 'rejected', 'superseded', 'not-applicable'. Pass 'all' to disable filtering and fetch patches in any state.
msgid: Optional filter by exact Message-ID.
submitter: Optional filter by submitter email address (e.g., 'siddhesh@redhat.com').
q: Optional general search query (searches title/content of patches).
since: Optional ISO-8601 timestamp (e.g., '2026-07-01T00:00:00') to filter patches submitted after this date.
page: Page number to retrieve.
per_page: Number of results per page (sensible default is 30).
sourceware_pw_get_events: Retrieve a list of events from the Sourceware Patchwork instance.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.
project: Optional filter by project name, link_name, or ID.
since: Optional ISO-8601 timestamp to filter events after this date.
until: Optional ISO-8601 timestamp to filter events before this date.
page: Page number to retrieve.
per_page: Number of results per page (sensible default is 30).
sourceware_pw_get_patch: Retrieve the content and diff of a specific patch by ID.
For the full usage guide (concepts, query workflow, testrun-vs-commitish distinction), call the `overview` tool or read resource `bunsen://overview`.