Commit ea5ee1b
authored
Release v1.5.0: MCP SDK upgrade, security improvements, and new tools (#6)
* feat: add default inbox configuration and remove deprecated PAT authentication
This commit implements three major improvements:
1. Default Inbox Configuration (Option 4 - Hybrid Approach)
- Add HELPSCOUT_DEFAULT_INBOX_ID environment variable
- Automatic inbox scoping: explicit inboxId > default > all inboxes
- Clear feedback in search results showing which scope was used
- Improves LLM context when users don't specify inbox
- All search tools (searchConversations, advancedConversationSearch, comprehensiveConversationSearch) support default inbox
2. Remove Personal Access Token Authentication
- Help Scout API only supports OAuth2 Client Credentials (verified from official docs)
- Removed PAT authentication logic from helpscout-client.ts
- Updated all documentation (README.md, CLAUDE.md) to OAuth2-only
- Updated config validation to require OAuth2 credentials
- Clearer error messages mentioning OAuth2 specifically
- Updated all tests to use OAuth2 mocking
3. Repository Cleanup
- Removed outdated documentation files:
* PLANNED_IMPROVEMENTS.md (2-item outdated planning doc)
* PRODUCTION_WORKFLOW.md (v1.2.1 workflow, superseded by CLAUDE.md)
* test_search_examples.md (old manual test examples)
- Kept CONTRIBUTING.md (still relevant)
Breaking Changes:
- Personal Access Token authentication no longer supported
- Users must use OAuth2 Client Credentials (HELPSCOUT_CLIENT_ID + HELPSCOUT_CLIENT_SECRET)
Migration Guide:
- If using HELPSCOUT_API_KEY=Bearer token: migrate to OAuth2 app in Help Scout My Apps
- Optional: Set HELPSCOUT_DEFAULT_INBOX_ID to improve LLM search context
* feat: add comprehensive MCP client testing framework with .env support
- Create test-mcp-client.cjs for end-to-end MCP protocol testing
- Update test-docker.cjs to load credentials from .env file
- Update .env.example to reflect OAuth2-only authentication
- Add npm script: npm run test:mcp for quick integration testing
- Support HELPSCOUT_DEFAULT_INBOX_ID in all test scripts
- Fix security vulnerabilities in dependencies (axios, form-data)
Testing Framework:
- npm run test:mcp - Direct MCP client test (fastest, tests built server)
- npm run test:docker - Docker integration test with .env credentials
- npm run test:docker:ci - CI-safe test (no auth required)
Tests validate:
- Server startup and initialization
- All 8 MCP tools (listAllInboxes, searchConversations, etc.)
- Resources and prompts endpoints
- Default inbox configuration behavior
- OAuth2 authentication flow
All tests now load credentials from .env file for convenience.
* feat: add structuredConversationFilter for ID-based refinement after content discovery
Adds new tool for structural filtering by:
- assignedTo: Filter by user ID (discovered from previous searches)
- customerIds: Batch customer lookup by IDs
- conversationNumber: Direct ticket #12345 lookup
- folderId: Folder-based filtering (power users)
- Advanced sorting: waitingSince, customerName, customerEmail
Design philosophy: Enhancement, not replacement
- Content search remains primary (comprehensiveConversationSearch)
- This tool for refinement after discovering IDs
- Enables: rep queue queries, SLA sorting, efficient customer history
Tool description explicitly lists 5 unique fields and when to use each.
* fix: critical security and reliability improvements from code review
Security Fixes:
- Add query injection protection by escaping user input in Help Scout query syntax
- Detect deprecated PAT tokens and reject with clear migration error
- Add integer bounds validation (assignedTo, folderId, customerIds, conversationNumber)
- Enforce HTTPS for API base URL to prevent credential exposure
- Remove internal URL/method from error responses (log internally only)
Reliability Fixes:
- Add promise-based locking to prevent concurrent token refresh race conditions
- Document client-side createdBefore filtering limitation in responses
- Add warnings when pagination totals don't reflect filtered results
All fixes validated with real Help Scout data (16,443 conversations tested).
* fix: improve tool discovery with clearer descriptions and decision tree
Tool Description Improvements:
- searchConversations: Simplified to 'list by time/status' (no keywords needed)
- comprehensiveConversationSearch: Clear 'keyword search' with use case examples
- advancedConversationSearch: Explicit about complex filters (domains, tags, boolean)
- structuredConversationFilter: Clear it's for IDs or ticket number lookup
README Enhancements:
- Added 'Quick Guide: Which tool should I use?' decision tree
- Clear USE FOR examples in table: 'Recent tickets' vs 'Find billing issues'
- Categorized tools by purpose: TIME/STATUS, KEYWORD, ID LOOKUP, COMPLEX
- Added listAllInboxes to tools table (was missing)
Addresses critical tool confusion issue where LLM couldn't determine which search tool to use.
* feat: upgrade to MCP SDK 1.22.0 and migrate DXT to MCPB 2.0.1
Package Upgrades:
- @modelcontextprotocol/sdk: 1.17.4 → 1.22.0 (latest)
- @anthropic-ai/dxt: 0.2.6 → removed
- @anthropic-ai/mcpb: 2.0.1 → installed
- Fixed security vulnerabilities (glob, js-yaml)
Breaking Changes Fixed:
- MCP SDK 1.22.0: Resource type no longer has 'text' field
- Updated all resource handlers to return TextResourceContents
- Resources now separate metadata (Resource) from content (TextResourceContents)
Script Updates:
- mcpb:pack now uses '@anthropic-ai/mcpb pack' instead of '@anthropic-ai/dxt pack'
- Updated build-dxt.js instructions to reference MCPB CLI
- Updated .gitignore to include *.mcpb files
Build Status:
- TypeScript compilation: ✅ PASS
- Type checking: ✅ PASS
- All 9 tools compatible with SDK 1.22.0
* feat: improve content redaction naming and auth variable alignment
- Add HELPSCOUT_APP_ID/APP_SECRET to match Help Scout UI terminology
- Add REDACT_MESSAGE_CONTENT as primary content control variable
- Default to showing content (REDACT_MESSAGE_CONTENT=false)
- Update redaction placeholder with actionable message
- Maintain backwards compatibility with ALLOW_PII and CLIENT_ID/SECRET
- Update DXT tests for 9 tools (added structuredConversationFilter)
- Fix tools.test.ts mock conflicts with unique conversation IDs
* test: update config test to use CLIENT_ID/SECRET
Align test with auth variable changes - use HELPSCOUT_CLIENT_ID
and HELPSCOUT_CLIENT_SECRET instead of deprecated Bearer token pattern.
* chore: upgrade MCP SDK to 1.25.2
Bump @modelcontextprotocol/sdk from 1.22.0 to 1.25.2
* chore: add dev utility scripts for testing
- check-conversations.ts: Query and verify conversation data
- debug-api.ts: Debug Help Scout API responses
- generate-synthetic-data.ts: Create synthetic test data
- import-conversations.ts: Import conversations for testing
- live-api-test.ts: Live API integration testing
- verify-credentials.ts: Validate Help Scout credentials
All scripts use HELPSCOUT_DEFAULT_INBOX_ID from .env for mailbox operations.
Script state files (.import-progress.json) are gitignored.
* chore: bump version 1.3.0 → 1.4.0 (minor)
- Update package.json version
- Update Dockerfile version label
- Update MCP server version in source code
- Update mcp.json version
- Update DXT manifest version
- Automated version bump for release
* docs: clean up README formatting, update env vars, and modernize ecosystem references
- Remove excessive emojis from headers
- Add About This Project section at bottom
- Update all examples to use APP_ID/APP_SECRET as primary
- Fix config.ts secret precedence for consistency
- Update Compatibility section with current MCP ecosystem
- Broaden Quick Start headers for multi-client support
- Update What's New section for v1.4.0
* chore: bump to v1.5.0, add CI branch guard for Docker builds
- Add main branch verification to docker job (prevents dev tag builds)
- Bump all version files to 1.5.0 (package.json, src/index.ts, Dockerfile, mcp.json, manifest.json)
- Update README env vars to prioritize APP_ID/APP_SECRET
- Update MCP ecosystem compatibility section
- Delete errant v1.4.0 tag that was pushed from dev1 parent 60608f8 commit ea5ee1b
39 files changed
Lines changed: 4765 additions & 740 deletions
File tree
- .github/workflows
- helpscout-mcp-extension
- scripts
- src
- __tests__
- prompts
- resources
- schema
- tools
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
4 | 12 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
9 | 23 | | |
10 | 24 | | |
11 | | - | |
12 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
13 | 34 | | |
14 | 35 | | |
15 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
This file was deleted.
This file was deleted.
0 commit comments