Commit 0157b13
feat: Add non-interactive MCP server listing commands
Add comprehensive CLI commands for listing MCP server capabilities without interactive mode:
- list-tools: List all available tools with descriptions
- list-resources: List static resources and resource templates
- list-prompts: List available prompts with arguments
- list-all: Comprehensive overview of all server capabilities
Features:
- Multiple server types: config stdio, remote HTTP/SSE, URL servers in config
- Dual output formats: human-readable with colors + JSON (--json flag)
- OAuth authentication support for remote servers
- Consistent data structure across all commands
- Performance optimized with concurrent Promise.all API calls
Architecture:
- Type-specific formatters (formatListTools, formatListPrompts, formatListResources)
- Compositional design with formatListAll reusing existing formatters
- Single unified data format: {capabilities, tools, prompts, resources, resourceTemplates}
- Zero code duplication with helper functions like shouldInclude
- Clean separation of data fetching, filtering, and formatting
Maintains full backward compatibility - no breaking changes to existing CLI interface.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 3562966 commit 0157b13
2 files changed
+354
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
52 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
| |||
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
64 | 90 | | |
65 | 91 | | |
66 | 92 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
0 commit comments