Skip to content

Conversation

@aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Jan 14, 2026

Summary

Adds server-level instructions to the PyAirbyte MCP server to support Claude's new tool search feature. When AI agents have many tools available, tool search helps them find the right tools by searching tool descriptions. The server instructions field provides high-level guidance about when to use this server's tools.

Background context:

Changes:

  • Added MCP_SERVER_INSTRUCTIONS constant in server.py describing the server's purpose and capabilities
  • Updated FastMCP constructor to pass instructions parameter

Review & Testing Checklist for Human

  • Review instruction text accuracy: Verify the description accurately covers the server's main capabilities (connector discovery, cloud deployment, sync management, local execution)
  • Check for missing capabilities: Are there important tools/features not mentioned in the instructions that agents should know about?

Suggested test plan: After merging, test with Claude Code or another MCP client that supports tool search to verify the server instructions are properly exposed and help with tool discovery.

Notes

This is part of a broader effort to add server instructions to all Airbyte MCP servers. The instruction text should be reviewed and refined by humans familiar with the server's capabilities.

Requested by: @aaronsteers
Devin session: https://app.devin.ai/sessions/5de868a97624482b9119920b7efb8612

Summary by CodeRabbit

  • New Features
    • The MCP server now embeds multi-line operational instructions at startup, so guidance is automatically applied during initialization. This improves consistency, clarifies server behavior for operators, and reduces the need for manual configuration or separate instruction handling.

✏️ Tip: You can customize this high-level summary in your review settings.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

Note

Auto-merge may have been disabled. Please check the PR status to confirm.

@devin-ai-integration
Copy link
Contributor

