circuit-mcp 1.0.1 → 1.0.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +90 -11
  3. package/src/ui.js +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "circuit-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "Circuit MCP server for Cursor and Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -8,6 +8,12 @@ const CIRCUIT_URL = 'https://app.withcircuit.com';
8
8
  export async function main() {
9
9
  const args = process.argv.slice(2);
10
10
 
11
+ // Handle help command
12
+ if (args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
13
+ showHelp();
14
+ return;
15
+ }
16
+
11
17
  // Handle setup command
12
18
  if (args[0] === 'setup') {
13
19
  await runSetup();
@@ -26,21 +32,94 @@ export async function main() {
26
32
  return;
27
33
  }
28
34
 
35
+ // Handle troubleshoot command
36
+ if (args[0] === 'troubleshoot' || args[0] === 'fix') {
37
+ showTroubleshoot();
38
+ return;
39
+ }
40
+
29
41
  // Default: start MCP server
30
42
  await runServer();
31
43
  }
32
44
 
45
+ function showHelp() {
46
+ showBanner();
47
+
48
+ console.log(chalk.white.bold(' Commands:\n'));
49
+ console.log(` ${chalk.cyan('npx circuit-mcp')} Start MCP server`);
50
+ console.log(` ${chalk.cyan('npx circuit-mcp setup')} Show setup instructions`);
51
+ console.log(` ${chalk.cyan('npx circuit-mcp auth')} Re-authenticate`);
52
+ console.log(` ${chalk.cyan('npx circuit-mcp logout')} Clear stored token`);
53
+ console.log(` ${chalk.cyan('npx circuit-mcp fix')} Troubleshooting guide`);
54
+ console.log();
55
+ }
56
+
57
+ function showTroubleshoot() {
58
+ showBanner();
59
+
60
+ console.log(chalk.white.bold(' Troubleshooting Guide\n'));
61
+ console.log(chalk.dim(' ─────────────────────────────────────────\n'));
62
+
63
+ // Issue 1: MCP blocked by enterprise
64
+ console.log(chalk.yellow(' ⚠ MCP blocked by your organization?\n'));
65
+ console.log(chalk.dim(' Some enterprises restrict MCP servers.'));
66
+ console.log(chalk.dim(' Ask your IT admin to allowlist:'));
67
+ console.log(chalk.white(' • Package: circuit-mcp'));
68
+ console.log(chalk.white(' • Domain: app.withcircuit.com\n'));
69
+
70
+ // Issue 2: Cursor not detecting MCP
71
+ console.log(chalk.yellow(' ⚠ Cursor not detecting Circuit?\n'));
72
+ console.log(chalk.dim(' 1. Open Cursor Settings (Cmd+Shift+P → "Cursor Settings")'));
73
+ console.log(chalk.dim(' 2. Search for "MCP"'));
74
+ console.log(chalk.dim(' 3. Add to mcp.json:\n'));
75
+ console.log(chalk.white(` {
76
+ "mcpServers": {
77
+ "circuit": {
78
+ "command": "npx",
79
+ "args": ["circuit-mcp"]
80
+ }
81
+ }
82
+ }\n`));
83
+ console.log(chalk.dim(' 4. Restart Cursor\n'));
84
+
85
+ // Issue 3: Claude Code not detecting MCP
86
+ console.log(chalk.yellow(' ⚠ Claude Code not detecting Circuit?\n'));
87
+ console.log(chalk.dim(' 1. Check if MCP is installed:'));
88
+ console.log(chalk.white(' claude mcp list\n'));
89
+ console.log(chalk.dim(' 2. If not listed, add it:'));
90
+ console.log(chalk.white(' claude mcp add circuit -- npx circuit-mcp\n'));
91
+ console.log(chalk.dim(' 3. Restart Claude Code\n'));
92
+
93
+ // Issue 4: Authentication issues
94
+ console.log(chalk.yellow(' ⚠ Authentication not working?\n'));
95
+ console.log(chalk.dim(' 1. Clear your token and re-authenticate:'));
96
+ console.log(chalk.white(' npx circuit-mcp logout'));
97
+ console.log(chalk.white(' npx circuit-mcp auth\n'));
98
+ console.log(chalk.dim(' 2. Make sure popups aren\'t blocked'));
99
+ console.log(chalk.dim(' 3. Check you\'re logged into Circuit\n'));
100
+
101
+ // Issue 5: Connection errors
102
+ console.log(chalk.yellow(' ⚠ Connection errors?\n'));
103
+ console.log(chalk.dim(' 1. Check your internet connection'));
104
+ console.log(chalk.dim(' 2. Verify Circuit is accessible:'));
105
+ console.log(chalk.white(' curl https://app.withcircuit.com/api/health\n'));
106
+ console.log(chalk.dim(' 3. Check firewall isn\'t blocking requests\n'));
107
+
108
+ console.log(chalk.dim(' ─────────────────────────────────────────\n'));
109
+ console.log(chalk.dim(' Still stuck? Contact support@withcircuit.com'));
110
+ console.log(chalk.dim(' Or visit: https://withcircuit.com/help\n'));
111
+ }
112
+
33
113
  async function runSetup() {
34
114
  showBanner();
35
115
 
36
- console.log(chalk.dim(' Choose your AI coding tool:\n'));
37
- console.log(` ${chalk.bold('1.')} Cursor`);
38
- console.log(` ${chalk.bold('2.')} Claude Code`);
39
- console.log(` ${chalk.bold('3.')} Both\n`);
116
+ console.log(chalk.white.bold(' Welcome to Circuit!\n'));
117
+ console.log(chalk.dim(' Connect your AI coding tool to start building from customer feedback.\n'));
118
+
119
+ console.log(chalk.dim(' ─────────────────────────────────────────\n'));
40
120
 
41
- // For now, show instructions for both
42
- console.log(chalk.cyan.bold(' Cursor Setup\n'));
43
- console.log(chalk.dim(' Add to your Cursor settings (Cmd+Shift+P → "Cursor Settings: Open User Settings"):\n'));
121
+ console.log(chalk.cyan.bold(' Cursor\n'));
122
+ console.log(chalk.dim(' Add to ~/.cursor/mcp.json:\n'));
44
123
  console.log(chalk.white(` {
45
124
  "mcpServers": {
46
125
  "circuit": {
@@ -50,13 +129,13 @@ async function runSetup() {
50
129
  }
51
130
  }\n`));
52
131
 
53
- console.log(chalk.cyan.bold(' Claude Code Setup\n'));
54
- console.log(chalk.dim(' Run this command in your terminal:\n'));
132
+ console.log(chalk.cyan.bold(' Claude Code\n'));
133
+ console.log(chalk.dim(' Run:\n'));
55
134
  console.log(chalk.white(` claude mcp add circuit -- npx circuit-mcp\n`));
56
135
 
57
136
  console.log(chalk.dim(' ─────────────────────────────────────────\n'));
58
- console.log(chalk.dim(' After setup, Circuit will prompt you to'));
59
- console.log(chalk.dim(' authenticate on first use.\n'));
137
+ console.log(chalk.dim(' Restart your editor, then Circuit will'));
138
+ console.log(chalk.dim(' prompt you to sign in on first use.\n'));
60
139
  }
61
140
 
62
141
  async function runAuth() {
package/src/ui.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
 
3
- const CIRCUIT_PURPLE = '#6366F1';
3
+ // Circuit brand colors
4
+ const CHARCOAL = '#1C1A18';
5
+ const WARM_WHITE = '#FDFCFA';
6
+ const WARM_BEIGE = '#F5F1EA';
4
7
 
5
8
  export function showBanner() {
6
9
  console.log();
7
- console.log(chalk.hex(CIRCUIT_PURPLE).bold(' ╭──────────────────────────────────╮'));
8
- console.log(chalk.hex(CIRCUIT_PURPLE).bold(' │') + chalk.white.bold(' ⚡ Circuit MCP ') + chalk.hex(CIRCUIT_PURPLE).bold('│'));
9
- console.log(chalk.hex(CIRCUIT_PURPLE).bold(' ╰──────────────────────────────────╯'));
10
+ console.log(chalk.hex(CHARCOAL)(' ◉ ') + chalk.hex(CHARCOAL).bold('Circuit') + chalk.dim(' MCP'));
10
11
  console.log();
11
12
  }
12
13
 
@@ -33,7 +34,7 @@ export function showSpinner(message) {
33
34
 
34
35
  const interval = setInterval(() => {
35
36
  if (stopped) return;
36
- process.stderr.write(`\r ${chalk.hex(CIRCUIT_PURPLE)(frames[i])} ${chalk.dim(message)}`);
37
+ process.stderr.write(`\r ${chalk.hex(CHARCOAL)(frames[i])} ${chalk.dim(message)}`);
37
38
  i = (i + 1) % frames.length;
38
39
  }, 80);
39
40