@getthesis/mcp-server 0.3.0 → 0.4.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +29 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getthesis/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for Thesis — gives AI agents direct access to strategic context",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -190,6 +190,34 @@ server.tool(
190
190
  }
191
191
  );
192
192
 
193
+ server.tool(
194
+ "thesis_capture_context",
195
+ "Save a piece of strategic context to Thesis. Use this when the conversation surfaces an insight, observation, or signal worth tracking. The user might say 'save that to Thesis', 'capture that', 'that's worth tracking', or similar.",
196
+ {
197
+ title: z.string().describe("Short descriptive title (5-10 words)"),
198
+ content: z.string().describe("The insight, observation, or signal to capture"),
199
+ source: z.string().optional().default("Claude conversation").describe("Where this came from"),
200
+ },
201
+ async ({ title, content, source }) => {
202
+ try {
203
+ const data = await api("/api/v1/context", {
204
+ method: "POST",
205
+ body: JSON.stringify({ title, content, source }),
206
+ });
207
+ let response = `Captured: "${data.title}"`;
208
+ if (data.beliefSuggestions?.length > 0) {
209
+ response += `\n${data.beliefSuggestions.length} belief link${data.beliefSuggestions.length > 1 ? "s" : ""} suggested:`;
210
+ data.beliefSuggestions.forEach((s) => {
211
+ const arrow = s.direction === "supports" ? "↑" : s.direction === "challenges" ? "↓" : "→";
212
+ response += `\n - ${arrow} ${s.beliefStatement} (${s.strength})`;
213
+ });
214
+ }
215
+ response += `\nReview at: ${API_URL}/context`;
216
+ return ok(response);
217
+ } catch (e) { return err(e.message); }
218
+ }
219
+ );
220
+
193
221
  server.tool(
194
222
  "thesis_generate_spec",
195
223
  "Generate a detailed implementation spec for an item using Opus. Uses the full strategic context — beliefs, theme, design principles, existing items — to produce an agent-ready spec. This is a Pro feature and uses the most capable model.",
@@ -209,4 +237,4 @@ server.tool(
209
237
 
210
238
  const transport = new StdioServerTransport();
211
239
  await server.connect(transport);
212
- console.error("Thesis MCP server v0.3.0 running");
240
+ console.error("Thesis MCP server v0.4.0 running");