Skip to content
Open
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
148 changes: 131 additions & 17 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion strands-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Seamlessly integrate Model Context Protocol (MCP) servers:

```typescript
import { Agent, McpClient } from "@strands-agents/sdk";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";

// Create a client for a local MCP server
const documentationTools = new McpClient({
Expand Down
1 change: 1 addition & 0 deletions strands-ts/examples/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"../../"
],
"dependencies": {
"@modelcontextprotocol/client": "^2.0.0",
"@strands-agents/sdk": "*"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions strands-ts/examples/mcp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Agent, McpClient } from '@strands-agents/sdk'
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
import { StdioClientTransport } from '@modelcontextprotocol/client/stdio'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/client'

async function runInvoke(title: string, agent: Agent, prompt: string) {
console.log(`--- ${title} ---\nUser: ${prompt}`)
Expand Down
4 changes: 3 additions & 1 deletion strands-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@
"@cedar-policy/mcp-schema-generator-wasm": "^0.6.0",
"@eslint/js": "^10.0.1",
"@google/genai": "^2.6.0",
"@modelcontextprotocol/sdk": "^1.25.2",
"@modelcontextprotocol/server": "^2.0.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.219.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
Expand Down Expand Up @@ -298,7 +300,7 @@
"@cedar-policy/cedar-wasm": "^4.0.0",
"@cedar-policy/mcp-schema-generator-wasm": "^0.6.0",
"@google/genai": "^2.6.0",
"@modelcontextprotocol/sdk": "^1.25.2",
"@modelcontextprotocol/client": "^2.0.0",
Comment thread
poshinchen marked this conversation as resolved.
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.219.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
Expand Down
6 changes: 3 additions & 3 deletions strands-ts/src/mcp/__tests__/client-annotations.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest'
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js'
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { InMemoryTransport, type ToolAnnotations } from '@modelcontextprotocol/client'
import { McpServer } from '@modelcontextprotocol/server'
import { z } from 'zod'
import { McpClient } from '../client.js'

Expand All @@ -17,7 +17,7 @@ describe('McpClient annotations over a real transport', () => {
{
description: 'Echoes input',
inputSchema: { value: z.string() },
...(annotations !== undefined && { annotations }),
...(annotations !== undefined && { annotations: annotations as ToolAnnotations }),
},
async ({ value }) => ({ content: [{ type: 'text', text: value }] })
)
Expand Down
Loading
Loading