View a markdown version of this page

Other frameworks - AWS Context

Other frameworks

MCP clients that can start a local command, such as Cursor and Amazon Q Developer, use the mcpServers configuration. LlamaIndex can use the mcp-proxy-for-aws library’s client with the official mcp session. The LangChain MCP adapters and Microsoft Agent Framework can’t use that client today; for them, launch the proxy as a subprocess or call the AWS SDK inside a tool.

The following example starts the proxy as a subprocess from the LangChain MCP adapters.

import asyncio from langchain_mcp_adapters.client import MultiServerMCPClient client = MultiServerMCPClient({ "agent-context": { "transport": "stdio", "command": "uvx", "args": ["mcp-proxy-for-aws-cli@latest", "https://context-mcp.us-east-1.api.aws/mcp", "--service", "context-mcp", "--region", "us-east-1", "--read-timeout", "310", "--tool-timeout", "360"], "env": {"AWS_REGION": "us-east-1"}, } }) async def main(): tools = await client.get_tools() print([tool.name for tool in tools]) asyncio.run(main())