Skip to content

feat: add Baizhi Agent Toolkit MCP integration - #599

Draft
ct-jaryn wants to merge 4 commits into
OpenHands:mainfrom
ct-jaryn:JarynAI/baizhi-mcp-catalog
Draft

ct-jaryn wants to merge 4 commits into
OpenHands:mainfrom
ct-jaryn:JarynAI/baizhi-mcp-catalog

Conversation

@ct-jaryn

@ct-jaryn ct-jaryn commented Sep 17, 2026 •

Copy link
Copy Markdown
  • A human has tested these changes.

Why

Make Baizhi Agent Toolkit discoverable through the existing OpenHands MCP integration catalog, with a fixed remote endpoint and the host's existing API-key input. This is a catalog contribution, not a new MCP client, local proxy, model provider, or application-specific implementation.

I maintain the Baizhi Cloud Agent Toolkit integrations and coordinate product operations, and am contributing through ct-jaryn on behalf of Baizhi Cloud. We would welcome your feedback on catalog suitability and ongoing compatibility.

Summary

  • Add one baizhi-agent-toolkit JSON entry using Streamable HTTP (shttp) and required bearer authentication, with console/docs links and account, credit, and tool-scope guidance.
  • Regenerate the shared JavaScript catalog index after merging current main, preserving its Granola entry; Python consumes the same JSON source.
  • Use the shared catalog schema and package validation; no provider-specific mirror test is added.

Issue Number

Refs #598. Please triage the request under the repository's enhancement/readiness process. This PR remains a draft; submission is not a claim that the issue has received maintainer approval or the ready-for-dev label.

The readiness bot reports that the issue needs its enhancement classification. My account cannot add that label (AddLabelsToLabelable permission denied), so maintainer triage is needed; the local body check passes when evaluated as an enhancement.

How to Test

From this branch, using the repository's documented test environment:

npm run build:integrations
uv sync --group test
uv run pytest -q tests/test_catalogs.py tests/test_catalog_schema.py tests/test_integration_catalog_in_sync.py

Revalidated after merging current upstream main@76bbae25b6bb4ab6dd1623617e4d373c199df58f into PR head 6fe09cb0c5142dbf94c7d9584bd2f67a64803afd (2026-09-23):

  • Catalog generation and all 118 tests in those three modules, using Node.js 24.21.0 and an existing isolated Python 3.12.14 environment with pytest 8.4.2, Pydantic 2.13.5, and jsonschema 4.26.0. uv was not available locally; the uv setup above is the repository's reproduction route, not a command claimed to have been run.
  • Explicit Baizhi lookup through the JavaScript and Python APIs: included by the MCP filter and excluded by the OAuth-only filter.
  • Independent read-only review and byte-for-byte generated-index verification.
  • 7 isolated React component behavior groups passed using the unchanged install modal and its option-selection/secret-saving helpers from the fixed Agent Canvas revision below. Source Git blobs were verified; React 19.2.8 matches that revision. Checks cover password/required/fixed-URL properties, no automatic submission, cancellation, blank and whitespace-only rejection, trimmed Bearer payload, fixed-URL defense, test/save failures, fresh-mount state, and no extra Secrets copy. Visual primitives, translations, network/storage mutations, and backend context are test doubles; this is not browser or persistence acceptance testing. Only synthetic values were used, with no network requests. react-test-renderer is deprecated and Node's VM module support is experimental; these harness limitations remain disclosed.

For the installation check, use a supported Agent Canvas development build consuming this catalog revision:

  1. Select Baizhi Agent Toolkit in the MCP catalog. Follow the console link to obtain a personal key; do not put a real key in screenshots, logs, configuration examples, or review comments.
  2. Confirm the endpoint is fixed, the key field is masked, and blank input cannot install the server. Cancel once and confirm existing server settings remain unchanged.
  3. Enter only the key, without Bearer, and explicitly install. Confirm successful discovery on the actual backend, then inspect the tool list before use. A Cloud-side synthetic success result is not connection evidence.
  4. Review all discovered capabilities and costs. This entry does not constrain the server to three tools; any tool invocation is separate from discovery and can consume service credits.
  5. Verify reload, key replacement, authentication failure, and removal. Revoke the test key in the Baizhi console afterward; deleting a local connection is not provider-side revocation.

The install-modal source was reviewed at OpenHands/OpenHands@9737f713616a1e452f822c2967f0e2c8bf2dc308: it provides a password field, required-key validation, fixed-URL handling, and explicit submission for this catalog shape. The complete Agent Canvas UI flow, credential persistence, production MCP connection, and tool execution have not been run for this contribution. No real API key, model request, or paid tool was used. The full repository test suite was not run.

Video/Screenshots

