@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 +165 -55
- package/TEST_INFRASTRUCTURE.md +107 -0
- package/dist/assets/index-CSHSIIL3.js +400 -0
- package/dist/assets/{index-DFlEXctd.css → index-Cs_kWxgI.css} +1 -1
- package/dist/index.html +2 -2
- package/package.json +7 -6
- package/scripts/verify-package-security.js +178 -0
- package/server/durable-objects/mcp-connection-pool-do.js +59 -3
- package/server/lib/handlers.js +86 -9
- package/server/server-node.js +23 -6
- package/server/server-worker.js +26 -6
- package/vitest.config.test.js +75 -0
- package/dist/assets/index-pV0fh8HG.js +0 -373
package/README.md
CHANGED
|
@@ -1,106 +1,216 @@
|
|
|
1
|
-
# 🦉
|
|
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
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@portkey-ai/hoot)
|
|
4
|
+
[](https://www.npmjs.com/package/@portkey-ai/hoot)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](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
|
-
|
|
18
|
+
**🌐 Try instantly (no install):**
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
👉 **[hoot.run](https://hoot.run)** — Opens in your browser, ready to test.
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
**Or run locally:**
|
|
17
23
|
|
|
18
24
|
```bash
|
|
19
25
|
npx -y @portkey-ai/hoot
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
|
|
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
|

|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Features
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
- **
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
62
|
+
Browser (React) → Backend (Node.js/Express) → MCP Servers
|
|
51
63
|
```
|
|
52
64
|
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
58
|
-
- **
|
|
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
|
-
|
|
83
|
+
Your servers stay configured between sessions!
|
|
61
84
|
|
|
62
|
-
##
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
**Run from source:**
|
|
63
88
|
|
|
64
89
|
```bash
|
|
65
|
-
git clone
|
|
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
|
-
|
|
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
|
-
|
|
106
|
+
### Debugging
|
|
73
107
|
|
|
74
|
-
|
|
108
|
+
Hoot includes a client-side logger accessible from the browser console:
|
|
75
109
|
|
|
76
110
|
```javascript
|
|
77
|
-
hootLogger.download() //
|
|
111
|
+
hootLogger.download() // Download logs as JSON
|
|
112
|
+
hootLogger.clear() // Clear logs
|
|
78
113
|
```
|
|
79
114
|
|
|
80
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
|
|
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
|
-
|
|
149
|
+
<details>
|
|
150
|
+
<summary><strong>Is my data secure?</strong></summary>
|
|
91
151
|
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
155
|
+
<details>
|
|
156
|
+
<summary><strong>Can I use Hoot in production?</strong></summary>
|
|
97
157
|
|
|
98
|
-
|
|
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
|
-
|
|
161
|
+
<details>
|
|
162
|
+
<summary><strong>How do I test servers that require OAuth?</strong></summary>
|
|
101
163
|
|
|
102
|
-
|
|
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
|
-
|
|
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
|