@tostudy-ai/mcp-setup
v1.0.2
Published
CLI to configure IDE Code AI for ToStudyAI MCP server
Maintainers
Readme
@tostudy-ai/mcp-setup
CLI to configure Claude Code to connect to the Catalyst MCP server.
Installation
npx @tostudy-ai/mcp-setupCommands
Default Setup
npx @tostudy-ai/mcp-setup # Interactive setup
npx @tostudy-ai/mcp-setup --api-key <key> # Setup with API key
npx @tostudy-ai/mcp-setup --url <url> # Custom platform URL
npx @tostudy-ai/mcp-setup --uninstall # Remove configurationWizard (Step-by-Step)
npx @tostudy-ai/mcp-setup wizard # Interactive wizard
npx @tostudy-ai/mcp-setup wizard --api-key <key> # Wizard with API key
npx @tostudy-ai/mcp-setup wizard --url <url> # Custom platform URL
npx @tostudy-ai/mcp-setup wizard --skip-diagnostics # Skip verification step
npx @tostudy-ai/mcp-setup wizard --auto-repair # Auto-fix detected issuesThe wizard guides through 4 steps:
- Environment detection (Claude Code, IDEs)
- API key configuration and validation
- Save configuration
- Diagnostics and verification
Diagnose
npx @tostudy-ai/mcp-setup diagnose # Run diagnostics
npx @tostudy-ai/mcp-setup diagnose --json # JSON outputExits with code 1 if issues are found.
Repair
npx @tostudy-ai/mcp-setup repair # Auto-repair issues
npx @tostudy-ai/mcp-setup repair --api-key <key> # Repair with API key
npx @tostudy-ai/mcp-setup repair --url <url> # Custom platform URL
npx @tostudy-ai/mcp-setup repair --json # JSON outputInstall (Non-Interactive)
Used by the web setup wizard to configure a specific IDE in a single command:
npx @tostudy-ai/mcp-setup install --ide <ide> --key <key>
npx @tostudy-ai/mcp-setup install --ide cursor --key <key>
npx @tostudy-ai/mcp-setup install --ide vscode --key <key> --url http://localhost:3700Supported IDEs: claude-code, cursor, vscode, desktop, windsurf, opencode, codex, antigravity, manual
| IDE | Config Location | Config Key |
|-----|----------------|------------|
| claude-code | Terminal (claude mcp add) | N/A |
| cursor | ~/.cursor/mcp.json | mcpServers |
| vscode | .vscode/mcp.json | servers |
| desktop | Claude Desktop config | mcpServers |
| windsurf | ~/.codeium/windsurf/mcp_config.json | mcpServers |
| opencode | ~/.opencode/opencode.json | mcp |
| codex | ~/.codex/config.toml (via codex mcp add) | mcp_servers |
| antigravity | ~/.gemini/antigravity/mcp_config.json | mcpServers |
| manual | stdout (prints config) | N/A |
Each handler reads-then-merges config to preserve other MCP servers.
Setup via Environment Variable
export TOSTUDY_API_KEY="your-api-key"
export TOSTUDY_PLATFORM_URL="https://tostudy.com" # optional
npx @tostudy-ai/mcp-setupEnvironment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| TOSTUDY_API_KEY | Platform API key | - |
| TOSTUDY_PLATFORM_URL | Platform URL | https://tostudy.com |
Getting Your API Key
- Go to tostudy.com/student/settings/mcp
- The setup wizard auto-detects your OS
- Choose your IDE (step 2)
- An API key is generated automatically (step 3)
- Copy the
npxcommand and run it in your terminal
What the CLI Does
The CLI modifies the Claude Code configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Adds the following configuration:
{
"mcpServers": {
"tostudy": {
"command": "npx",
"args": ["-y", "@tostudy-ai/mcp-server"],
"env": {
"TOSTUDY_API_KEY": "your-api-key",
"TOSTUDY_PLATFORM_URL": "https://tostudy.com"
}
}
}
}After Setup
- Restart Claude Code
- The MCP server will start automatically
- Use
/coursesto see your enrolled courses
Scripts
| Command | Description |
|---------|-------------|
| pnpm build | Build CLI |
| pnpm type-check | TypeScript validation |
| pnpm test | Run wizard e2e test |
| pnpm test:e2e | Run shell e2e test |
| pnpm test:diagnostic-repair | Run diagnostic/repair e2e test |
| pnpm test:ide-handlers | Run IDE handler unit tests |
| pnpm test:install | Run install command unit tests |
| pnpm test:all | Run all tests |
Support
- Documentation: tostudy.com/docs/mcp
- Support: [email protected]