Not supplied: the UI acceptance checks above are still pending. The human-test checkbox is intentionally unchecked.

Notes

Baizhi is a hosted commercial service requiring each user's own account and API key. Tool inputs are sent to the hosted service; users should review their data-handling requirements and service costs before connecting. The linked integration repository publishes configuration, documentation, and tests, not the hosted backend source.

The entry does not set a popularity rank, enable tools for existing users, add automatic approval, or duplicate the credential into an automation secret. The existing host owns credential persistence; this PR does not claim that a masked field proves a particular encryption or storage guarantee.

Landing in this repository is distinct from publishing a package and an Agent Canvas release consuming it. We are happy to maintain the entry and complete compatibility checks with reviewers. This proposal does not imply OpenHands endorsement or an established partnership.

AGENT:

Review follow-up (2026-10-08): merged current main d008b81c44ae4d56d319e3b8f28ca35fc40aacbc normally and removed the field-by-field Baizhi test, as requested. Final head bea2aed8d518466b20f611fb380d03c9d702e690 differs from that main only in the hand-authored integration JSON and its generated JS index. The JSON is unchanged from the entry used in the earlier runtime evidence.

npm run build:integrations, the three catalog test modules above (117 passed), python scripts/sync_extensions.py --check, and diff checks pass on this final tree (Python 3.12.14, pytest 9.1.1, Pydantic 2.13.5, jsonschema 4.26.0; installed SDK 1.53.0). These are local results, not fork CI authorization.

Earlier, on 2026-10-01, I exercised the exact entry through released Canvas 1.24.0, TypeScript SDK 1.49.6, and Agent Server 1.50.1 in an isolated actual browser/backend round trip: empty/401, install/reload, masked credential retention, credential replacement and deletion. MCP network responses were synthetic, with zero model or tools/call requests; stored values were synthetic and services were stopped. This does not verify today's production endpoint. The upstream documentation names /mcp with Bearer authentication; I have not made an authenticated production MCP request. Unauthenticated HEAD/GET alone do not establish Streamable HTTP behavior.

This remains Draft, awaiting a maintainer decision on fit and #598 triage/readiness, authorized fork checks, and the human author's current-template HUMAN note. I have not filled or checked any human declaration.

@github-actions github-actions Bot added the type: feat A new feature label Sep 17, 2026

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm an AI agent (Claude Code, based on Opus 5.5) helping Engel Nyst (@enyst) with project work.

This is a draft, so I'm leaving a comment only. The catalog mechanics are fine, but the issue needs triage and a maintainer decision before this can go further.

  1. Triage. #598 has no labels, so the description gate will fail once this PR is ready for review. A maintainer needs to decide on the request first. The PR template has also changed since you opened this PR (#698), so the description now needs HUMAN: and AGENT: sections.
  2. Fit (maintainer decision). This is a paid, credit-based hosted search/scrape service. Its docs repo (chaitin/baizhi-agent-toolkit, created 2026-09-16) is only in Chinese, and it overlaps existing search/scrape entries (Brave, Exa, Tavily, Firecrawl). I'd like a maintainer to weigh in before more work goes into this.
  3. Endpoint not verified. The upstream README documents https://agent-toolkit.app.baizhi.cloud/mcp with Authorization: Bearer, which matches the entry. Unauthenticated HEAD and GET requests to that path return 404, with no 401/405 and no auth challenge. I didn't send MCP requests, so please confirm this path is the Streamable HTTP endpoint as it is served today.
  4. Test (tests/test_catalogs.py#L205). The new test restates the JSON field by field, including exact strings from notes and credentialHelp. That means any later copy edit to the entry also needs a test change, which works against the AGENTS.md rule that an integration is one JSON file. The schema tests already cover the entry, so consider dropping this test or reducing it to a single behavioural assertion.

Checked:

  • The JSON validates against main's schema, and catalog-index.js matches the build script's output. The PR merges cleanly, and main's catalog tests pass with the entry (117).
  • The app and docs URLs return 200.
  • The required test, sync-extensions and validate-claude-code checks haven't run on this fork head.

@ct-jaryn

ct-jaryn commented Oct 8, 2026

Copy link
Copy Markdown
Author

Removed the provider-specific mirror test and normally merged current main in bea2aed8. The final contribution is now just one catalog JSON plus the generated index; 117 shared catalog/schema/in-sync tests and the sync check pass. I updated the AGENT evidence in the description, retaining the historical test dates.

The earlier actual browser/backend tests used synthetic MCP responses; I cannot claim a current authenticated production endpoint check. I am keeping this Draft pending the maintainer fit/readiness decision and the human author's HUMAN section. No live service/model calls or human declarations were made. AI-assisted follow-up.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants