circuit-mcp 1.0.0 → 1.0.3
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/package.json +1 -1
- package/src/index.js +80 -0
- package/src/ui.js +14 -4
package/package.json
CHANGED
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,10 +32,84 @@ 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
|
|
package/src/ui.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
8
|
-
console.log(chalk.hex(
|
|
9
|
-
console.log(chalk.hex(
|
|
10
|
+
// Circuit logo: solid circle with ring stroke inside
|
|
11
|
+
console.log(chalk.hex(CHARCOAL)(' ▄▄▄▄▄▄▄'));
|
|
12
|
+
console.log(chalk.hex(CHARCOAL)(' ▄█') + chalk.hex(WARM_WHITE)('▀▀▀▀▀') + chalk.hex(CHARCOAL)('█▄'));
|
|
13
|
+
console.log(chalk.hex(CHARCOAL)(' █') + chalk.hex(WARM_WHITE)('▀') + chalk.hex(CHARCOAL)('█████') + chalk.hex(WARM_WHITE)('▀') + chalk.hex(CHARCOAL)('█'));
|
|
14
|
+
console.log(chalk.hex(CHARCOAL)(' █') + chalk.hex(WARM_WHITE)('▐') + chalk.hex(CHARCOAL)('███████') + chalk.hex(WARM_WHITE)('▌') + chalk.hex(CHARCOAL)('█'));
|
|
15
|
+
console.log(chalk.hex(CHARCOAL)(' █') + chalk.hex(WARM_WHITE)('▄') + chalk.hex(CHARCOAL)('█████') + chalk.hex(WARM_WHITE)('▄') + chalk.hex(CHARCOAL)('█'));
|
|
16
|
+
console.log(chalk.hex(CHARCOAL)(' ▀█') + chalk.hex(WARM_WHITE)('▄▄▄▄▄') + chalk.hex(CHARCOAL)('█▀'));
|
|
17
|
+
console.log(chalk.hex(CHARCOAL)(' ▀▀▀▀▀▀▀'));
|
|
18
|
+
console.log();
|
|
19
|
+
console.log(chalk.hex(CHARCOAL).bold(' Circuit') + chalk.dim(' MCP'));
|
|
10
20
|
console.log();
|
|
11
21
|
}
|
|
12
22
|
|