import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
const serverUrl = new URL("https://server.smithery.ai/@bhatia1289/mcp-codecommit/mcp")
serverUrl.searchParams.set("api_key", "your-smithery-api-key")
const transport = new StreamableHTTPClientTransport(serverUrl)
// Create MCP client
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
const client = new Client({
name: "Test client",
version: "1.0.0"
})
await client.connect(transport)
// Use the server tools with your LLM application
const tools = await client.listTools()
console.log(`Available tools: ${tools.map(t => t.name).join(", ")}`)