Original prompt from AJ Steers
SYSTEM:
=== BEGIN THREAD HISTORY (in #dev-mcp) ===
Pedro Lopez (U038J3BLW3C): FYI, Claude Code now enables the tool search by default, which will detect if you have too many tools and instead of including them all will first search for the right too to use, and decide whether to include it in the context <https://x.com/trq212/status/2011523109871108570>

For our MCP servers: not sure if we're getting to the point where the number of active tools gets to 10% of the context window, but if so may be worth checking that our descriptions are written such that toolsearch is able to find the right tools

Preview of a link: https://x.com/trq212/status/2011523109871108570
> # X (formerly Twitter)
> ## [Thariq (@trq212) on X](https://x.com/trq212/status/2011523109871108570)
> Tool Search now in Claude Code
> ATTACHMENT:"https://app.devin.ai/attachments/550d8c50-6446-458d-9ef8-56cd4543f15e/link_image"


Pedro Lopez (U038J3BLW3C): also this - not sure what the server instructions field is

ATTACHMENT:"https://app.devin.ai/attachments/e3944ca0-36e8-4c8e-96b2-7b80a84b90ff/Screenshot+2026-01-14+at+12.49.53%3FPM.png"

AJ Steers (U05AKF1BCC9): I was loosely following this spec as they were proposing it. Thanks for posting here.

AJ Steers (U05AKF1BCC9): Regarding server instructions - I think this is an optional field describing the server and how to use its tools. I'll kick off a devin session to see about adding it to our MCP servers now.

AJ Steers (U05AKF1BCC9): Hey, @Devin. :point_up: Check all our MCP servers and propose server instruction additions if needed. (Assuming our FastMCP versions support it.)

AJ Steers (U05AKF1BCC9): Hey, @Devin. :point_up: Check all our MCP servers and propose server instruction additions if needed. (Assuming our FastMCP versions support it.)
=== END THREAD HISTORY ===

Thread URL: https://airbytehq-team.slack.com/archives/C08FJ3X696Y/p1768423744532439?thread_ts=1768423744.532439&cid=C08FJ3X696Y

The latest message is the one right above that tagg... (7 chars truncated...)

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1768432632-add-server-instructions' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1768432632-add-server-instructions'

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

PyTest Results (Fast Tests Only, No Creds)

348 tests  ±0   348 ✅ ±0   5m 8s ⏱️ -19s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit b14d26c. ± Comparison against base commit a7588b3.

♻️ This comment has been updated with latest results.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

📝 Walkthrough

Walkthrough

A new constant MCP_SERVER_INSTRUCTIONS containing multi-line server instructions is introduced and passed to the FastMCP constructor via the new instructions parameter during initialization. wdyt?

Changes

Cohort / File(s) Summary
MCP Server Initialization
airbyte/mcp/server.py
Added new public constant MCP_SERVER_INSTRUCTIONS with multi-line instruction text and passed it to FastMCP constructor via the instructions parameter. No control flow modifications.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding MCP server instructions to support tool search functionality, which aligns directly with the primary modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1768432632-add-server-instructions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@airbyte/mcp/server.py`:
- Around line 31-37: Update the server description to remove the incorrect
"managing" claim and state that environment variables are only discoverable:
change the bullet "Listing and managing environment variables for connector
configuration" to "Listing environment variables for connector configuration"
(or similar), and ensure any mentions near list_dotenv_secrets() and
list_connector_config_secrets() reflect that these functions are read-only and
do not modify variables.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95cd51a and c924bcc.

📒 Files selected for processing (1)
  • airbyte/mcp/server.py
🧰 Additional context used
🧬 Code graph analysis (1)
airbyte/mcp/server.py (2)
airbyte/_util/meta.py (1)
  • set_mcp_mode (40-51)
airbyte/mcp/_util.py (1)
  • initialize_secrets (55-88)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (No Creds)
🔇 Additional comments (3)
airbyte/mcp/server.py (3)

17-25: Nice documentation block!

The explanatory comments with links to FastMCP docs and Claude tool search context are a nice touch for future maintainers. This makes it clear why this constant exists and how it's intended to be used.


45-49: Safety features are correctly implemented

Good thinking on double-checking! Both features are indeed implemented as described:

  • Safe mode uses AIRBYTE_CLOUD_MCP_SAFE_MODE (default enabled) to track GUIDs created in the current session via _GUIDS_CREATED_IN_SESSION, raising SafeModeError when attempting destructive operations on objects created outside the session.
  • Read-only mode uses AIRBYTE_CLOUD_MCP_READONLY_MODE to filter tool registration, allowing only read-only Cloud tools when enabled.

The descriptions are accurate. No changes needed!


54-54: Clean integration with FastMCP!

The change is spot-on — the instructions parameter is fully supported in FastMCP's constructor, so passing MCP_SERVER_INSTRUCTIONS here is exactly the right approach. This is a clean, minimal implementation that wires your server instructions into FastMCP as intended.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@aaronsteers aaronsteers enabled auto-merge (squash) January 14, 2026 23:27
@aaronsteers aaronsteers disabled auto-merge January 14, 2026 23:28
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@airbyte/mcp/server.py`:
- Around line 27-49: The instructions string MCP_SERVER_INSTRUCTIONS currently
uses the generic phrase "Managing custom connector definitions in Airbyte Cloud"
but the code only implements custom source definition operations
(publish_custom_source_definition, update_custom_source_definition,
permanently_delete_custom_source_definition); update the wording to explicitly
say "custom source connector definitions" or, if you intend to support
destinations, implement and reference equivalent functions for custom
destination definitions and then keep the generic phrasing. Ensure you change
the MCP_SERVER_INSTRUCTIONS text to reflect whichever path you choose.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c924bcc and a6334e1.

📒 Files selected for processing (1)
  • airbyte/mcp/server.py
🧰 Additional context used
🧬 Code graph analysis (1)
airbyte/mcp/server.py (2)
airbyte/_util/meta.py (1)
  • set_mcp_mode (40-51)
airbyte/mcp/_util.py (1)
  • initialize_secrets (55-88)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: update-description
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (No Creds)
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (2)
airbyte/mcp/server.py (2)

17-25: Nice documentation header!

This comment block provides excellent context for maintainers, explaining both the purpose of the instructions and linking to relevant documentation. This will help future contributors understand why this constant exists and how it's used in the MCP protocol. 👍


54-55: Clean integration with FastMCP constructor.

The instructions parameter is correctly passed to the FastMCP constructor. FastMCP >=2.11.3 fully supports this parameter for server metadata exposure, and the implementation looks solid.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

PyTest Results (Full)

418 tests  ±0   401 ✅ ±0   21m 56s ⏱️ - 3m 14s
  1 suites ±0    17 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit b14d26c. ± Comparison against base commit a7588b3.

♻️ This comment has been updated with latest results.

@aaronsteers aaronsteers enabled auto-merge (squash) January 15, 2026 00:30
@aaronsteers aaronsteers merged commit 4d74e16 into main Jan 15, 2026
23 checks passed
@aaronsteers aaronsteers deleted the devin/1768432632-add-server-instructions branch January 15, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants