@usewhisper/mcp-server 0.5.0 → 1.3.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.
Files changed (3) hide show
  1. package/README.md +145 -196
  2. package/dist/server.js +1050 -44
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,198 +1,147 @@
1
1
  # @usewhisper/mcp-server
2
2
 
3
- Model Context Protocol server for [Whisper Context API](https://usewhisper.dev) - Connect Claude Desktop to your knowledge base.
4
-
5
- Whisper makes code agents refuse unsupported claims about your codebase by combining retrieval, claim verification, and evidence-locked answering.
6
-
7
- **Version 0.2.0** - Now with 15 tools including SOTA Memory System, Oracle Research Mode, and Cost Optimization!
8
-
9
- ## What is MCP?
10
-
11
- The Model Context Protocol (MCP) allows Claude Desktop to connect directly to external knowledge sources and tools. This server gives Claude Desktop access to your Whisper Context projects, enabling seamless RAG-powered conversations with advanced memory and research capabilities.
12
-
13
- ## Installation
14
-
15
- ```bash
16
- npm install -g @usewhisper/mcp-server
17
- ```
18
-
19
- ## Setup
20
-
21
- ### 1. Get Your API Key
22
-
23
- Get your Whisper API key from the [dashboard](https://usewhisper.dev/dashboard).
24
-
25
- ### 2. Configure Claude Desktop
26
-
27
- Add to your Claude Desktop config file:
28
-
29
- **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
30
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
31
-
32
- ```json
33
- {
34
- "mcpServers": {
35
- "whisper-context": {
36
- "command": "whisper-context-mcp",
37
- "env": {
38
- "WHISPER_API_KEY": "wctx_...",
39
- "WHISPER_PROJECT": "my-project"
40
- }
41
- }
42
- }
43
- }
44
- ```
45
-
46
- **Optional environment variables:**
47
- - `WHISPER_BASE_URL`: Custom API endpoint (defaults to `https://context.usewhisper.dev`)
48
-
49
- ### 3. Restart Claude Desktop
50
-
51
- After configuration, restart Claude Desktop. The MCP server will appear in the bottom-right corner.
52
-
53
- ## Available Tools
54
-
55
- Once connected, Claude Desktop gets access to these tools:
56
-
57
- ### Trust pipeline (recommended first)
58
-
59
- 1. `resolve_workspace`
60
- 2. `repo_index_status`
61
- 3. `get_relevant_context`
62
- 4. `claim_verifier`
63
- 5. `evidence_locked_answer`
64
-
65
- ### query_context
66
- Search your knowledge base with hybrid vector+keyword search, memory inclusion, and knowledge graph traversal.
67
-
68
- ```
69
- Query your docs project for "authentication flow"
70
- ```
71
-
72
- ### add_memory
73
- Store persistent memories (facts, preferences, decisions) across conversations.
74
-
75
- ```
76
- Remember that I prefer TypeScript over JavaScript
77
- ```
78
-
79
- ### search_memories
80
- Recall facts and preferences from previous interactions.
81
-
82
- ```
83
- What programming languages do I prefer?
84
- ```
85
-
86
- ### list_projects
87
- List all available context projects.
88
-
89
- ### list_sources
90
- See all data sources connected to a project (GitHub, Notion, Confluence, etc).
91
-
92
- ### add_context
93
- Add text content directly to your knowledge base.
94
-
95
- ```
96
- Add this API documentation to my docs project
97
- ```
98
-
99
- ### track_conversation
100
- Record conversation messages for context tracking.
101
-
102
- ### get_conversation
103
- Retrieve conversation history for a session.
104
-
105
- ### get_relevant_context
106
- Core retrieval contract with ranked evidence payloads (`path:line` ready).
107
-
108
- ### claim_verifier
109
- Checks a claim and returns `supported | partial | unsupported` with evidence spans.
110
-
111
- ### evidence_locked_answer
112
- Returns a cited answer only when thresholds are met; otherwise returns explicit abstain payload.
113
-
114
- ### forget
115
- Deletes or invalidates memories with immutable audit metadata.
116
-
117
- ### export_context_bundle / import_context_bundle
118
- Round-trip project/workspace context in a portable bundle with checksum verification.
119
-
120
- ### diff_context
121
- Deterministic change view anchored by `session_id`, `timestamp`, or `commit`.
122
-
123
- ## Usage Examples
124
-
125
- Once configured, you can chat with Claude Desktop naturally:
126
-
127
- ```
128
- You: "Query my engineering-docs project for how to deploy to production"
129
- Claude: [Uses query_context tool to search your docs]
130
-
131
- You: "Remember that our staging environment is at staging.example.com"
132
- Claude: [Uses add_memory to store this fact]
133
-
134
- You: "What projects do I have?"
135
- Claude: [Uses list_projects to show all your context projects]
136
- ```
137
-
138
- ## Features
139
-
140
- - **Semantic Search**: Vector embeddings + BM25 hybrid search
141
- - **Conversational Memory**: Persistent memories across sessions
142
- - **Knowledge Graph**: Graph-based context traversal
143
- - **Auto-sync Sources**: GitHub, Notion, Confluence, Slack, and 10+ more
144
- - **Direct Ingestion**: Add content directly from conversations
145
- - **Session Tracking**: Maintains conversation context
146
-
147
- ## Architecture
148
-
149
- The MCP server connects to your Whisper Context API:
150
- - **Whisper Context API** for semantic search, memory, and knowledge graph
151
- - **Stdio Transport** for Claude Desktop communication
152
- - **Zero dependencies** on database or infrastructure
153
-
154
- ## Environment Variables
155
-
156
- | Variable | Required | Description |
157
- |----------|----------|-------------|
158
- | `WHISPER_API_KEY` | Yes | Your Whisper API key (get from dashboard) |
159
- | `WHISPER_PROJECT` | Optional | Default project name/slug for all operations |
160
- | `WHISPER_BASE_URL` | Optional | Custom API endpoint (defaults to https://context.usewhisper.dev) |
161
-
162
- ## Troubleshooting
163
-
164
- ### Server not appearing in Claude Desktop
165
-
166
- 1. Check the config file path is correct
167
- 2. Verify JSON syntax is valid
168
- 3. Restart Claude Desktop completely
169
- 4. Check Claude Desktop logs: `~/Library/Logs/Claude/` (Mac) or `%APPDATA%\Claude\logs\` (Windows)
170
-
171
- ### Connection errors
172
-
173
- - Verify your `WHISPER_API_KEY` is valid (starts with `wctx_`)
174
- - Check that you have network connectivity to the API
175
- - Ensure your API key has the necessary permissions
176
-
177
- ### "Project not found" errors
178
-
179
- - Make sure your project name/slug is correct
180
- - Set `WHISPER_PROJECT` in config for a default project
181
- - Use `list_projects` tool to see all available projects
182
-
183
- ### No results from queries
184
-
185
- - Make sure your project has data sources connected or documents ingested
186
- - Verify the project name/slug matches exactly
187
- - Check that sources have been synced successfully in the dashboard
188
-
189
- ## Links
190
-
191
- - [Documentation](https://docs.usewhisper.dev/mcp)
192
- - [MCP Protocol](https://modelcontextprotocol.io)
193
- - [GitHub](https://github.com/usewhisper/whisper)
194
- - [Website](https://usewhisper.dev)
195
-
196
- ## License
197
-
198
- MIT
3
+ Whisper MCP is the universal context bridge for coding agents. It connects Claude/Cursor/VS Code/Windsurf/Cline/Continue to fresh, indexed context with grounded retrieval and memory.
4
+
5
+ ## What's New (Major)
6
+
7
+ - Canonical namespaced tool surface (breaking rename)
8
+ - Source multiplexer in `context.add_source` for `github|web|pdf|local|slack|video`
9
+ - Auto-index by default for created sources
10
+ - Runtime modes: `remote` (default), `local`, `auto`
11
+ - Degraded retrieval behavior: lexical fallback with explicit `degraded_mode`
12
+ - Scoped MCP config generator: `whisper-context-mcp scope ...`
13
+ - Tool migration helper: `whisper-context-mcp --print-tool-map`
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm i -g @usewhisper/mcp-server
19
+ ```
20
+
21
+ ## Required Environment
22
+
23
+ - `WHISPER_API_KEY` (required)
24
+ - `WHISPER_PROJECT` (optional default)
25
+ - `WHISPER_BASE_URL` (optional, defaults to `https://context.usewhisper.dev`)
26
+ - `WHISPER_MCP_MODE` (optional: `remote|local|auto`, default `remote`)
27
+ - `WHISPER_LOCAL_ALLOWLIST` (optional comma-separated roots for local ingest)
28
+ - `SLACK_BOT_TOKEN` (required for Slack connector runs)
29
+ - `SLACK_CHANNEL_ID` (required for Slack connector runs)
30
+
31
+ ## Connector Status + Credentials
32
+
33
+ | Connector | Status | Minimum required config/creds |
34
+ |---|---|---|
35
+ | GitHub | Production-ready | `type=github`, `owner`, `repo` (optional `token`, `branch`, `paths`) |
36
+ | Web | Production-ready | `type=web`, `url` (optional `crawl_depth`, `include_paths`, `exclude_paths`) |
37
+ | PDF | Production-ready | `type=pdf`, `url` or `file_path` |
38
+ | Slack | Production-ready (requires Slack auth) | `type=slack`, `token`, `channel_ids[]` (optional `since`, `workspace_id`) |
39
+ | Local | Production-ready | `type=local`, `path` (optional `glob`, `max_files`) |
40
+ | Video | Production-ready | `type=video`, `url` (optional `platform`, `language`, `allow_stt_fallback`, `max_duration_minutes`, `max_chunks`) |
41
+
42
+ ## Canonical Tools
43
+
44
+ 1. `context.list_projects`
45
+ 2. `context.list_sources`
46
+ 3. `context.add_source`
47
+ 4. `context.source_status`
48
+ 5. `context.query`
49
+ 6. `context.get_relevant`
50
+ 7. `context.claim_verify`
51
+ 8. `context.evidence_answer`
52
+ 9. `context.export_bundle`
53
+ 10. `context.import_bundle`
54
+ 11. `context.diff`
55
+ 12. `context.share`
56
+ 13. `memory.add`
57
+ 14. `memory.search`
58
+ 15. `memory.forget`
59
+ 16. `memory.consolidate`
60
+ 17. `research.oracle`
61
+ 18. `index.workspace_status`
62
+ 19. `index.workspace_run`
63
+ 20. `index.local_scan_ingest`
64
+ 21. `index.autosubscribe_deps`
65
+ 22. `code.search_text`
66
+ 23. `code.search_semantic`
67
+
68
+ ## Agent-Friendly Aliases
69
+
70
+ These aliases sit on top of the canonical namespaced tools and are easier for coding agents to pick correctly:
71
+
72
+ - `search` -> `context.query`
73
+ - `search_code` -> `code.search_semantic`
74
+ - `grep` -> `code.search_text`
75
+ - `read` -> local file read with optional line ranges
76
+ - `explore` -> local repository tree browsing
77
+ - `research` -> `research.oracle`
78
+ - `index` -> source add or workspace refresh
79
+ - `remember` -> `memory.add`
80
+ - `recall` -> `memory.search`
81
+ - `share_context` -> `context.share`
82
+
83
+ ## Source Contract (`context.add_source`)
84
+
85
+ Input:
86
+ - `project?`, `type`, `name?`, `auto_index?` (default `true`), `metadata?`
87
+ - `type=github`: `owner`, `repo`, `branch?`, `paths?`
88
+ - `type=web`: `url`, `crawl_depth?`, `include_paths?`, `exclude_paths?`
89
+ - `type=pdf`: `url?`, `file_path?`
90
+ - `type=local`: `path`, `glob?`, `max_files?`
91
+ - `type=slack`: `token`, `channel_ids[]`, `workspace_id?`, `since?`, `auth_ref?`
92
+ - `type=video`: `url`, `platform?`, `language?`, `allow_stt_fallback?`, `max_duration_minutes?`, `max_chunks?`
93
+
94
+ Output:
95
+ - `source_id`
96
+ - `status` (`queued|indexing|ready|failed`)
97
+ - `job_id`
98
+ - `index_started`
99
+ - `warnings[]`
100
+
101
+ ## Scoped MCP Generator
102
+
103
+ ```bash
104
+ whisper-context-mcp scope --project my-project --source github --client claude
105
+ ```
106
+
107
+ Optional write:
108
+
109
+ ```bash
110
+ whisper-context-mcp scope --project my-project --source github --client vscode --write "$HOME/.config/Code/User/mcp.json"
111
+ ```
112
+
113
+ ## Breaking Rename Migration
114
+
115
+ Print full map:
116
+
117
+ ```bash
118
+ whisper-context-mcp --print-tool-map
119
+ ```
120
+
121
+ This release removes legacy un-namespaced tool names.
122
+
123
+ ## Security Defaults
124
+
125
+ Local ingest (`index.local_scan_ingest` and `type=local`) enforces:
126
+ - allowlisted roots
127
+ - secret/sensitive path filters (`.env`, `.pem`, `.key`, `.aws`, `.ssh`, build artifacts)
128
+ - content redaction pass for likely secrets
129
+
130
+ ## 30-Second Demo
131
+
132
+ One-command wizard + production MCP connectors + scoped config:
133
+
134
+ ```bash
135
+ npx whisper-wizard
136
+ ```
137
+
138
+ Flow:
139
+ 1. Run wizard and complete auth/project setup.
140
+ 2. Add a source with MCP:
141
+ `context.add_source` (for example GitHub/Web/PDF/Slack/Local/Video).
142
+ 3. Ask a grounded question:
143
+ `context.query` or `context.evidence_answer` for citation-locked output.
144
+
145
+ ## License
146
+
147
+ MIT