@portkey-ai/hoot 0.2.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/README.md ADDED
@@ -0,0 +1,277 @@
1
+ # 🦉 Hoot - MCP Testing Tool
2
+
3
+ **Postman for MCP Servers** - A fast, lightweight tool for testing Model Context Protocol servers.
4
+
5
+ ## ✨ Features
6
+
7
+ - 🚀 **Fast & Lightweight** - Browser-based UI with Node.js backend
8
+ - 🔐 **Full OAuth 2.1 Support** - PKCE, automatic token refresh, secure storage
9
+ - 🌐 **No CORS Issues** - Backend relay architecture eliminates CORS problems
10
+ - 🎨 **Beautiful UI** - Ayu Mirage theme, smooth animations
11
+ - 📋 **Tool Testing** - Execute tools, view results, copy responses
12
+ - 💾 **Persistent Storage** - Servers, tools, and history cached locally
13
+ - 🐛 **Dev Logger** - Download console logs for debugging
14
+ - ⚡ **Real-time Feedback** - Live execution timer, toast notifications
15
+ - 🎯 **Smart UX** - Empty states, error boundaries, loading skeletons
16
+
17
+ ## 🚀 Quick Start
18
+
19
+ ### Run with npx (Recommended)
20
+ ```bash
21
+ npx -y @portkey-ai/hoot
22
+ ```
23
+
24
+ That's it! This command will:
25
+ - ✅ Install Hoot if not already installed
26
+ - ✅ Start the backend server on `http://localhost:3002`
27
+ - ✅ Start the frontend UI on `http://localhost:5173`
28
+ - ✅ Open your browser automatically
29
+
30
+ Press `Ctrl+C` to stop both servers.
31
+
32
+ ### Install Globally (Alternative)
33
+ ```bash
34
+ npm install -g @portkey-ai/hoot
35
+ hoot
36
+ ```
37
+
38
+ ### Development Setup
39
+ If you want to contribute or develop locally:
40
+
41
+ ```bash
42
+ # Clone the repository
43
+ git clone https://github.com/yourusername/hoot.git
44
+ cd hoot
45
+
46
+ # Install dependencies
47
+ npm install
48
+
49
+ # Start both backend and frontend
50
+ npm run dev:full
51
+
52
+ # Or start them separately
53
+ npm run backend # Terminal 1
54
+ npm run dev # Terminal 2
55
+ ```
56
+
57
+ This starts:
58
+ - **Backend MCP Server** on `http://localhost:3002` (handles MCP connections)
59
+ - **Hoot UI** on `http://localhost:5173` (Vite dev server)
60
+
61
+ ## 📖 Usage
62
+
63
+ 1. **Start Hoot** - Run `npx -y @portkey-ai/hoot`
64
+ 2. **Add Server** - Click "+ Add Server"
65
+ 3. **Configure**:
66
+ - Name: "My MCP Server"
67
+ - Transport: HTTP or SSE
68
+ - URL: https://your-mcp-server.com
69
+ - Auth: None / Headers / OAuth
70
+ 4. **Connect** - Server appears in sidebar with tool count
71
+ 5. **Select Tool** - Click any tool to test it
72
+ 6. **Execute** - Fill params, click "EXECUTE TOOL"
73
+ 7. **View Results** - Response, Raw JSON, or Request tabs
74
+
75
+ ## 🏗️ Architecture
76
+
77
+ Hoot uses a **backend relay architecture** to eliminate CORS issues:
78
+
79
+ ```
80
+ Browser App (React) → Backend Server (Node.js) → MCP Servers
81
+ (UI) (MCP Client) (External)
82
+ ```
83
+
84
+ - **Frontend**: React UI running in browser
85
+ - **Backend**: Node.js server with MCP SDK (handles actual connections)
86
+ - **Communication**: REST API over localhost (no CORS issues)
87
+
88
+ See [docs/BACKEND_ARCHITECTURE.md](./docs/BACKEND_ARCHITECTURE.md) for detailed architecture documentation.
89
+
90
+ ## 🌐 No More CORS Issues!
91
+
92
+ The backend relay architecture completely eliminates CORS issues. The Node.js backend acts as the MCP client and communicates server-to-server with MCP servers, while the browser UI simply relays requests through the local backend.
93
+
94
+ **Benefits**:
95
+ - ✅ Works with any MCP server (no CORS configuration needed)
96
+ - ✅ More secure (credentials stay on backend)
97
+ - ✅ Better performance (persistent connections)
98
+ - ✅ Full OAuth 2.1 support maintained
99
+
100
+ **Old CORS Proxy (deprecated)**: The old proxy method is still available via `npm run dev:with-proxy`, but the backend relay is now the recommended approach.
101
+
102
+ **See [docs/BACKEND_ARCHITECTURE.md](./docs/BACKEND_ARCHITECTURE.md) for detailed architecture documentation.**
103
+
104
+ ## 🔐 OAuth 2.1 Support
105
+
106
+ Hoot supports full OAuth 2.1 authorization flow:
107
+
108
+ - ✅ Authorization redirect with PKCE
109
+ - ✅ Automatic token exchange
110
+ - ✅ Token refresh
111
+ - ✅ Secure storage (SQLite database)
112
+ - ✅ Multiple servers with different auth
113
+
114
+ **See [docs/AUTHENTICATION.md](./docs/AUTHENTICATION.md) for details.**
115
+
116
+ ## 🎨 UI Features
117
+
118
+ ### Toasts
119
+ - Connection errors
120
+ - Execution errors
121
+ - Proxy status changes
122
+ - Copy failures
123
+
124
+ ### Empty States
125
+ - No servers: "Add your first server"
126
+ - No tools: "Server doesn't expose tools"
127
+ - No tool selected: "Select a tool to test"
128
+
129
+ ### Live Feedback
130
+ - **Execute button timer**: Shows elapsed time during execution
131
+ - **Spinning icons**: Refresh actions
132
+ - **Copy buttons**: One-click copy with checkmark feedback
133
+ - **Status dots**: Green (connected) / Gray (disconnected)
134
+
135
+ ### Dev Logger
136
+ ```javascript
137
+ // In browser console:
138
+ hootLogger.download() // Download logs to file
139
+ hootLogger.get() // View in console
140
+ hootLogger.clear() // Clear logs
141
+ hootLogger.count() // Get log count
142
+ ```
143
+
144
+ ## 📂 Project Structure
145
+
146
+ ```
147
+ hoot/
148
+ ├── bin/
149
+ │ └── hoot.js # CLI entry point
150
+ ├── src/
151
+ │ ├── components/ # React components
152
+ │ │ ├── ServerSidebar.tsx
153
+ │ │ ├── ToolsSidebar.tsx
154
+ │ │ ├── MainArea.tsx
155
+ │ │ └── ...
156
+ │ ├── stores/ # Zustand state management
157
+ │ │ ├── appStore.ts
158
+ │ │ └── toastStore.ts
159
+ │ ├── hooks/ # Custom React hooks
160
+ │ │ ├── useMCP.ts
161
+ │ │ └── useAutoReconnect.ts
162
+ │ ├── lib/ # Core libraries
163
+ │ │ ├── mcpClient.ts # MCP SDK wrapper
164
+ │ │ ├── backendClient.ts # Backend API client
165
+ │ │ ├── oauthProvider.ts # OAuth implementation
166
+ │ │ └── logger.ts # Dev logger
167
+ │ └── types/ # TypeScript types
168
+ ├── docs/ # Documentation
169
+ │ ├── ARCHITECTURE.md
170
+ │ ├── AUTHENTICATION.md
171
+ │ ├── BACKEND_ARCHITECTURE.md
172
+ │ └── ...
173
+ ├── mcp-backend-server.js # Backend MCP relay server
174
+ └── package.json
175
+ ```
176
+
177
+ ## 📚 Documentation
178
+
179
+ - [Architecture Overview](./docs/ARCHITECTURE.md)
180
+ - [Backend Architecture](./docs/BACKEND_ARCHITECTURE.md)
181
+ - [Authentication & OAuth](./docs/AUTHENTICATION.md)
182
+ - [Design System](./docs/DESIGN_HOOT.md)
183
+ - [Quick Start Guide](./docs/QUICKSTART.md)
184
+ - [Troubleshooting](./docs/TROUBLESHOOTING.md)
185
+ - [Full Documentation Index](./docs/README.md)
186
+
187
+ ## 🛠️ npm Scripts
188
+
189
+ ```bash
190
+ npx -y @portkey-ai/hoot # Run Hoot (recommended)
191
+ npm start # Start both backend + frontend
192
+ npm run dev # Start Hoot UI only
193
+ npm run backend # Start backend server only
194
+ npm run dev:full # Start both (concurrently)
195
+ npm run build # Build for production
196
+ npm run preview # Preview production build
197
+ ```
198
+
199
+ ## 🔧 Tech Stack
200
+
201
+ - **React 19** - UI framework
202
+ - **TypeScript** - Type safety
203
+ - **Vite** - Build tool
204
+ - **Zustand** - State management
205
+ - **MCP SDK** - Model Context Protocol
206
+ - **Express** - Proxy server
207
+ - **Lucide React** - Icons
208
+
209
+ ## 📊 Browser Support
210
+
211
+ - Chrome/Edge 90+
212
+ - Firefox 88+
213
+ - Safari 14+
214
+
215
+ ## 🐛 Debugging
216
+
217
+ ### Enable Dev Logger
218
+ Automatically enabled in development. Access via browser console:
219
+ ```javascript
220
+ hootLogger.download()
221
+ ```
222
+
223
+ ### Check Proxy Status
224
+ ```bash
225
+ curl http://localhost:3001/health
226
+ ```
227
+
228
+ ### View Console Logs
229
+ All MCP operations are logged with emojis:
230
+ - 🦉 Proxy server
231
+ - 🔧 Transport creation
232
+ - 🔌 Connections
233
+ - 🔐 OAuth flows
234
+ - ✓ Success
235
+ - ❌ Errors
236
+
237
+ ## 📝 Roadmap
238
+
239
+ ### v0.2 (Current)
240
+ - [x] Full OAuth 2.1 support
241
+ - [x] CORS proxy
242
+ - [x] UI polish (toasts, empty states, copy buttons)
243
+ - [x] Live execution timer
244
+ - [x] Dev logger
245
+
246
+ ### v0.3 (Planned)
247
+ - [ ] Resource testing UI
248
+ - [ ] Prompt testing UI
249
+ - [ ] Keyboard shortcuts (Cmd+K, Cmd+E)
250
+ - [ ] Browser extension (CORS bypass)
251
+
252
+ ### v1.0 (Future)
253
+ - [ ] Electron app (stdio transport support)
254
+ - [ ] Encrypted credential storage
255
+ - [ ] Advanced testing features
256
+
257
+ ## 🤝 Contributing
258
+
259
+ Contributions welcome! Please:
260
+ 1. Fork the repo
261
+ 2. Create a feature branch
262
+ 3. Make your changes
263
+ 4. Submit a pull request
264
+
265
+ ## 📄 License
266
+
267
+ MIT
268
+
269
+ ## 🙏 Acknowledgments
270
+
271
+ - **MCP SDK** - [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk)
272
+ - **Ayu Theme** - Color palette inspiration
273
+ - **Lucide** - Beautiful icons
274
+
275
+ ---
276
+
277
+ Made with 🦉 by developers, for developers.
@@ -0,0 +1,210 @@
1
+ # 🎉 Hoot - Ready for Open Source Release!
2
+
3
+ ## Summary
4
+
5
+ Your project is now fully prepared for open-source release with `npx -y hoot` support!
6
+
7
+ ## ✅ What Was Done
8
+
9
+ ### 1. **Project Reorganization**
10
+ - Created `docs/` directory and moved 24+ documentation files
11
+ - Created `tests/` directory and moved test files
12
+ - Created `examples/` directory for example files
13
+ - Created `bin/` directory for CLI entry point
14
+ - **Removed 15+ redundant/obsolete documentation files**
15
+ - Root folder is now clean and professional
16
+
17
+ ### 2. **Removed Redundant Documentation**
18
+ The following duplicate and obsolete files were deleted:
19
+ - `HOOT_README.md` - Duplicate README
20
+ - `SCREECH_README.md` - Old project name
21
+ - `CORS.md`, `CORS_PROXY.md` - Redundant CORS docs
22
+ - `DESIGN.md` - Old design doc (kept DESIGN_HOOT.md)
23
+ - `STATUS.md`, `WORKING.md`, `SUCCESS.md` - Dev status files
24
+ - `CORS_PROXY_IMPLEMENTATION.md` - Implementation detail
25
+ - `BACKEND_RELAY_COMPLETE.md` - Implementation detail
26
+ - `OAUTH_PROXY_FIX.md` - Old fix documentation
27
+ - `OAUTH_V02_IMPLEMENTATION.md` - Implementation detail
28
+ - `UI_POLISH_COMPLETE.md` - Implementation detail
29
+ - `UI_POLISH_SUMMARY.md` - Implementation detail
30
+ - `V0.1_COMPLETE.md` - Old release notes
31
+
32
+ ### 3. **NPX Support (Main Feature!)**
33
+ Created `bin/hoot.js` - A CLI entry point that:
34
+ - Auto-starts the backend server (port 3002)
35
+ - Auto-starts the frontend dev server (port 5173)
36
+ - Opens the browser automatically
37
+ - Handles graceful shutdown with Ctrl+C
38
+
39
+ Users can now simply run:
40
+ ```bash
41
+ npx -y hoot
42
+ ```
43
+
44
+ ### 4. **Package Configuration**
45
+ Updated `package.json` with:
46
+ - ✅ `bin` field pointing to `./bin/hoot.js`
47
+ - ✅ `start` script for easy launching
48
+ - ✅ `prepublishOnly` script (auto-builds before publishing)
49
+ - ✅ Repository URLs (already set to `portkey-ai/hoot`)
50
+ - ✅ Proper keywords for npm discovery
51
+ - ✅ Node.js version requirement (>=18.0.0)
52
+
53
+ ### 5. **Publishing Preparation**
54
+ Created essential files:
55
+ - `.npmignore` - Excludes dev files from npm package
56
+ - `CONTRIBUTING.md` - Contribution guidelines
57
+ - `LICENSE` - MIT license
58
+ - `PUBLISHING.md` - Detailed npm publishing guide
59
+ - `PRE_PUBLISH_CHECKLIST.md` - Steps before publishing
60
+ - `TEST_LOCALLY.md` - Local testing instructions
61
+
62
+ ### 6. **Documentation Cleanup**
63
+ Remaining clean documentation structure:
64
+
65
+ **Root Level (6 files):**
66
+ - `README.md` - Main documentation
67
+ - `CONTRIBUTING.md` - How to contribute
68
+ - `LICENSE` - MIT license
69
+ - `PUBLISHING.md` - Publishing guide
70
+ - `PRE_PUBLISH_CHECKLIST.md` - Pre-publish steps
71
+ - `TEST_LOCALLY.md` - Testing guide
72
+
73
+ **docs/ Directory (13 files):**
74
+ - `README.md` - Documentation index
75
+ - `ARCHITECTURE.md` - System architecture
76
+ - `AUTHENTICATION.md` - OAuth 2.1 guide
77
+ - `BACKEND_ARCHITECTURE.md` - Backend details
78
+ - `CHANGELOG.md` - Version history
79
+ - `DESIGN_HOOT.md` - Design system
80
+ - `EXAMPLES.md` - Usage examples
81
+ - `MIGRATION_GUIDE.md` - Migration guide
82
+ - `QUICKSTART.md` - Quick start
83
+ - `STORAGE.md` - Storage system
84
+ - `TRANSPORTS.md` - MCP transports
85
+ - `TROUBLESHOOTING.md` - Common issues
86
+ - `V0.2_ROADMAP.md` - Future plans
87
+
88
+ ## 📊 Package Statistics
89
+
90
+ - **Root markdown files:** 6 (down from 25+)
91
+ - **Documentation files:** 13 (well-organized)
92
+ - **Test files:** 4
93
+ - **Example files:** 1
94
+ - **README.md:** 277 lines
95
+ - **CLI entry point:** 122 lines
96
+
97
+ ## 🚀 How It Works
98
+
99
+ When users run `npx -y hoot`:
100
+
101
+ 1. npm downloads and caches Hoot (if not already installed)
102
+ 2. Runs `bin/hoot.js`
103
+ 3. Script starts backend server on port 3002
104
+ 4. Script starts frontend on port 5173 with `--open` flag
105
+ 5. Browser opens automatically to http://localhost:5173
106
+ 6. User can immediately start testing MCP servers!
107
+ 7. Ctrl+C gracefully shuts down both servers
108
+
109
+ ## 📦 What's Included in npm Package
110
+
111
+ Files included (see `.npmignore`):
112
+ - ✅ `bin/` - CLI scripts
113
+ - ✅ `dist/` - Built frontend assets
114
+ - ✅ `mcp-backend-server.js` - Backend server
115
+ - ✅ `proxy-server.js` - Optional proxy
116
+ - ✅ `package.json` - Package metadata
117
+ - ✅ `README.md` - Documentation
118
+ - ✅ `LICENSE` - License file
119
+
120
+ Files excluded:
121
+ - ❌ `src/` - Source TypeScript files (use dist/)
122
+ - ❌ `docs/` - Documentation files
123
+ - ❌ `tests/` - Test files
124
+ - ❌ `examples/` - Example files
125
+ - ❌ `node_modules/` - Dependencies
126
+ - ❌ Development config files
127
+
128
+ ## 🎯 Next Steps
129
+
130
+ ### Before Publishing:
131
+
132
+ 1. **Test locally:**
133
+ ```bash
134
+ npm start
135
+ ```
136
+ Should start both servers and open browser.
137
+
138
+ 2. **Build for production:**
139
+ ```bash
140
+ npm run build
141
+ ```
142
+
143
+ 3. **Test the package:**
144
+ ```bash
145
+ npm pack
146
+ npm install -g ./hoot-0.2.0.tgz
147
+ hoot
148
+ npm uninstall -g hoot
149
+ rm hoot-0.2.0.tgz
150
+ ```
151
+
152
+ 4. **Publish to npm:**
153
+ ```bash
154
+ npm login
155
+ npm publish
156
+ ```
157
+
158
+ 5. **Verify it works:**
159
+ ```bash
160
+ npx -y hoot
161
+ ```
162
+
163
+ ### After Publishing:
164
+
165
+ 1. Create a GitHub release with v0.2.0 tag
166
+ 2. Share on social media
167
+ 3. Update any related documentation
168
+
169
+ ## 📖 Important Files to Review
170
+
171
+ Before publishing, review these files:
172
+
173
+ 1. **PRE_PUBLISH_CHECKLIST.md** - Complete checklist
174
+ 2. **PUBLISHING.md** - Detailed publishing guide
175
+ 3. **TEST_LOCALLY.md** - Testing instructions
176
+ 4. **README.md** - User-facing documentation
177
+ 5. **package.json** - Already has correct repository URLs
178
+
179
+ ## 🎉 Success Criteria
180
+
181
+ - ✅ Root folder is clean (only 6 markdown files)
182
+ - ✅ Documentation is well-organized in `docs/`
183
+ - ✅ Redundant files removed (15+ files deleted)
184
+ - ✅ NPX support configured
185
+ - ✅ Package.json properly configured
186
+ - ✅ .npmignore excludes dev files
187
+ - ✅ Contributing guidelines in place
188
+ - ✅ MIT license included
189
+ - ✅ Repository URLs set to portkey-ai/hoot
190
+
191
+ ## 🚀 Ready to Ship!
192
+
193
+ Your project is production-ready! Users will be able to:
194
+
195
+ ```bash
196
+ npx -y hoot
197
+ ```
198
+
199
+ And start testing MCP servers immediately with zero configuration!
200
+
201
+ ---
202
+
203
+ **Questions?** Check the detailed guides:
204
+ - `PRE_PUBLISH_CHECKLIST.md` - What to do before publishing
205
+ - `PUBLISHING.md` - How to publish to npm
206
+ - `TEST_LOCALLY.md` - How to test locally
207
+ - `CONTRIBUTING.md` - Development workflow
208
+
209
+ **Happy shipping! 🦉**
210
+
@@ -0,0 +1,98 @@
1
+ # Quick Start - Testing the Package Before Publishing
2
+
3
+ ## Test the CLI Locally
4
+
5
+ Before publishing to npm, test that everything works:
6
+
7
+ ### 1. Test the start script
8
+ ```bash
9
+ npm start
10
+ ```
11
+
12
+ This should:
13
+ - Start the backend server on port 3002
14
+ - Start the frontend on port 5173
15
+ - Open your browser automatically
16
+
17
+ Press `Ctrl+C` to stop.
18
+
19
+ ### 2. Test the CLI directly
20
+ ```bash
21
+ node bin/hoot.js
22
+ ```
23
+
24
+ Should behave the same as `npm start`.
25
+
26
+ ### 3. Test as a local package
27
+ ```bash
28
+ # Create a test tarball
29
+ npm pack
30
+
31
+ # Install it globally from the tarball
32
+ npm install -g ./hoot-0.2.0.tgz
33
+
34
+ # Run it
35
+ hoot
36
+
37
+ # Clean up
38
+ npm uninstall -g hoot
39
+ rm hoot-0.2.0.tgz
40
+ ```
41
+
42
+ ### 4. Test in a different directory
43
+ ```bash
44
+ # Go to a different directory
45
+ cd /tmp
46
+
47
+ # Run the global command (if still installed)
48
+ hoot
49
+
50
+ # Or test with the tarball
51
+ npm install -g /path/to/hoot-0.2.0.tgz
52
+ hoot
53
+ ```
54
+
55
+ ## What to Check
56
+
57
+ - ✅ Backend starts without errors
58
+ - ✅ Frontend starts without errors
59
+ - ✅ Browser opens automatically
60
+ - ✅ Can add a server in the UI
61
+ - ✅ Can connect to an MCP server
62
+ - ✅ Can execute tools
63
+ - ✅ OAuth flow works (if testing with OAuth server)
64
+ - ✅ Ctrl+C cleanly shuts down both servers
65
+
66
+ ## Common Issues
67
+
68
+ ### Port already in use
69
+ If port 3002 or 5173 is already in use:
70
+ ```bash
71
+ # Find and kill the process
72
+ lsof -ti:3002 | xargs kill -9
73
+ lsof -ti:5173 | xargs kill -9
74
+ ```
75
+
76
+ ### Permission denied
77
+ Make sure the CLI script is executable:
78
+ ```bash
79
+ chmod +x bin/hoot.js
80
+ ```
81
+
82
+ ### Module not found
83
+ Make sure dependencies are installed:
84
+ ```bash
85
+ npm install
86
+ ```
87
+
88
+ ## Ready to Publish?
89
+
90
+ Once everything tests successfully:
91
+
92
+ 1. Update version if needed: `npm version patch`
93
+ 2. Build: `npm run build`
94
+ 3. Publish: `npm publish`
95
+ 4. Test from npm: `npx -y hoot`
96
+
97
+ See `PUBLISHING.md` for detailed publishing instructions.
98
+