@standardbeagle/mcp-tui 0.5.0 โ 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +191 -0
- package/QUICK_START.md +425 -0
- package/README.md +61 -10
- package/bin/mcp-tui +0 -0
- package/bin/mcp-tui-local +0 -0
- package/examples/CONFIG_REFERENCE.md +363 -0
- package/examples/claude-desktop-config.json +66 -0
- package/examples/development-preset.json +50 -0
- package/examples/mcp-config.json +83 -0
- package/examples/mcp-config.yaml +78 -0
- package/examples/multi-server-config.json +106 -0
- package/examples/multi-transport-config.json +67 -0
- package/examples/production-setup.json +61 -0
- package/examples/single-server-config.json +16 -0
- package/examples/transport-examples.json +140 -0
- package/package.json +16 -5
- package/scripts/install.js +14 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to MCP-TUI will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.6.1] - 2025-01-12
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Tool Screen**: Fixed `parseSchema()` type assertion bug - now handles both `[]interface{}` and `[]string` for required fields
|
|
14
|
+
- **Navigation Tests**: Fixed test rot in navigation tests by properly populating `toolStrings` alongside `tools`
|
|
15
|
+
- **CtrlL Tests**: Updated tests to expect `ToggleOverlayMsg` instead of deprecated `TransitionMsg`
|
|
16
|
+
- **Debug Access**: Debug logs are now accessible even when disconnected (intentional behavior)
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Result Scrolling**: Enhanced tool screen with result scrolling (Ctrl+Up/Down, PgUp/PgDn, Home/End)
|
|
20
|
+
- **Context-Aware Indicators**: Scroll indicators now show position and available scroll directions
|
|
21
|
+
- **GitHub Actions**: Added automated npm publish workflow on version tags
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- **CLI Flags**: Renamed `--output` flag to `--format` with shorthand `-f` for consistency with common CLI tools
|
|
25
|
+
- **Logging**: Changed default log level from `info` to `error` for cleaner output in automation scenarios
|
|
26
|
+
- **Tool Screen Layout**: Added constants for layout calculations, improved code maintainability
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- **Porcelain Mode**: Added `--porcelain` flag to disable progress messages for machine-readable output
|
|
30
|
+
- **Task Automation**: Clean JSON output support for CI/CD pipelines and scripting
|
|
31
|
+
|
|
32
|
+
## [0.2.0] - 2024-07-12
|
|
33
|
+
|
|
34
|
+
### ๐ Major Features Added
|
|
35
|
+
|
|
36
|
+
#### Revolutionary UI Navigation System
|
|
37
|
+
- **Tabbed Interface**: Visual tabs for Saved, Discovery, and Manual modes with arrow key navigation
|
|
38
|
+
- **File Discovery**: Automatically finds Claude Desktop, VS Code MCP, and MCP-TUI configuration files
|
|
39
|
+
- **Combined Command Input**: Default single-line input for commands like "brum --mcp" (toggle with 'C')
|
|
40
|
+
- **Smart Auto-Connect**: Automatically connects to single servers or default server configurations
|
|
41
|
+
|
|
42
|
+
#### Enhanced Connection Management
|
|
43
|
+
- **Saved Connections**: Visual connection cards with icons, descriptions, and tagging
|
|
44
|
+
- **Configuration Compatibility**: Support for Claude Desktop, VS Code MCP, and native formats
|
|
45
|
+
- **Server Enumeration**: Display individual server names and descriptions from discovered files
|
|
46
|
+
- **Recent Connections**: Track connection history and success rates
|
|
47
|
+
|
|
48
|
+
#### Improved User Experience
|
|
49
|
+
- **Input Priority**: Form fields take precedence over UI navigation keys
|
|
50
|
+
- **Visual Focus Management**: Clear focus indicators and consistent navigation behavior
|
|
51
|
+
- **Enhanced Help System**: Context-aware help text and keyboard shortcuts
|
|
52
|
+
- **Error Prevention**: Only show configuration files with valid MCP server definitions
|
|
53
|
+
|
|
54
|
+
### ๐ง Technical Improvements
|
|
55
|
+
|
|
56
|
+
#### Security Enhancements
|
|
57
|
+
- **MCP Validation**: Only display JSON files with actual MCP server configurations
|
|
58
|
+
- **Input Sanitization**: Enhanced command validation and path safety checks
|
|
59
|
+
- **Configuration Parsing**: Robust parsing of multiple configuration formats
|
|
60
|
+
|
|
61
|
+
#### Performance Optimizations
|
|
62
|
+
- **Efficient Discovery**: Fast file system scanning with intelligent filtering
|
|
63
|
+
- **Memory Management**: Optimized connection and file handling
|
|
64
|
+
- **Responsive UI**: Non-blocking operations with proper async handling
|
|
65
|
+
|
|
66
|
+
### ๐ Bug Fixes
|
|
67
|
+
|
|
68
|
+
#### Navigation Issues
|
|
69
|
+
- **Fixed**: Initial focus problems in main screen lists
|
|
70
|
+
- **Fixed**: Command input appearing limited to 3 characters
|
|
71
|
+
- **Fixed**: Navigation requiring down/up arrow to select items
|
|
72
|
+
|
|
73
|
+
#### Input Handling
|
|
74
|
+
- **Fixed**: Key priority conflicts between UI navigation and text input
|
|
75
|
+
- **Fixed**: Arrow keys interfering with text editing in input fields
|
|
76
|
+
- **Fixed**: Tab navigation between form fields and UI elements
|
|
77
|
+
|
|
78
|
+
### ๐ Changed
|
|
79
|
+
|
|
80
|
+
#### Default Behaviors
|
|
81
|
+
- **Combined command input is now the default** for STDIO transport
|
|
82
|
+
- **Tab navigation** replaces 'M' key for mode switching
|
|
83
|
+
- **Arrow keys** navigate between tabs when not in text input fields
|
|
84
|
+
|
|
85
|
+
#### UI Improvements
|
|
86
|
+
- **Enhanced connection screen** with visual cards and server lists
|
|
87
|
+
- **Improved mode selector** with clear visual indicators
|
|
88
|
+
- **Better error messages** with actionable guidance
|
|
89
|
+
|
|
90
|
+
### ๐ Documentation
|
|
91
|
+
|
|
92
|
+
#### Updated Documentation
|
|
93
|
+
- **README**: Updated with new features and examples
|
|
94
|
+
- **CLAUDE.md**: Enhanced development instructions
|
|
95
|
+
- **CONFIG_REFERENCE.md**: Comprehensive configuration examples
|
|
96
|
+
- **Architecture documentation**: Updated for new UI system
|
|
97
|
+
|
|
98
|
+
#### New Examples
|
|
99
|
+
- **Single-server configurations** for quick setup
|
|
100
|
+
- **Development presets** for common workflows
|
|
101
|
+
- **Multi-transport examples** for complex deployments
|
|
102
|
+
- **Production setups** with security considerations
|
|
103
|
+
|
|
104
|
+
### ๐ง Breaking Changes
|
|
105
|
+
|
|
106
|
+
#### UI Navigation
|
|
107
|
+
- **Mode switching**: 'M' key replaced with arrow key navigation
|
|
108
|
+
- **Tab focus**: New tab/content focus model may require learning
|
|
109
|
+
- **Input behavior**: Some key combinations work differently
|
|
110
|
+
|
|
111
|
+
#### Configuration
|
|
112
|
+
- **File discovery**: Only shows files with valid MCP configurations
|
|
113
|
+
- **Default input mode**: Combined command input is now default
|
|
114
|
+
|
|
115
|
+
### ๐๏ธ Internal Changes
|
|
116
|
+
|
|
117
|
+
#### Architecture Improvements
|
|
118
|
+
- **Connection management model** with comprehensive format support
|
|
119
|
+
- **File discovery system** with intelligent configuration parsing
|
|
120
|
+
- **Enhanced screen management** with proper focus handling
|
|
121
|
+
- **Improved error handling** throughout the UI system
|
|
122
|
+
|
|
123
|
+
#### Code Quality
|
|
124
|
+
- **Enhanced type safety** in configuration handling
|
|
125
|
+
- **Better separation of concerns** between UI and business logic
|
|
126
|
+
- **Improved test coverage** for new features
|
|
127
|
+
- **Consistent coding patterns** across modules
|
|
128
|
+
|
|
129
|
+
## [0.1.0] - 2024-07-01
|
|
130
|
+
|
|
131
|
+
### ๐ Initial Release
|
|
132
|
+
|
|
133
|
+
#### Core Features
|
|
134
|
+
- **Terminal User Interface (TUI)** for interactive MCP server testing
|
|
135
|
+
- **Command Line Interface (CLI)** for automation and scripting
|
|
136
|
+
- **Multiple Transport Support**: STDIO, SSE, HTTP, and Streamable HTTP
|
|
137
|
+
- **Comprehensive Error Handling** with structured error types
|
|
138
|
+
- **Cross-Platform Support** for Windows, macOS, and Linux
|
|
139
|
+
|
|
140
|
+
#### Security Features
|
|
141
|
+
- **Command Validation**: Prevents command injection and path traversal
|
|
142
|
+
- **Input Sanitization**: Safe handling of user input and server responses
|
|
143
|
+
- **Process Management**: Secure process lifecycle management
|
|
144
|
+
- **Resource Limits**: Protection against resource exhaustion
|
|
145
|
+
|
|
146
|
+
#### Developer Experience
|
|
147
|
+
- **Rich Documentation**: Comprehensive guides and examples
|
|
148
|
+
- **Test Infrastructure**: Problematic servers for edge case testing
|
|
149
|
+
- **Debug Support**: Detailed logging and error reporting
|
|
150
|
+
- **Build Automation**: Makefile with common development tasks
|
|
151
|
+
|
|
152
|
+
#### Protocol Compliance
|
|
153
|
+
- **MCP Specification**: Full compliance with Model Context Protocol
|
|
154
|
+
- **Transport Reliability**: Robust handling of connection issues
|
|
155
|
+
- **Message Validation**: Proper JSON-RPC message handling
|
|
156
|
+
- **Error Recovery**: Graceful handling of server failures
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Version History Summary
|
|
161
|
+
|
|
162
|
+
- **v0.6.1**: Bug fixes, result scrolling, and GitHub Actions for npm publishing
|
|
163
|
+
- **v0.2.0**: Revolutionary UI improvements with file discovery and enhanced navigation
|
|
164
|
+
- **v0.1.0**: Initial release with core MCP testing functionality
|
|
165
|
+
|
|
166
|
+
## Upgrade Guide
|
|
167
|
+
|
|
168
|
+
### From v0.1.0 to v0.2.0
|
|
169
|
+
|
|
170
|
+
#### UI Changes
|
|
171
|
+
1. **New navigation**: Use โ/โ arrows instead of 'M' to switch modes
|
|
172
|
+
2. **Combined input**: Commands now default to single-line input
|
|
173
|
+
3. **File discovery**: Check the Discovery tab for existing configurations
|
|
174
|
+
|
|
175
|
+
#### Configuration
|
|
176
|
+
1. **Auto-discovery**: MCP-TUI now finds existing config files automatically
|
|
177
|
+
2. **Saved connections**: Import existing configurations or create new ones
|
|
178
|
+
3. **Format support**: Works with Claude Desktop and VS Code MCP configs
|
|
179
|
+
|
|
180
|
+
#### Compatibility
|
|
181
|
+
- All existing CLI commands work unchanged
|
|
182
|
+
- Configuration files are backward compatible
|
|
183
|
+
- No breaking changes to scripting interfaces
|
|
184
|
+
|
|
185
|
+
## Support
|
|
186
|
+
|
|
187
|
+
For issues, questions, or contributions:
|
|
188
|
+
- ๐ **Bug Reports**: [GitHub Issues](https://github.com/standardbeagle/mcp-tui/issues)
|
|
189
|
+
- ๐ก **Feature Requests**: [GitHub Discussions](https://github.com/standardbeagle/mcp-tui/discussions)
|
|
190
|
+
- ๐ **Documentation**: [Project README](README.md)
|
|
191
|
+
- ๐ค **Contributing**: [Contributing Guide](CONTRIBUTING.md)
|
package/QUICK_START.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# MCP-TUI Quick Start Guide: From Zero to Productive in 60 Seconds
|
|
2
|
+
|
|
3
|
+
## ๐ฏ Why MCP-TUI is Different
|
|
4
|
+
|
|
5
|
+
**Before MCP-TUI:** Writing curl commands, parsing JSON, debugging protocol issues
|
|
6
|
+
**With MCP-TUI:** One command gets you browsing, testing, and debugging any MCP server visually
|
|
7
|
+
|
|
8
|
+
**The MCP-TUI Advantage:**
|
|
9
|
+
- โก **Instant Connection** - No configuration files, no setup wizards
|
|
10
|
+
- ๐ **Visual Debugging** - See exactly what your server exposes
|
|
11
|
+
- ๐ค **Automation Ready** - CLI mode perfect for scripts and CI/CD
|
|
12
|
+
- ๐ก๏ธ **Error Resilient** - Graceful handling of server crashes and failures
|
|
13
|
+
|
|
14
|
+
## ๐ Connection Methods: Choose Your Style
|
|
15
|
+
|
|
16
|
+
### Method 1: Quick Connect (Recommended for Most Users)
|
|
17
|
+
|
|
18
|
+
**๐ป STDIO Servers (90% of use cases)**
|
|
19
|
+
```bash
|
|
20
|
+
# ๐ฏ The Easiest Way - One Command
|
|
21
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio"
|
|
22
|
+
```
|
|
23
|
+
**When to use:** Local development, testing new servers, most MCP implementations
|
|
24
|
+
**Why it works:** Automatically detects STDIO transport, handles process management
|
|
25
|
+
**What you get:** Instant visual access to all server capabilities
|
|
26
|
+
|
|
27
|
+
**๐ HTTP/SSE Servers (Web services)**
|
|
28
|
+
```bash
|
|
29
|
+
# HTTP connection (request/response)
|
|
30
|
+
mcp-tui --url http://localhost:8000/mcp
|
|
31
|
+
|
|
32
|
+
# SSE connection (server-sent events, real-time)
|
|
33
|
+
mcp-tui --url http://localhost:8000/sse/mcp
|
|
34
|
+
```
|
|
35
|
+
**When to use:** Production services, cloud deployments, web-based MCP servers
|
|
36
|
+
**Why it works:** Built-in HTTP client with authentication and retry logic
|
|
37
|
+
**What you get:** Same interface for local and remote servers
|
|
38
|
+
|
|
39
|
+
**๐ง Advanced Syntax (When you need control)**
|
|
40
|
+
```bash
|
|
41
|
+
# Explicit transport specification
|
|
42
|
+
mcp-tui --cmd python --args "server.py" --args "--debug" --transport stdio
|
|
43
|
+
|
|
44
|
+
# Multiple arguments with spaces
|
|
45
|
+
mcp-tui --cmd "./my-server" --args "--config" --args "/path/with spaces/config.json"
|
|
46
|
+
```
|
|
47
|
+
**When to use:** Complex server configurations, custom arguments, specific transport needs
|
|
48
|
+
**Why it works:** Full control over process launching and argument passing
|
|
49
|
+
**What you get:** Precise control for complex scenarios
|
|
50
|
+
|
|
51
|
+
### Method 2: Interactive Setup (When You're Exploring)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
mcp-tui # No arguments = guided setup
|
|
55
|
+
```
|
|
56
|
+
**When to use:** First time with a server, exploring options, learning about transports
|
|
57
|
+
**Why it works:** Guided prompts help you understand connection options
|
|
58
|
+
**What you get:** Educational experience that teaches you the underlying concepts
|
|
59
|
+
|
|
60
|
+
### Method 3: CLI Mode (For Automation)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# List all available tools
|
|
64
|
+
mcp-tui "my-server-command" tool list
|
|
65
|
+
|
|
66
|
+
# Execute a specific tool
|
|
67
|
+
mcp-tui "my-server-command" tool call calculator add a=5 b=3
|
|
68
|
+
|
|
69
|
+
# Get JSON output for scripts
|
|
70
|
+
mcp-tui --json "my-server-command" tool list | jq '.tools[].name'
|
|
71
|
+
```
|
|
72
|
+
**When to use:** CI/CD pipelines, automated testing, scripting workflows
|
|
73
|
+
**Why it works:** Every TUI feature available as scriptable CLI commands
|
|
74
|
+
**What you get:** Full automation capabilities with structured output
|
|
75
|
+
|
|
76
|
+
## ๐ Understanding What You See
|
|
77
|
+
|
|
78
|
+
Once connected, MCP-TUI shows you three main areas of any MCP server:
|
|
79
|
+
|
|
80
|
+
### ๐ง Tools Tab - "What can this server do?"
|
|
81
|
+
- **What you see:** List of available tools with descriptions
|
|
82
|
+
- **What you can do:** Execute tools with guided parameter input
|
|
83
|
+
- **Why it matters:** Tools are the main functionality of MCP servers
|
|
84
|
+
- **Pro tip:** Use number keys (1-9) for quick tool selection
|
|
85
|
+
|
|
86
|
+
### ๐ Resources Tab - "What data can this server provide?"
|
|
87
|
+
- **What you see:** Available resources like files, databases, APIs
|
|
88
|
+
- **What you can do:** Browse and read resource contents
|
|
89
|
+
- **Why it matters:** Resources provide context and data for tools
|
|
90
|
+
- **Pro tip:** Resources often contain configuration or state information
|
|
91
|
+
|
|
92
|
+
### ๐ฌ Prompts Tab - "What pre-built interactions are available?"
|
|
93
|
+
- **What you see:** Template prompts for common operations
|
|
94
|
+
- **What you can do:** Use predefined prompts with your own parameters
|
|
95
|
+
- **Why it matters:** Prompts provide guided workflows for complex tasks
|
|
96
|
+
- **Pro tip:** Great starting point for understanding server capabilities
|
|
97
|
+
|
|
98
|
+
## โจ๏ธ Navigation Guide: Master the Interface
|
|
99
|
+
|
|
100
|
+
### ๐ฎ Essential Keyboard Shortcuts
|
|
101
|
+
|
|
102
|
+
**Tab Navigation:**
|
|
103
|
+
- **Tab/Shift+Tab** - Switch between Tools/Resources/Prompts tabs
|
|
104
|
+
- **1/2/3** - Jump directly to Tools/Resources/Prompts
|
|
105
|
+
|
|
106
|
+
**List Navigation:**
|
|
107
|
+
- **โ/โ or j/k** - Move up/down in lists (vim-style supported)
|
|
108
|
+
- **PgUp/PgDn** - Jump by pages in long lists
|
|
109
|
+
- **Home/End** - Jump to start/end of list
|
|
110
|
+
- **1-9** - Quick select numbered items (Tools tab)
|
|
111
|
+
|
|
112
|
+
**Actions:**
|
|
113
|
+
- **Enter** - Select/execute current item
|
|
114
|
+
- **Space** - Preview item details without executing
|
|
115
|
+
- **r** - Refresh current tab (useful for dynamic servers)
|
|
116
|
+
- **?** - Show help and all keyboard shortcuts
|
|
117
|
+
|
|
118
|
+
**Advanced:**
|
|
119
|
+
- **Ctrl+L** - Open debug log panel
|
|
120
|
+
- **Ctrl+C** - Copy results to clipboard (after tool execution)
|
|
121
|
+
- **Ctrl+V** - Paste from clipboard (in input fields)
|
|
122
|
+
- **b or Alt+โ** - Go back to previous screen
|
|
123
|
+
- **q or Escape** - Quit application
|
|
124
|
+
|
|
125
|
+
### ๐ Pro Tips for Efficient Navigation
|
|
126
|
+
|
|
127
|
+
**Quick Workflows:**
|
|
128
|
+
1. **Tab โ Enter** - Quick tool execution with default parameters
|
|
129
|
+
2. **Tab โ ? โ Enter** - Get help for any tool before executing
|
|
130
|
+
3. **Ctrl+L** - Check logs when something doesn't work as expected
|
|
131
|
+
4. **r** - Refresh when server state changes externally
|
|
132
|
+
|
|
133
|
+
**Power User Tricks:**
|
|
134
|
+
- Use vim-style **j/k** for navigation if you're a vim user
|
|
135
|
+
- **Number keys** for instant tool selection without navigation
|
|
136
|
+
- **Ctrl+L** to check what's happening under the hood
|
|
137
|
+
- **b** to quickly return to previous screens
|
|
138
|
+
|
|
139
|
+
## ๐ Real-World Examples: See It In Action
|
|
140
|
+
|
|
141
|
+
### ๐งช Testing the Official Sample Server
|
|
142
|
+
```bash
|
|
143
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio"
|
|
144
|
+
```
|
|
145
|
+
**What happens:** Connects to the comprehensive MCP reference implementation
|
|
146
|
+
**What you'll see:** 10+ tools including calculators, text processing, and sample resources
|
|
147
|
+
**Why it's useful:** Perfect for learning MCP concepts and testing your workflow
|
|
148
|
+
**Next steps:** Try the `echo` tool to see request/response flow
|
|
149
|
+
|
|
150
|
+
### ๐ Python Development Server
|
|
151
|
+
```bash
|
|
152
|
+
# Your custom Python MCP server
|
|
153
|
+
mcp-tui "python my_mcp_server.py"
|
|
154
|
+
|
|
155
|
+
# Python server with custom configuration
|
|
156
|
+
mcp-tui "python server.py --config dev.json --verbose"
|
|
157
|
+
```
|
|
158
|
+
**What happens:** Launches your Python server and connects immediately
|
|
159
|
+
**What you'll see:** Your custom tools, resources, and prompts
|
|
160
|
+
**Why it's useful:** Instant testing during development without writing test clients
|
|
161
|
+
**Pro tip:** Use `--debug` flag to see detailed protocol communication
|
|
162
|
+
|
|
163
|
+
### ๐ Production Web Service
|
|
164
|
+
```bash
|
|
165
|
+
# Production HTTP MCP server
|
|
166
|
+
mcp-tui --url https://api.mycompany.com/mcp
|
|
167
|
+
|
|
168
|
+
# Development server with authentication
|
|
169
|
+
mcp-tui --url http://localhost:8080/mcp --header "Authorization: Bearer $(cat token.txt)"
|
|
170
|
+
```
|
|
171
|
+
**What happens:** Connects to web-based MCP servers with proper HTTP handling
|
|
172
|
+
**What you'll see:** Same interface for remote servers as local ones
|
|
173
|
+
**Why it's useful:** Test production APIs without writing HTTP clients
|
|
174
|
+
**Security note:** Supports authentication headers and secure connections
|
|
175
|
+
|
|
176
|
+
### ๐ค Automation and Scripting
|
|
177
|
+
```bash
|
|
178
|
+
# Check if server is working
|
|
179
|
+
mcp-tui --json "my-server" tool list | jq '.tools | length' > tool_count.txt
|
|
180
|
+
|
|
181
|
+
# Execute tool and save results
|
|
182
|
+
mcp-tui --json "my-server" tool call process_data input="test" > results.json
|
|
183
|
+
|
|
184
|
+
# Batch testing multiple servers
|
|
185
|
+
for server in server1 server2 server3; do
|
|
186
|
+
echo "Testing $server..."
|
|
187
|
+
mcp-tui --json "$server" tool list || echo "$server failed"
|
|
188
|
+
done
|
|
189
|
+
```
|
|
190
|
+
**What happens:** Structured output perfect for integration with other tools
|
|
191
|
+
**Why it's useful:** CI/CD integration, automated testing, report generation
|
|
192
|
+
**Output format:** Clean JSON that integrates with jq, scripts, and monitoring tools
|
|
193
|
+
|
|
194
|
+
### ๐ Debugging Problematic Servers
|
|
195
|
+
```bash
|
|
196
|
+
# Debug mode for troubleshooting
|
|
197
|
+
mcp-tui --debug --log-level debug "problematic-server"
|
|
198
|
+
|
|
199
|
+
# With timeout for hanging servers
|
|
200
|
+
mcp-tui --timeout 30s --debug "slow-server"
|
|
201
|
+
|
|
202
|
+
# Using test servers for failure scenarios
|
|
203
|
+
mcp-tui "node test-servers/crash-server.js"
|
|
204
|
+
```
|
|
205
|
+
**What happens:** Detailed logging reveals exactly what's going wrong
|
|
206
|
+
**What you'll see:** Protocol messages, timing information, error context
|
|
207
|
+
**Why it's useful:** Diagnose server issues, protocol violations, performance problems
|
|
208
|
+
**Troubleshooting:** Check the debug panel (Ctrl+L) for detailed information
|
|
209
|
+
|
|
210
|
+
## ๐ง Advanced Configuration: Fine-Tune Your Experience
|
|
211
|
+
|
|
212
|
+
### ๐ Debug and Logging Options
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Full debug mode - see everything
|
|
216
|
+
mcp-tui --debug --log-level debug "my-server"
|
|
217
|
+
```
|
|
218
|
+
**When to use:** Server not working as expected, developing new servers
|
|
219
|
+
**What you get:** Complete protocol trace, timing info, error details
|
|
220
|
+
**Performance:** Minimal impact, logs to memory buffer
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Specific log levels for different needs
|
|
224
|
+
mcp-tui --log-level info "my-server" # General information
|
|
225
|
+
mcp-tui --log-level warn "my-server" # Problems and warnings only
|
|
226
|
+
mcp-tui --log-level error "my-server" # Errors only
|
|
227
|
+
```
|
|
228
|
+
**Log level guide:**
|
|
229
|
+
- `debug` - Everything (use for troubleshooting)
|
|
230
|
+
- `info` - Normal operations (default for development)
|
|
231
|
+
- `warn` - Potential issues (good for monitoring)
|
|
232
|
+
- `error` - Only failures (production monitoring)
|
|
233
|
+
|
|
234
|
+
### โฑ๏ธ Timeout and Performance Tuning
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Custom timeouts for different server types
|
|
238
|
+
mcp-tui --timeout 5s "fast-local-server" # Quick local servers
|
|
239
|
+
mcp-tui --timeout 60s "slow-analysis-server" # Servers that do heavy processing
|
|
240
|
+
mcp-tui --timeout 300s "ml-training-server" # ML/AI servers with long operations
|
|
241
|
+
```
|
|
242
|
+
**Timeout strategy:**
|
|
243
|
+
- **5-10s** - Local development servers
|
|
244
|
+
- **30-60s** - Network services and databases
|
|
245
|
+
- **5+ minutes** - ML/AI services, heavy computation
|
|
246
|
+
|
|
247
|
+
### ๐ Network and Authentication
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Custom headers for authentication
|
|
251
|
+
mcp-tui --header "Authorization: Bearer $TOKEN" --url https://api.company.com/mcp
|
|
252
|
+
|
|
253
|
+
# Multiple headers
|
|
254
|
+
mcp-tui --header "Auth: Bearer $TOKEN" --header "X-Client: mcp-tui" --url $URL
|
|
255
|
+
|
|
256
|
+
# Custom User-Agent
|
|
257
|
+
mcp-tui --header "User-Agent: MyApp/1.0" --url $URL
|
|
258
|
+
```
|
|
259
|
+
**Authentication patterns:**
|
|
260
|
+
- Bearer tokens (most common)
|
|
261
|
+
- API keys in headers
|
|
262
|
+
- Custom authentication schemes
|
|
263
|
+
|
|
264
|
+
### ๐ Output and Integration Options
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# JSON output for scripting
|
|
268
|
+
mcp-tui --json "my-server" tool list | jq '.tools[0].name'
|
|
269
|
+
|
|
270
|
+
# Quiet mode (suppress progress indicators)
|
|
271
|
+
mcp-tui --quiet --json "my-server" tool call calculator add a=1 b=2
|
|
272
|
+
|
|
273
|
+
# Save configuration for reuse
|
|
274
|
+
mcp-tui --save-config my-server.json "complex-server-command"
|
|
275
|
+
mcp-tui --load-config my-server.json
|
|
276
|
+
```
|
|
277
|
+
**Integration benefits:**
|
|
278
|
+
- Clean JSON for tool integration
|
|
279
|
+
- Quiet mode for scripts (no TTY output)
|
|
280
|
+
- Config files for complex setups
|
|
281
|
+
|
|
282
|
+
## ๐ ๏ธ Troubleshooting: When Things Don't Work
|
|
283
|
+
|
|
284
|
+
### ๐จ Common Issues and Solutions
|
|
285
|
+
|
|
286
|
+
**Problem: "Connection failed" or "Server not found"**
|
|
287
|
+
```bash
|
|
288
|
+
# Check if your server command works independently
|
|
289
|
+
python my_server.py # Should start without errors
|
|
290
|
+
|
|
291
|
+
# Try with debug logging to see what's happening
|
|
292
|
+
mcp-tui --debug "python my_server.py"
|
|
293
|
+
```
|
|
294
|
+
**Solutions:**
|
|
295
|
+
- Verify server command works in terminal first
|
|
296
|
+
- Check file paths and permissions
|
|
297
|
+
- Use absolute paths if relative paths fail
|
|
298
|
+
- Check server dependencies are installed
|
|
299
|
+
|
|
300
|
+
**Problem: "Server started but no response"**
|
|
301
|
+
```bash
|
|
302
|
+
# Increase timeout for slow servers
|
|
303
|
+
mcp-tui --timeout 60s "slow-server-command"
|
|
304
|
+
|
|
305
|
+
# Check debug logs for protocol issues
|
|
306
|
+
mcp-tui --debug --log-level debug "server-command"
|
|
307
|
+
```
|
|
308
|
+
**Solutions:**
|
|
309
|
+
- Server might be slow to initialize
|
|
310
|
+
- Check server logs for startup errors
|
|
311
|
+
- Verify server supports MCP protocol
|
|
312
|
+
- Try different transport types
|
|
313
|
+
|
|
314
|
+
**Problem: "Permission denied" or process issues**
|
|
315
|
+
```bash
|
|
316
|
+
# Make server executable
|
|
317
|
+
chmod +x my_server
|
|
318
|
+
|
|
319
|
+
# Use full paths
|
|
320
|
+
mcp-tui "/usr/bin/python /full/path/to/server.py"
|
|
321
|
+
|
|
322
|
+
# Check environment variables
|
|
323
|
+
env PYTHONPATH=/my/path mcp-tui "python server.py"
|
|
324
|
+
```
|
|
325
|
+
**Solutions:**
|
|
326
|
+
- Ensure execute permissions on server files
|
|
327
|
+
- Use absolute paths for executables
|
|
328
|
+
- Set required environment variables
|
|
329
|
+
- Check shell PATH includes necessary directories
|
|
330
|
+
|
|
331
|
+
**Problem: "Tools showing but execution fails"**
|
|
332
|
+
```bash
|
|
333
|
+
# Check parameter formatting
|
|
334
|
+
mcp-tui --debug "server" tool call mytool param="value"
|
|
335
|
+
|
|
336
|
+
# Try with different parameter syntax
|
|
337
|
+
mcp-tui "server" tool call mytool 'param={"key": "value"}'
|
|
338
|
+
```
|
|
339
|
+
**Solutions:**
|
|
340
|
+
- Check tool parameter requirements
|
|
341
|
+
- Verify JSON formatting for complex parameters
|
|
342
|
+
- Look at debug logs for parameter validation errors
|
|
343
|
+
- Try tools with no parameters first
|
|
344
|
+
|
|
345
|
+
### ๐ Debug Mode: Your Best Friend
|
|
346
|
+
|
|
347
|
+
**Essential debug commands:**
|
|
348
|
+
```bash
|
|
349
|
+
# See everything that's happening
|
|
350
|
+
mcp-tui --debug --log-level debug "server-command"
|
|
351
|
+
|
|
352
|
+
# Focus on specific issues
|
|
353
|
+
mcp-tui --log-level warn "server-command" # Just warnings and errors
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**In the TUI, press Ctrl+L to open debug panel:**
|
|
357
|
+
- See real-time protocol messages
|
|
358
|
+
- Check connection status
|
|
359
|
+
- View error details and stack traces
|
|
360
|
+
- Monitor performance metrics
|
|
361
|
+
|
|
362
|
+
### ๐งช Testing with Known-Good Servers
|
|
363
|
+
|
|
364
|
+
**Test your setup with reliable servers:**
|
|
365
|
+
```bash
|
|
366
|
+
# Official reference implementation
|
|
367
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio"
|
|
368
|
+
|
|
369
|
+
# Simple test servers included with MCP-TUI
|
|
370
|
+
mcp-tui "node test-servers/simple-server.js"
|
|
371
|
+
|
|
372
|
+
# Problematic servers for testing error handling
|
|
373
|
+
mcp-tui "node test-servers/crash-server.js"
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**If these work but yours doesn't:**
|
|
377
|
+
- Compare your server implementation to working examples
|
|
378
|
+
- Check MCP protocol compliance
|
|
379
|
+
- Verify your server's JSON-RPC implementation
|
|
380
|
+
|
|
381
|
+
### ๐ Network Troubleshooting
|
|
382
|
+
|
|
383
|
+
**For HTTP/SSE servers:**
|
|
384
|
+
```bash
|
|
385
|
+
# Test basic connectivity
|
|
386
|
+
curl -X POST http://localhost:8000/mcp -d '{}'
|
|
387
|
+
|
|
388
|
+
# Use MCP-TUI with verbose HTTP logging
|
|
389
|
+
mcp-tui --debug --url http://localhost:8000/mcp
|
|
390
|
+
|
|
391
|
+
# Check for CORS or authentication issues
|
|
392
|
+
mcp-tui --header "Origin: http://localhost" --url http://localhost:8000/mcp
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Common network issues:**
|
|
396
|
+
- Server not listening on expected port
|
|
397
|
+
- CORS restrictions blocking requests
|
|
398
|
+
- Authentication headers missing
|
|
399
|
+
- SSL/TLS certificate issues
|
|
400
|
+
|
|
401
|
+
### ๐ Getting Help
|
|
402
|
+
|
|
403
|
+
**When you need more help:**
|
|
404
|
+
1. Check the debug logs first (Ctrl+L in TUI)
|
|
405
|
+
2. Try with `--debug --log-level debug` for full details
|
|
406
|
+
3. Test with known-good servers to isolate the issue
|
|
407
|
+
4. Check our troubleshooting guide: [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
|
|
408
|
+
5. Open an issue with debug logs: [GitHub Issues](https://github.com/standardbeagle/mcp-tui/issues)
|
|
409
|
+
|
|
410
|
+
## ๐ Success! What's Next?
|
|
411
|
+
|
|
412
|
+
**Now that you're connected, explore these workflows:**
|
|
413
|
+
|
|
414
|
+
1. **๐ Explore Tools** - Try each tool to understand server capabilities
|
|
415
|
+
2. **๐ Check Resources** - See what data and context the server provides
|
|
416
|
+
3. **๐ฌ Use Prompts** - Try predefined workflows for common tasks
|
|
417
|
+
4. **๐ค Automate** - Use CLI mode for scripting repetitive tasks
|
|
418
|
+
5. **๐๏ธ Integrate** - Add MCP-TUI to your development workflow
|
|
419
|
+
|
|
420
|
+
**๐ Ready for more advanced usage?**
|
|
421
|
+
- Check out [USER_GUIDE.md](USER_GUIDE.md) for comprehensive tutorials
|
|
422
|
+
- See [EXAMPLES.md](EXAMPLES.md) for real-world usage patterns
|
|
423
|
+
- Read [DEVELOPER_BENEFITS.md](DEVELOPER_BENEFITS.md) to understand the full potential
|
|
424
|
+
|
|
425
|
+
**No more complex setup - you're now equipped to work with any MCP server efficiently!**
|