-
Notifications
You must be signed in to change notification settings - Fork 898
feat: Amazon Bedrock AgentCore MCP Server #1343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A major reconsideration is to reuse SQLite etc instead of implementing doc indexer/fetcher/cacher.
"retrieval", | ||
"citations", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these?
"source_path": "src/amazon-bedrock-agentcore-mcp-server/", | ||
"subcategory": "Knowledge & Search", | ||
"tags": [ | ||
"ai-ml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add tags for agents and AI agents, agentic AI etc
|
||
llm_texts_url: list[str] = field( | ||
default_factory=lambda: [ | ||
'https://gist.githubusercontent.com/ryanycoleman/d22cdd6c37ea261b055dc9504e08d1de/raw/5fa9facbd500dcc87dc940e1a43e825e2b3824b1/agentcore-llms-txt.md' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not have llms.txt in the same package to start with? Eventually, we can use https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main/documentation github page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that about logistics in hosting the llms.txt file at a later date or do you see an advantage in statically packaging the file? I don't prefer the potential for drift if the customer does not update the MCP Server.
# Global state | ||
_INDEX: indexer.IndexSearch | None = None | ||
# url -> Page (None if not fetched yet) | ||
_URL_CACHE: Dict[str, doc_fetcher.Page | None] = {} | ||
_URL_TITLES: Dict[str, str] = {} # url -> curated title from llms.txt | ||
_LINKS_LOADED = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to a singleton class for better testing and readability.
|
||
|
||
@dataclass(slots=True) | ||
class Doc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks very involved, why not use SQLite instead?
Summary
This PR creates a MCP server for Amazon AgentCore. It is inspired by Strands Agents MCP Server, which is based on Langchain mcpdoc. It has two mcp tools, search_docs (returns relevant top k docs) and fetch_doc (fetches the full content from a doc url). We'll have a llm.txt dynamically generated by mkdocs for AgentCore documentation.
Note:
default_factory
ofllm_texts_url
in config.py needs to be updated after finalizing llm.txt locationChanges
User experience
User can use MCP inspector to run the server locally. It can also be easily installed on a client of user's choosing, such as Kiro, Q CLI, Cursor, and Claude Code, as a mcp server:
Example use cases include:
“What tools do you have access to?”
“Convert this code to agentcore”/ “Transform to agentcore” / “ Make this agentcore compatible”
“Troubleshoot errors”/“do you see any errors on cloudwatch?”
“What agents can I invoke?” / “can you test agentv3”/ “say hello to strandsv4 agent”
“Create a dynamodb gateway” (downloads smithy model directly and deploys)
“what tools are available in this gateway?”
“Can you find me some good examples for...“ / ”I need an example for hosting strands on runtime“
“What agents can I invoke?” / “Is strandsagentv6 ready to invoke?”
deploy to runtime with oauth
Invoke runtime with oauth / “can you generate a bearer token”
list memory resources I can use
create memory resource / use this memory in my agent code
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? N
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.