Skip to content

Conversation

JackYPCOnline
Copy link

Use llm.txt for doc reference. rewrite this pr to include search doc based on frequency and relevance & fetch doc from uri.

Example:

from mcp import stdio_client, StdioServerParameters
from strands import Agent
from strands.tools.mcp import MCPClient


stdio_mcp_client = MCPClient(lambda: stdio_client(
    StdioServerParameters(
        command="python",
        args=["-m", "strands_mcp_server"],
    )
))

with stdio_mcp_client:

    tools = stdio_mcp_client.list_tools_sync()
    print(f"Found {len(tools)} tools: {[tool.tool_name for tool in tools]}")

    agent = Agent(
        tools=tools,
        model="anthropic.claude-3-5-sonnet-20241022-v2:0"
    )

    result = agent("tell me about agent to agent")

#Response:

[08/19/25 10:56:07] INFO     Processing request of type ListToolsRequest                                                                                                                                                                                                                                    server.py:624
Found 2 tools: ['search_docs', 'fetch_doc']
I'll search the documentation for information about agent to agent communication or interactions.
Tool #1: search_docs
[08/19/25 10:56:10] INFO     Processing request of type CallToolRequest                                                                                                                                                                                                                                     server.py:624
Let me fetch the full content of the Agent2Agent (A2A) documentation to provide more detailed information.
Tool #2: fetch_doc
[08/19/25 10:56:13] INFO     Processing request of type CallToolRequest                                                                                                                                                                                                                                     server.py:624
Based on the documentation, I can provide a comprehensive overview of Agent-to-Agent (A2A) functionality:

Agent-to-Agent (A2A) is an open standard protocol that enables seamless communication between AI agents across different platforms and implementations. Here are the key aspects: ....................

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Jack Yuan added 2 commits August 19, 2025 10:53
@JackYPCOnline JackYPCOnline requested a review from a team as a code owner August 19, 2025 15:00
@JackYPCOnline
Copy link
Author

persist-credentials: false
- uses: actions/checkout@v4
with:
persist-credentials: false
Copy link
Author

Choose a reason for hiding this comment

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

For change in this file, I just copy pasted from our repo to revert



def main():
"""Strands Agents MCP Server"""
Copy link
Author

Choose a reason for hiding this comment

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

remove this to avoid eager import.

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.

1 participant