mcp-sequential-research 1.0.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,251 @@
1
+ # mcp-sequential-research
2
+
3
+ A Model Context Protocol (MCP) server for structured, reproducible research planning and report compilation. Designed for patent prior art research, technical investigations, and systematic literature reviews.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/mcp-sequential-research.svg)](https://www.npmjs.com/package/mcp-sequential-research)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Features
9
+
10
+ - **Structured Research Plans** — Generate ordered queries with dependencies, priorities, and extraction goals
11
+ - **Patent-Grade Analysis** — Specialized query families for prior art research (broad, synonyms, competitors, limitations)
12
+ - **Reproducible Workflows** — Deterministic planning without external API calls
13
+ - **Machine-Parseable Citations** — Stable `[S#]` format for downstream claim-mining
14
+ - **Prior Art Clustering** — Automatic grouping of related sources
15
+ - **Claim Risk Analysis** — Flags for potential novelty issues
16
+ - **Zod Validation** — Full TypeScript type safety with runtime validation
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install mcp-sequential-research
22
+ ```
23
+
24
+ Or run directly:
25
+
26
+ ```bash
27
+ npx mcp-sequential-research
28
+ ```
29
+
30
+ ## Quick Start
31
+
32
+ ### Add to Claude Desktop
33
+
34
+ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "sequential-research": {
40
+ "command": "npx",
41
+ "args": ["mcp-sequential-research"]
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ ### Add to Claude Code
48
+
49
+ Add to your project's `.mcp.json`:
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "sequential-research": {
55
+ "command": "npx",
56
+ "args": ["mcp-sequential-research"]
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## Tools
63
+
64
+ ### `sequential_research_plan`
65
+
66
+ Generates a structured research plan with queries, extraction goals, and expected result schemas.
67
+
68
+ **When to use:**
69
+ - Multi-concept research topics
70
+ - Prior art investigations
71
+ - Systematic literature reviews
72
+ - When you need reproducible query coverage
73
+
74
+ **Input:**
75
+
76
+ ```json
77
+ {
78
+ "topic": "photonic computing for neural network inference",
79
+ "depth": "standard",
80
+ "focus_areas": ["silicon photonics", "energy efficiency"],
81
+ "constraints": ["patent-focused", "post-2020"],
82
+ "output_format": "markdown"
83
+ }
84
+ ```
85
+
86
+ **Output:**
87
+ - Ordered queries with priorities and dependencies
88
+ - Extraction goals per query
89
+ - Expected result schemas
90
+ - Execution order (parallel groups)
91
+ - Estimated source count
92
+
93
+ ### `sequential_research_compile`
94
+
95
+ Compiles raw research results into a structured report with citations and analysis.
96
+
97
+ **When to use:**
98
+ - After executing searches via Google Patents, web search, etc.
99
+ - When you need a citable report
100
+ - For prior art analysis with risk assessment
101
+
102
+ **Input:**
103
+
104
+ ```json
105
+ {
106
+ "plan": { /* plan from sequential_research_plan */ },
107
+ "raw_results": [
108
+ {
109
+ "query_id": "q1",
110
+ "success": true,
111
+ "data": { /* extracted data */ },
112
+ "sources": [
113
+ {
114
+ "id": "S1",
115
+ "source_type": "document",
116
+ "title": "US11123456B2 - Photonic Processor",
117
+ "url": "https://patents.google.com/patent/US11123456B2"
118
+ }
119
+ ]
120
+ }
121
+ ],
122
+ "include_sources": true,
123
+ "citation_style": "inline"
124
+ }
125
+ ```
126
+
127
+ **Output:**
128
+ - Executive summary
129
+ - Organized report sections
130
+ - Inline citations `[1]`, `[2]`
131
+ - Prior art clusters
132
+ - Claim risk flags
133
+ - Novelty gap suggestions
134
+ - Consolidated sources table
135
+
136
+ ## Patent-Grade Research
137
+
138
+ This server includes specialized query families for patent prior art research:
139
+
140
+ ### Patent Query Types
141
+ - **Broad concept** — High-level technology area
142
+ - **Synonyms** — Alternative terminology
143
+ - **Problem/benefit framing** — Problem-solution pairs
144
+ - **Competitor/assignee** — Known players in the space
145
+ - **Component-level limitations** — Narrow novelty claims
146
+
147
+ ### Web Query Types
148
+ - **Academic** — `.edu` sites, PDF papers
149
+ - **Vendor documentation** — Technical specifications
150
+ - **Open source** — GitHub, GitLab repositories
151
+ - **Conference papers** — IEEE, ACM, arXiv
152
+
153
+ ### Analysis Features
154
+ - **Prior art clusters** — Grouped related sources
155
+ - **Claim risk flags** — Potential novelty blockers
156
+ - **Novelty gaps** — Suggestions for differentiation
157
+
158
+ ## Workflow Example
159
+
160
+ ```typescript
161
+ // 1. Generate plan
162
+ const plan = await callTool("sequential_research_plan", {
163
+ topic: "optical matrix multiplication",
164
+ depth: "standard",
165
+ focus_areas: ["photonic tensor cores"]
166
+ });
167
+
168
+ // 2. Execute queries using appropriate MCP tools
169
+ const results = [];
170
+ for (const query of plan.queries) {
171
+ // Use Google Patents MCP, Google Search MCP, etc.
172
+ const result = await executeQuery(query);
173
+ results.push(normalizeResult(query.query_id, result));
174
+ }
175
+
176
+ // 3. Compile report
177
+ const report = await callTool("sequential_research_compile", {
178
+ plan,
179
+ raw_results: results,
180
+ include_sources: true
181
+ });
182
+
183
+ // 4. Save outputs
184
+ await saveFile(`research/${slug}/report.md`, report.markdown_report);
185
+ await saveFile(`research/${slug}/sources.json`, report.sources);
186
+ ```
187
+
188
+ ## Development
189
+
190
+ ```bash
191
+ # Install dependencies
192
+ npm install
193
+
194
+ # Run in development mode
195
+ npm run dev
196
+
197
+ # Build for production
198
+ npm run build
199
+
200
+ # Run linter
201
+ npm run lint
202
+ ```
203
+
204
+ ## API Reference
205
+
206
+ See [docs/TOOL_CONTRACTS.md](docs/TOOL_CONTRACTS.md) for complete JSON schemas and test data.
207
+
208
+ See [docs/MCP_GUIDANCE.md](docs/MCP_GUIDANCE.md) for workflow guidance and best practices.
209
+
210
+ ## Citation Format
211
+
212
+ All citations use stable, machine-parseable identifiers:
213
+
214
+ ```markdown
215
+ Photonic computing achieves 10x efficiency [1], [2].
216
+
217
+ ---
218
+ ### References
219
+
220
+ | ID | Title | URL |
221
+ |----|-------|-----|
222
+ | [1] | US11123456B2 - Photonic Processor | https://patents.google.com/... |
223
+ | [2] | Silicon Photonics Overview | https://example.com/... |
224
+ ```
225
+
226
+ This format is designed for downstream claim-mining tools.
227
+
228
+ ## Integration
229
+
230
+ Works with other MCP servers:
231
+
232
+ | Source Type | Recommended MCP |
233
+ |-------------|-----------------|
234
+ | Patents | Google Patents MCP (`search_patents`) |
235
+ | Web | Google Search MCP (Custom Search) |
236
+ | Memory | Memory MCP (`search_nodes`) |
237
+ | Academic | Semantic Scholar API |
238
+
239
+ ## License
240
+
241
+ MIT
242
+
243
+ ## Contributing
244
+
245
+ Contributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
246
+
247
+ ## Related
248
+
249
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
250
+ - [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk)
251
+ - [Claude Code](https://claude.ai/code)
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Research Report Compilation
3
+ *
4
+ * Deterministic compiler that transforms research plan + raw results
5
+ * into a structured markdown report with citations.
6
+ */
7
+ import type { CompileInput, CompileOutput } from "./schema.js";
8
+ /**
9
+ * Main compile function
10
+ */
11
+ export declare function compileReport(input: CompileInput): CompileOutput;
12
+ //# sourceMappingURL=compilers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compilers.d.ts","sourceRoot":"","sources":["../src/compilers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAQd,MAAM,aAAa,CAAC;AA+8BrB;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CAqHhE"}