@portkey-ai/hoot 0.13.0 → 0.15.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 CHANGED
@@ -1,106 +1,216 @@
1
- # 🦉 hoot
2
- > **⚠️ early beta** - things might break. if they do, [open an issue](https://github.com/Portkey-AI/hoot/issues).
3
- >
4
- > **🤝 contributions welcome** - see something that could be better? PRs are appreciated!
1
+ # 🦉 Hoot
5
2
 
6
- testing tool for MCP servers. like postman but for MCP.
3
+ [![npm version](https://img.shields.io/npm/v/@portkey-ai/hoot?color=5ccfe6&label=version)](https://www.npmjs.com/package/@portkey-ai/hoot)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@portkey-ai/hoot?color=5ccfe6)](https://www.npmjs.com/package/@portkey-ai/hoot)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-5ccfe6.svg)](https://opensource.org/licenses/MIT)
6
+ [![Node.js Version](https://img.shields.io/node/v/@portkey-ai/hoot?color=5ccfe6)](https://nodejs.org)
7
7
 
8
+ **MCP Testing Tool** — Like Postman, but for the Model Context Protocol.
9
+
10
+ Test, debug, and explore MCP servers with a beautiful interface. No AI chat needed.
8
11
 
9
12
  https://github.com/user-attachments/assets/e3add38e-9636-4f40-99d8-f4a2b8f0f056
10
13
 
14
+ > **⚠️ Beta Software** — Hoot is in active development. Found a bug? [Open an issue](https://github.com/Portkey-AI/hoot/issues). Want to contribute? [PRs welcome](./CONTRIBUTING.md)!
15
+
16
+ ## Quick Start
11
17
 
12
- ## why
18
+ **🌐 Try instantly (no install):**
13
19
 
14
- needed a quick way to test MCP servers without spinning up a whole AI chat interface.
20
+ 👉 **[hoot.run](https://hoot.run)** Opens in your browser, ready to test.
15
21
 
16
- ## install
22
+ **Or run locally:**
17
23
 
18
24
  ```bash
19
25
  npx -y @portkey-ai/hoot
20
26
  ```
21
27
 
22
- that's it. opens on localhost:8009
23
-
24
- or install globally if you want:
25
- ```bash
26
- npm install -g @portkey-ai/hoot
27
- hoot
28
- ```
28
+ Opens on `localhost:8009`. One command, zero config.
29
29
 
30
30
  ![npx-hoot](https://github.com/user-attachments/assets/3c8c80e2-6ad3-439e-80eb-e2f6c4d22d8e)
31
31
 
32
32
 
33
- ## what works
33
+ ## Features
34
34
 
35
- - connect to MCP servers (http/sse)
36
- - **auto-detection** - just paste a URL, we figure out the rest
37
- - see what tools they have
38
- - execute tools with params
39
- - view responses
40
- - oauth 2.1 if your server needs it
41
- - copy stuff to clipboard
42
- - **🦉 "try in hoot" links** - share servers with just a URL ([docs](./docs/TRY_IN_HOOT.md))
43
- - **8 beautiful themes** - light & dark modes ([docs](./docs/THEMES.md))
35
+ ### Core Testing
36
+ - **Connect to any MCP server** HTTP and SSE transport support
37
+ - **Auto-detection** Just paste a URL, Hoot figures out the rest
38
+ - **Execute tools** — Test tools with parameters and view responses
39
+ - **Copy-paste friendly** — Everything is clipboard-ready
44
40
 
45
- ## how it works
41
+ ### Authentication & Security
42
+ - **OAuth 2.1** with automatic discovery and compliance testing ([docs](./docs/OAUTH-COMPLIANCE-COMPLETE.md))
43
+ - **JWT-based sessions** — Secure local authentication
44
+ - **Rate limiting & audit logs** — Built-in security features
45
+ - **Localhost-only by default** — Safe for local development
46
46
 
47
- runs a node.js backend that connects to MCP servers (because CORS is annoying). react frontend talks to the backend over localhost.
47
+ ### Smart Features
48
+ - **Intelligent tool filtering** — Context-aware tool selection powered by AI
49
+ - **Chat interface** — Test tools conversationally with LLM assistance
50
+ - **Keyboard shortcuts** — Lightning-fast navigation ([docs](./docs/KEYBOARD_SHORTCUTS.md))
51
+ - **8 beautiful themes** — Light & dark modes for every preference ([docs](./docs/THEMES.md))
52
+
53
+ ### Sharing & Collaboration
54
+ - **🦉 "Try in Hoot" links** — Share servers with a single URL ([docs](./docs/TRY_IN_HOOT.md))
55
+ - **Persistent state** — Your servers and tools stay configured between sessions
56
+
57
+ ## How It Works
58
+
59
+ Hoot runs a Node.js backend that acts as the MCP client, eliminating CORS issues when connecting to MCP servers from your browser.
48
60
 
49
61
  ```
50
- browserbackendmcp servers
62
+ Browser (React) Backend (Node.js/Express) MCP Servers
51
63
  ```
52
64
 
53
- no cors issues. backend handles oauth tokens in sqlite.
65
+ **Architecture highlights:**
66
+ - **No CORS headaches** — Backend handles all MCP connections
67
+ - **Persistent OAuth tokens** — Stored securely in SQLite (`~/.hoot/hoot-mcp.db`)
68
+ - **Session-based auth** — JWT tokens for secure frontend-backend communication
69
+ - **Edge-ready** — Deploy to Cloudflare Workers for global hosting ([guide](./docs/CLOUDFLARE_DEPLOYMENT.md))
70
+
71
+ ### Data Persistence
54
72
 
55
- ### persistence
73
+ **On hoot.run:**
74
+ - **Server configs & tools** — Saved in browser localStorage
75
+ - **OAuth tokens** — Managed by the hosted backend
76
+ - **Chat history** — Preserved in localStorage
56
77
 
57
- - **server configs & tools**: saved in browser localStorage (survives page refreshes)
58
- - **oauth tokens**: stored in `~/.hoot/hoot-mcp.db` (persists across npx runs)
78
+ **On local (npx/npm):**
79
+ - **Server configs & tools** Saved in browser localStorage
80
+ - **OAuth tokens** — Stored in `~/.hoot/hoot-mcp.db` (persists across npx runs)
81
+ - **Chat history** — Preserved in localStorage
59
82
 
60
- your servers stay configured between sessions, even when running with `npx`!
83
+ Your servers stay configured between sessions!
61
84
 
62
- ## running from source
85
+ ## Development
86
+
87
+ **Run from source:**
63
88
 
64
89
  ```bash
65
- git clone <repo>
90
+ git clone https://github.com/Portkey-AI/hoot
91
+ cd hoot
66
92
  npm install
67
93
  npm run dev:full
68
94
  ```
69
95
 
70
- backend runs on 8008, frontend on 8009.
96
+ - Backend runs on `localhost:8008`
97
+ - Frontend runs on `localhost:8009`
98
+
99
+ **Available scripts:**
100
+ - `npm run dev:full` — Run both frontend and backend
101
+ - `npm run backend` — Backend only
102
+ - `npm run dev` — Frontend only
103
+ - `npm run build` — Build for npm distribution
104
+ - `npm run build:cloudflare` — Build for Cloudflare Workers
71
105
 
72
- ## debugging
106
+ ### Debugging
73
107
 
74
- there's a logger in the console:
108
+ Hoot includes a client-side logger accessible from the browser console:
75
109
 
76
110
  ```javascript
77
- hootLogger.download() // get logs
111
+ hootLogger.download() // Download logs as JSON
112
+ hootLogger.clear() // Clear logs
78
113
  ```
79
114
 
80
- ## 🔒 security
115
+ Backend logs are written to `backend.log`. See [logging docs](./docs/LOGGING.md) for details.
116
+
117
+ ## Documentation
118
+
119
+ - **[Quick Start Guide](./docs/QUICKSTART.md)** — Get up and running in 5 minutes
120
+ - **[Try in Hoot](./docs/TRY_IN_HOOT.md)** — Share servers with one-click links
121
+ - **[Authentication](./docs/AUTHENTICATION.md)** — OAuth 2.1 and API key setup
122
+ - **[Themes](./docs/THEMES.md)** — Customize your interface
123
+ - **[Keyboard Shortcuts](./docs/KEYBOARD_SHORTCUTS.md)** — Work faster
124
+ - **[Architecture](./docs/ARCHITECTURE.md)** — How Hoot is built
125
+ - **[Security](./docs/SECURITY.md)** — Security features and best practices
126
+ - **[Cloudflare Deployment](./docs/CLOUDFLARE_DEPLOYMENT.md)** — Deploy to the edge
127
+
128
+ [📚 Full Documentation](./docs/)
129
+
130
+ ## Why Hoot?
131
+
132
+ | Feature | Hoot | Manual curl/testing |
133
+ |---------|------|---------------------|
134
+ | **OAuth 2.1 support** | ✅ Automatic discovery & flow | ❌ Manual token management |
135
+ | **Transport auto-detection** | ✅ HTTP/SSE auto-detected | ❌ Manual configuration |
136
+ | **Visual interface** | ✅ Beautiful UI | ❌ Terminal only |
137
+ | **Tool filtering** | ✅ AI-powered context-aware | ❌ None |
138
+ | **Session persistence** | ✅ Configs & tokens saved | ❌ Reauth every time |
139
+ | **Share configurations** | ✅ One-click "Try in Hoot" links | ❌ Copy-paste configs |
140
+
141
+ ## FAQ
81
142
 
82
- hoot includes built-in security features for safe local development:
83
- - session-based authentication
84
- - ✅ rate limiting
85
- - ✅ audit logging
86
- - ✅ localhost-only access
143
+ <details>
144
+ <summary><strong>Does Hoot work with all MCP servers?</strong></summary>
87
145
 
88
- runs securely on your local machine. [read more](./docs/SECURITY.md)
146
+ Yes! Hoot supports both HTTP and SSE transports, OAuth 2.1, and API key authentication. We auto-detect server configurations to make connection as seamless as possible.
147
+ </details>
89
148
 
90
- ## what's missing
149
+ <details>
150
+ <summary><strong>Is my data secure?</strong></summary>
91
151
 
92
- - resources (coming)
93
- - prompts (coming)
94
- - more tests (working on it)
152
+ Yes. Hoot runs entirely on your local machine. OAuth tokens are stored in a local SQLite database (`~/.hoot/hoot-mcp.db`), and all communication happens over localhost. No data is sent to external servers.
153
+ </details>
95
154
 
96
- ## tech
155
+ <details>
156
+ <summary><strong>Can I use Hoot in production?</strong></summary>
97
157
 
98
- react 19, typescript, vite, zustand, express, MCP SDK
158
+ Hoot is designed for development and testing. For production deployments, you can deploy Hoot to Cloudflare Workers for your team. See our [deployment guide](./docs/CLOUDFLARE_DEPLOYMENT.md).
159
+ </details>
99
160
 
100
- ## license
161
+ <details>
162
+ <summary><strong>How do I test servers that require OAuth?</strong></summary>
101
163
 
102
- MIT
164
+ Just add the server URL. Hoot automatically detects OAuth requirements and guides you through the authorization flow. Tokens are stored securely and refreshed automatically.
165
+ </details>
166
+
167
+ <details>
168
+ <summary><strong>Can I test multiple servers at once?</strong></summary>
169
+
170
+ Absolutely! Connect to as many servers as you need. Hoot manages all connections simultaneously and lets you switch between them instantly.
171
+ </details>
172
+
173
+ <details>
174
+ <summary><strong>Does Hoot support resources and prompts?</strong></summary>
175
+
176
+ Not yet, but they're coming soon! Currently, Hoot focuses on tool testing. Resources and prompts are on our roadmap.
177
+ </details>
178
+
179
+ ## Roadmap
180
+
181
+ We're working towards full MCP specification support. Coming soon:
182
+
183
+ - **Resources** — MCP resource listing and reading
184
+ - **Prompts** — MCP prompt testing and execution
185
+ - **Electron desktop app** — Native app with stdio transport support
186
+ - **Collaborative workspaces** — Share server configs with teams
187
+
188
+ Want to contribute? Check out [CONTRIBUTING.md](./CONTRIBUTING.md) or [open an issue](https://github.com/Portkey-AI/hoot/issues) with feature requests!
189
+
190
+ ## Technology Stack
191
+
192
+ - **Frontend** — React 19, TypeScript, Vite, Zustand
193
+ - **Backend** — Node.js, Express, MCP SDK
194
+ - **Database** — SQLite (better-sqlite3)
195
+ - **Deployment** — npm, Cloudflare Workers + Durable Objects
196
+ - **AI** — Workers AI for semantic tool filtering
197
+
198
+ ## Contributing
199
+
200
+ We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
201
+
202
+ **Ways to contribute:**
203
+ - 🐛 Report bugs and issues
204
+ - 💡 Suggest new features
205
+ - 📝 Improve documentation
206
+ - 🔧 Submit pull requests
207
+
208
+ ## License
209
+
210
+ MIT License — see [LICENSE](./LICENSE) for details.
103
211
 
104
212
  ---
105
213
 
106
- made this because i was tired of curl-ing MCP servers. hope it helps.
214
+ **Built by [Portkey](https://portkey.ai)** Making AI development easier, one tool at a time.
215
+
216
+ Made this because we were tired of curl-ing MCP servers. Hope it helps! 🦉
@@ -0,0 +1,107 @@
1
+ # Hoot Test Infrastructure
2
+
3
+ Production-ready test MCP server with OAuth 2.1 for comprehensive Hoot testing.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Interactive demo
9
+ npm run test:quick-start
10
+
11
+ # Start test server manually
12
+ npm run test:server
13
+
14
+ # Run tests
15
+ npm test
16
+ ```
17
+
18
+ ## Test Server Endpoints
19
+
20
+ | Endpoint | URL |
21
+ |----------|-----|
22
+ | MCP | `http://localhost:9000/mcp` |
23
+ | Health | `http://localhost:9000/health` |
24
+ | OAuth Discovery | `http://localhost:9001/.well-known/oauth-authorization-server` |
25
+ | OAuth Authorize | `http://localhost:9001/oauth/authorize` |
26
+ | OAuth Token | `http://localhost:9001/oauth/token` |
27
+
28
+ ## Test Credentials
29
+
30
+ | Type | Client ID | Secret | API Key |
31
+ |------|-----------|--------|---------|
32
+ | OAuth Public | `test-client-public` | - | - |
33
+ | OAuth Confidential | `test-client-confidential` | `test-secret-123` | - |
34
+ | API Key | - | - | `test-api-key-valid` |
35
+
36
+ ## Available Tools
37
+
38
+ | Tool | Description |
39
+ |------|-------------|
40
+ | `echo` | Echo back input |
41
+ | `add` | Add two numbers |
42
+ | `get_weather` | Mock weather data |
43
+ | `complex_tool` | Nested parameters |
44
+ | `long_running_task` | Simulated delay |
45
+ | `error_generator` | Generate errors |
46
+
47
+ ## Usage in Tests
48
+
49
+ ```javascript
50
+ import { TestServerManager } from './helpers/server-manager.js';
51
+ import { validServerConfigs, toolTestCases } from './helpers/test-data.js';
52
+
53
+ describe('My Tests', () => {
54
+ let server;
55
+
56
+ beforeAll(async () => {
57
+ server = new TestServerManager();
58
+ await server.start();
59
+ });
60
+
61
+ afterAll(async () => {
62
+ await server.stop();
63
+ });
64
+
65
+ it('should work', async () => {
66
+ // server.mcpUrl, server.oauthUrl, server.getTestCredentials()
67
+ });
68
+ });
69
+ ```
70
+
71
+ ## Manual Testing with Hoot
72
+
73
+ ```bash
74
+ # Terminal 1: Test server
75
+ npm run test:server
76
+
77
+ # Terminal 2: Hoot backend
78
+ npm run server
79
+
80
+ # Terminal 3: Hoot frontend
81
+ npm run dev
82
+ ```
83
+
84
+ Connect Hoot to `http://localhost:9000/mcp` with OAuth using custom endpoints.
85
+
86
+ ## Architecture
87
+
88
+ ```
89
+ tests/
90
+ ├── mock-servers/
91
+ │ └── test-mcp-server.js # MCP + OAuth server (~900 lines)
92
+ ├── helpers/
93
+ │ ├── server-manager.js # Server lifecycle
94
+ │ └── test-data.js # Test fixtures
95
+ ├── example-mcp-lifecycle.test.js
96
+ ├── global-setup.js
97
+ └── quick-start.js
98
+ ```
99
+
100
+ ## Features
101
+
102
+ - ✅ Full MCP protocol (2025-11-25 spec)
103
+ - ✅ OAuth 2.1 with PKCE (required)
104
+ - ✅ Custom OAuth endpoints
105
+ - ✅ API key authentication
106
+ - ✅ Rate limiting, logging, health checks
107
+ - ✅ Comprehensive test fixtures