circuit-mcp 2.3.2 → 2.3.4

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 CHANGED
@@ -1,10 +1,7 @@
1
1
  # circuit-mcp
2
+ Feedback in. Specs out. Build it with your AI coding tool.
2
3
 
3
- Customer feedback in. Engineering specs out. Solve it with your AI coding tool.
4
-
5
- Connect [Circuit](https://withcircuit.com) to **Cursor** and **Claude Code** via the Model Context Protocol.
6
-
7
- ---
4
+ Connect Circuit to Cursor and Claude Code via the Model Context Protocol.
8
5
 
9
6
  ## Setup
10
7
 
@@ -33,144 +30,73 @@ First run opens your browser to authenticate. Token is cached at `~/.circuit/tok
33
30
 
34
31
  ---
35
32
 
36
- ## 4 Tools
33
+ ## 4 tools
37
34
 
38
- ### `circuit.priorities`
35
+ ### circuit.priorities
39
36
 
40
- What should I work on? Ranked customer priorities with trends, confidence, and pattern matching.
37
+ What should I work on? Ranked customer priorities with revenue impact and trend data.
41
38
 
42
39
  | Parameter | Type | Description |
43
40
  |-----------|------|-------------|
44
- | `weekly` | boolean | Set to `true` to get the weekly digest instead (movements, new entries, drops, spikes) |
45
- | `lens` | string | How to rank: `volume`, `urgency`, `revenue`, `retention`, `delight`, `feature` |
46
- | `segment` | string | Customer segment: `enterprise`, `smb`, `all` |
47
- | `limit` | number | Number of results (default: 5, max: 20) |
48
- | `category` | string | Filter: `Bug`, `Feature`, `Friction`, `Complaint`, `Praise` |
49
-
50
- **Also returns:** Session context (last ship, in-progress builds, suggested next action) and instinct confidence (pattern matching from your shipping history).
51
-
52
- **Weekly mode** (`weekly: true`): Returns priority movements (rank changes), new entries, dropped items, and volume spikes compared to last week.
41
+ | weekly | boolean | Weekly digest (movements, new entries, drops, spikes) |
42
+ | lens | string | How to rank: volume, urgency, revenue, retention, delight, feature |
43
+ | segment | string | enterprise, smb, all |
44
+ | limit | number | Default: 5, max: 20 |
45
+ | category | string | Filter: Bug, Feature, Improvement, Praise |
53
46
 
54
- ### `circuit.spec`
47
+ ### circuit.spec
55
48
 
56
- Full engineering spec for a priority. 5 sections: What to Build, Why It Matters, Customer Voice (verbatim quotes), Files to Touch, Done When.
49
+ Full spec. 5 sections: What to Build, Why It Matters, Customer Voice, Files to Touch, Done When.
57
50
 
58
51
  | Parameter | Type | Description |
59
52
  |-----------|------|-------------|
60
- | `priority_id` | string | Priority ID from `circuit.priorities` |
61
- | `spec_id` | string | Spec ID directly (alternative to priority_id) |
62
- | `include_history` | boolean | Include version history and ship memory (default: true) |
63
- | `batch` | boolean | Set to `true` to export multiple specs as markdown |
64
- | `spec_ids` | string[] | Specific spec IDs to export (batch mode) |
65
- | `status` | string | Filter specs by status in batch mode: `ready`, `building`, `shipped` |
66
- | `limit` | number | Number of specs in batch mode (default: 10, max: 50) |
53
+ | priority_id | string | From circuit.priorities |
54
+ | batch | boolean | Export multiple specs as markdown |
55
+ | status | string | Filter: ready, building, shipped |
56
+ | limit | number | Default: 10, max: 50 |
67
57
 
68
- **Also returns:** Post-ship signal (new feedback since shipping), effort estimate, codebase context (tech stack, related PRs, AI config files like CLAUDE.md), and related memories from previous ships.
58
+ ### circuit.act
69
59
 
70
- **Batch mode** (`batch: true`): Exports multiple specs as formatted markdown for sprint planning or documentation.
71
-
72
- ### `circuit.act`
73
-
74
- Take action. Start building, ship it, share back, assign, correct, submit feedback, or submit a transcript.
60
+ Start building, ship, notify customers, assign, correct, submit feedback or transcript.
75
61
 
76
62
  | Action | What it does |
77
63
  |--------|-------------|
78
- | `build` | Mark spec as "building" |
79
- | `ship` | Mark as shipped, record memory |
80
- | `share` | Notify customers who submitted feedback (email, widget, or both) |
81
- | `assign` | Assign spec to a team member by email or user ID |
82
- | `correct` | Fix a priority's category classification (Circuit remembers corrections) |
83
- | `submit` | Add new feedback from your terminal |
84
- | `transcript` | Submit a customer interview, sales call, or support transcript |
64
+ | build | Mark as "building" |
65
+ | ship | Mark as shipped, record memory |
66
+ | share | Notify customers (email, widget, or both) |
67
+ | assign | Assign to team member |
68
+ | correct | Fix category classification |
69
+ | submit | Add new feedback |
70
+ | transcript | Submit customer interview/call |
85
71
 
86
- **Share parameters** (when `action: "share"`):
72
+ ### circuit.ask
87
73
 
88
- | Parameter | Type | Description |
89
- |-----------|------|-------------|
90
- | `spec_id` | string | Spec ID (required) |
91
- | `channel` | string | `email`, `widget`, `both`, `skip` |
92
- | `message` | string | Custom message to include in notifications (optional) |
93
-
94
- **Transcript parameters** (when `action: "transcript"`):
95
-
96
- | Parameter | Type | Description |
97
- |-----------|------|-------------|
98
- | `text` | string | Full transcript text (min 50 chars, required) |
99
- | `title` | string | Title, e.g. "Sales call with Acme Corp" |
100
- | `type` | string | `interview`, `sales_call`, `support`, `other` |
101
- | `customer_name` | string | Customer name (optional) |
102
- | `customer_email` | string | Customer email (optional, for close-the-loop notifications) |
103
- | `revenue_band` | string | `enterprise`, `paid`, `free` |
104
-
105
- ### `circuit.ask`
106
-
107
- Semantic search across all your data: feedback, priorities, specs, and help articles. Returns your shipping patterns and behavioral insights. Also searches your connected GitHub repo for code context.
108
-
109
- | Parameter | Type | Description |
110
- |-----------|------|-------------|
111
- | `question` | string | Natural language, e.g. "What are enterprise customers saying about onboarding?" |
74
+ Semantic search across feedback, priorities, specs, help articles and your GitHub repo.
112
75
 
113
76
  ---
114
77
 
115
78
  ## Workflow
116
79
 
117
- ```
118
- > circuit.priorities {weekly: true} # What changed since last week?
119
- > circuit.priorities # See what matters
120
- > circuit.spec {priority_id: "..."} # Get the spec
121
- > circuit.act {action: "build", ...} # Start building
122
- > ... write the code ...
123
- > circuit.act {action: "ship", ...} # Ship it.
124
- > circuit.act {action: "share", channel: "both"} # Share back. Customers notified.
125
- > circuit.spec {batch: true, status: "shipped"} # Export shipped specs
126
- ```
127
-
128
- ---
129
-
130
- ## CLI Commands
131
-
132
80
  ```bash
133
- npx circuit-mcp # Start MCP server (stdio mode)
134
- npx circuit-mcp setup # Interactive setup
135
- npx circuit-mcp auth # Re-authenticate
136
- npx circuit-mcp logout # Clear stored token
137
- npx circuit-mcp fix # Troubleshooting guide
81
+ circuit.priorities {weekly: true} # What changed since last week?
82
+ circuit.priorities # See what matters
83
+ circuit.spec {priority_id: "..."} # Get the spec
84
+ circuit.act {action: "build", ...} # Start building
85
+ circuit.act {action: "ship", ...} # Ship.
86
+ circuit.act {action: "share", channel: "both"} # Customers notified.
138
87
  ```
139
88
 
140
89
  ---
141
90
 
142
- ## Troubleshooting
143
-
144
- **"Token expired"** — Run `npx circuit-mcp auth` to re-authenticate.
145
-
146
- **"Connection refused"** — Check your internet connection. The MCP connects to Circuit's API.
91
+ ## CLI commands
147
92
 
148
- **Tool not showing in Cursor/Claude** — Restart your editor after adding the MCP config.
149
-
150
- **Custom API URL** — Set `CIRCUIT_API_URL` environment variable to override the default endpoint.
151
-
152
- ---
153
-
154
- ## How it works
155
-
156
- ```
157
- Your editor (Cursor / Claude Code)
158
- |
159
- | JSON-RPC over stdio
160
- |
161
- circuit-mcp (this package)
162
- |
163
- | HTTPS + Bearer token
164
- |
165
- Circuit API
166
- |
167
- | PostgreSQL + pgvector
168
- |
169
- Your feedback data
93
+ ```bash
94
+ npx circuit-mcp # Start MCP server
95
+ npx circuit-mcp auth # Re-authenticate
96
+ npx circuit-mcp logout # Clear stored token
97
+ npx circuit-mcp fix # Troubleshooting guide
170
98
  ```
171
99
 
172
- The MCP server runs as a local process, communicating with your editor via stdin/stdout. All data stays in your Circuit account, authenticated via OAuth 2.0.
173
-
174
100
  ---
175
101
 
176
- Built by [Circuit](https://withcircuit.com). Feedback in. Specs out.
102
+ Built by Circuit. Feedback in. Specs out.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuit-mcp",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "Connect Circuit to Cursor and Claude Code - bring customer priorities and engineering briefs into your AI coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
package/src/auth.js CHANGED
@@ -137,6 +137,7 @@ function getSuccessPage() {
137
137
  <html>
138
138
  <head>
139
139
  <title>Circuit - Connected</title>
140
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'><defs><mask id='m'><circle cx='16' cy='16' r='13' fill='white'/><circle cx='16' cy='16' r='6.9' fill='black'/></mask></defs><ellipse cx='16' cy='17.73' rx='13' ry='11.27' fill='rgba(168,102,122,0.2)'/><circle cx='16' cy='16' r='13' fill='%23A8667A' mask='url(%23m)'/></svg>">
140
141
  <style>
141
142
  * { margin: 0; padding: 0; box-sizing: border-box; }
142
143
  body {
@@ -186,7 +187,7 @@ function getSuccessPage() {
186
187
  </div>
187
188
  <h1>Connected.</h1>
188
189
  <p>Your AI coding assistant is now connected to Circuit.</p>
189
- <p class="hint">This window will close automatically...</p>
190
+ <p class="hint">You can close this tab and return to your editor.</p>
190
191
  </div>
191
192
  <script>setTimeout(() => window.close(), 3000);</script>
192
193
  </body>
@@ -203,6 +204,7 @@ function getErrorPage(error) {
203
204
  <html>
204
205
  <head>
205
206
  <title>Circuit - Connection Failed</title>
207
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'><defs><mask id='m'><circle cx='16' cy='16' r='13' fill='white'/><circle cx='16' cy='16' r='6.9' fill='black'/></mask></defs><ellipse cx='16' cy='17.73' rx='13' ry='11.27' fill='rgba(168,102,122,0.2)'/><circle cx='16' cy='16' r='13' fill='%23A8667A' mask='url(%23m)'/></svg>">
206
208
  <style>
207
209
  * { margin: 0; padding: 0; box-sizing: border-box; }
208
210
  body {
package/src/index.js CHANGED
@@ -132,15 +132,28 @@ function prompt(question) {
132
132
  function showUsageGuide() {
133
133
  console.log(chalk.dim(' ─────────────────────────────────────────\n'));
134
134
  console.log(chalk.white.bold(' How to use Circuit\n'));
135
- console.log(chalk.dim(' Open Claude Code or Cursor and ask:\n'));
136
- console.log(chalk.white(' "What are my top priorities?"'));
137
- console.log(chalk.white(' "Show me the brief for priority #1"'));
138
- console.log(chalk.white(' "What feedback mentions dark mode?"'));
139
- console.log(chalk.white(' "What are my most urgent issues?"'));
140
- console.log(chalk.white(' "Show priorities by revenue impact"'));
141
- console.log();
142
- console.log(chalk.dim(' Circuit will fetch your real customer data.'));
143
- console.log(chalk.dim(' Just ask naturally and your AI will handle the rest.\n'));
135
+ console.log(chalk.dim(' Open Claude Code or Cursor and try:\n'));
136
+
137
+ console.log(chalk.cyan(' circuit.priorities') + chalk.dim(' What should I work on?'));
138
+ console.log(chalk.dim(' "What are my top priorities?"'));
139
+ console.log(chalk.dim(' "Show priorities by revenue impact"'));
140
+ console.log(chalk.dim(' "What\'s changed this week?"\n'));
141
+
142
+ console.log(chalk.cyan(' circuit.spec') + chalk.dim(' Full engineering spec for a priority'));
143
+ console.log(chalk.dim(' "Show me the spec for priority #1"'));
144
+ console.log(chalk.dim(' "Get the brief for <priority_id>"\n'));
145
+
146
+ console.log(chalk.cyan(' circuit.act') + chalk.dim(' — Take action on a spec'));
147
+ console.log(chalk.dim(' "Start building <spec_id>"'));
148
+ console.log(chalk.dim(' "Mark <spec_id> as shipped"'));
149
+ console.log(chalk.dim(' "Tell customers we shipped <spec_id>"\n'));
150
+
151
+ console.log(chalk.cyan(' circuit.ask') + chalk.dim(' — Search across all your feedback'));
152
+ console.log(chalk.dim(' "What feedback mentions dark mode?"'));
153
+ console.log(chalk.dim(' "What are enterprise customers asking for?"\n'));
154
+
155
+ console.log(chalk.dim(' Circuit fetches your real customer data.'));
156
+ console.log(chalk.dim(' Just ask naturally — your AI handles the rest.\n'));
144
157
  }
145
158
 
146
159
  // Configure Cursor by writing to ~/.cursor/mcp.json
package/src/server.js CHANGED
@@ -85,7 +85,13 @@ async function handleMessage(message, token) {
85
85
  result: {
86
86
  protocolVersion: '2024-11-05',
87
87
  serverInfo: { name: 'circuit-mcp', version: '2.2.0' },
88
- capabilities: { tools: {}, resources: {} }
88
+ capabilities: { tools: {}, resources: {} },
89
+ instructions: `Circuit is connected. 4 tools available:
90
+ • circuit.priorities — what to work on next
91
+ • circuit.spec — engineering spec for any priority
92
+ • circuit.act — ship and close the loop with customers
93
+ • circuit.ask — search across all your feedback
94
+ Run circuit.help for examples.`
89
95
  }
90
96
  };
91
97
 
@@ -290,6 +296,14 @@ const TOOLS = [
290
296
  },
291
297
  required: ['question']
292
298
  }
299
+ },
300
+ {
301
+ name: 'circuit.help',
302
+ description: 'Show what Circuit can do — all available tools, example prompts, and how to use them.',
303
+ inputSchema: {
304
+ type: 'object',
305
+ properties: {}
306
+ }
293
307
  }
294
308
  ];
295
309
 
@@ -524,6 +538,43 @@ function formatBatchExport(data) {
524
538
  return output;
525
539
  }
526
540
 
541
+ function formatHelp() {
542
+ return `# Circuit — What I can do
543
+
544
+ ## circuit.priorities — What should I work on?
545
+ Ranked customer priorities with revenue impact and trend data.
546
+
547
+ * "What are my top priorities?"
548
+ * "Show priorities by revenue impact"
549
+ * "Show urgent bugs only"
550
+ * "What's changed this week?"
551
+ * "Show enterprise priorities"
552
+
553
+ ## circuit.spec — Engineering spec for a priority
554
+ 5 sections: What to Build, Why It Matters, Customer Voice, Files to Touch, Done When.
555
+ * "Show me the spec for priority #1"
556
+ * "Get the brief for <priority_id>"
557
+ * "Export all ready specs for sprint planning"
558
+
559
+ ## circuit.act — Ship it and close the loop
560
+ Start building, mark as shipped, notify customers, assign to a team member, or submit new feedback.
561
+ * "Start building <spec_id>"
562
+ * "Mark <spec_id> as shipped"
563
+ * "Tell customers we shipped <spec_id>"
564
+ * "Assign <spec_id> to Catherine"
565
+ * "Submit feedback: users want dark mode"
566
+ * "Submit transcript: <transcript text>"
567
+
568
+ ## circuit.ask — Search across all your feedback
569
+ Ask anything about your customers, feedback or priorities.
570
+ * "What feedback mentions dark mode?"
571
+ * "What are enterprise customers asking for?"
572
+ * "Have we shipped anything related to CSV exports?"
573
+ * "What's our most common bug type?"
574
+
575
+ Ask naturally — Circuit picks the right tool.`;
576
+ }
577
+
527
578
  // ─────────────────────────────────────────────────────────────
528
579
  // Tool Call Handler
529
580
  // ─────────────────────────────────────────────────────────────
@@ -539,6 +590,7 @@ async function handleToolCall(id, params, token) {
539
590
  'circuit.spec': formatSpec,
540
591
  'circuit.act': formatAct,
541
592
  'circuit.ask': formatAsk,
593
+ 'circuit.help': () => formatHelp(),
542
594
  };
543
595
 
544
596
  const formatter = formatters[name] || ((d) => JSON.stringify(d, null, 2));