Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions src/content/docs/user-guide/build-with-ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Choose your AI coding tool below and follow the setup instructions.

You can use the Strands Agents MCP server as a tool within your own Strands agents:

<Tabs>
<Tab label="Python">

```python
from mcp import stdio_client, StdioServerParameters
from strands import Agent
Expand All @@ -40,6 +43,16 @@ agent = Agent(tools=[mcp_client])
agent("How do I create a custom tool in Strands Agents?")
```

</Tab>
<Tab label="TypeScript">

```typescript
--8<-- "user-guide/build-with-ai.ts:mcp_strands"
```

</Tab>
</Tabs>

See the [MCP tools documentation](/docs/user-guide/concepts/tools/mcp-tools/) for more details on using MCP tools with Strands agents.

</Tab>
Expand Down Expand Up @@ -73,26 +86,6 @@ claude mcp add strands uvx strands-agents-mcp-server

See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/tutorials#configure-mcp-servers) for more details.

</Tab>
<Tab label="Kiro">

Add the following to `~/.kiro/settings/mcp.json`:

```json
{
"mcpServers": {
"strands-agents": {
"command": "uvx",
"args": ["strands-agents-mcp-server"],
"disabled": false,
"autoApprove": ["search_docs", "fetch_doc"]
}
}
}
```

See the [Kiro MCP documentation](https://kiro.dev/docs/mcp/) for more details.

</Tab>
<Tab label="Cursor">

Expand Down
18 changes: 18 additions & 0 deletions src/content/docs/user-guide/build-with-ai.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Agent, McpClient } from '@strands-agents/sdk'
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'

async function mcpExample() {
// --8<-- [start:mcp_strands]
const mcpClient = new McpClient({
transport: new StdioClientTransport({
command: 'uvx',
args: ['strands-agents-mcp-server'],
}),
})

const agent = new Agent({ tools: [mcpClient] })
await agent.invoke('How do I create a custom tool in Strands Agents?')

await mcpClient.disconnect()
// --8<-- [end:mcp_strands]
}
Loading
Loading