()
| 4 | const origin = process.argv[2] || "https://mcp-on-vercel.vercel.app"; |
| 5 | |
| 6 | async function main() { |
| 7 | const transport = new StreamableHTTPClientTransport(new URL(`${origin}/mcp`)); |
| 8 | |
| 9 | const client = new Client( |
| 10 | { |
| 11 | name: "example-client", |
| 12 | version: "1.0.0", |
| 13 | }, |
| 14 | { |
| 15 | capabilities: { |
| 16 | prompts: {}, |
| 17 | resources: {}, |
| 18 | tools: {}, |
| 19 | }, |
| 20 | } |
| 21 | ); |
| 22 | |
| 23 | await client.connect(transport); |
| 24 | |
| 25 | console.log("Connected", client.getServerCapabilities()); |
| 26 | |
| 27 | const result = await client.listTools(); |
| 28 | console.log(result); |
| 29 | } |
| 30 | |
| 31 | main(); |
no outgoing calls
no test coverage detected