| 5 | import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; |
| 6 | |
| 7 | function parseTextContent(callToolResult: any) { |
| 8 | const block = (callToolResult.content || []).find((c: any) => c.type === 'text'); |
| 9 | assert.ok(block, 'expected text content block'); |
| 10 | const txt = block.text || ''; |
| 11 | const trimmed = txt.trim(); |
| 12 | return JSON.parse(trimmed); |
| 13 | } |
| 14 | |
| 15 | test('MCP e2e: start, inspect_scopes, get_object_properties (text mode)', { timeout: 110000 }, async () => { |
| 16 | const transport = new StdioClientTransport({ command: 'node', args: ['dist/src/index.js'], stderr: 'pipe' }); |