Two ways to register servers
| Method | Command | Best for |
|---|---|---|
| Auto-discovery | langsight init | Dev machines — reads existing IDE configs |
| Manual registration | langsight add | Production — adds remote or stdio servers explicitly |
Auto-discovery — langsight init
langsight init scans every well-known MCP config file location on your machine and merges all discovered servers into .langsight.yaml.
Usage
Options
| Option | Default | Description |
|---|---|---|
--output, -o | .langsight.yaml | Output path for config file |
--slack-webhook | — | Slack webhook URL for alerts |
--yes, -y | false | Skip confirmation prompts |
--skip-check | false | Write config without running the first health check |
All supported IDE clients
LangSight searches the following locations. On macOS and Linux the paths use~. On Windows they expand to %APPDATA% equivalents.
Global user configs
| Client | Config path | Notes |
|---|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) | — |
| Claude Desktop | ~/.config/claude/claude_desktop_config.json (Linux) | — |
| Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json (Windows) | — |
| Cursor | ~/.cursor/mcp.json | — |
| VS Code | ~/.vscode/mcp.json | Uses "servers" key, not "mcpServers" |
| Windsurf | ~/.windsurf/mcp.json | — |
| Claude Code | ~/.claude/mcp.json | — |
| Gemini CLI | ~/.gemini/mcp.json | — |
| Kiro | ~/.kiro/mcp.json | — |
| Zed | ~/.config/zed/settings.json | Uses "context_servers" key |
| Cline | ~/.cline/mcp.json | — |
Project-local configs
LangSight also checks for project-local config files in the current directory:| File | Used by |
|---|---|
.cursor/mcp.json | Cursor workspace |
.mcp.json | Generic / shared team config |
.vscode/mcp.json | VS Code workspace |
Config key variants
Different IDE clients use different keys for their MCP server lists. LangSight handles all variants automatically:| Key | Used by |
|---|---|
mcpServers | Claude Desktop, Claude Code, Cursor, Windsurf, Gemini CLI, Kiro, Cline |
servers | VS Code |
context_servers | Zed |
Example output
Skip the first health check
If you want to write the config without waiting for a health check (useful in CI pipelines or during infrastructure setup):Non-interactive mode
Manual registration — langsight add
langsight add registers a single server — either an HTTP/remote server or a local stdio server. It runs a connection test and shows you the discovered tools before writing to config.
Usage
Options
| Option | Description |
|---|---|
--url | Base URL for HTTP-based servers (StreamableHTTP or SSE) |
--command | Command to start a stdio server |
--args | Argument to pass to the command (repeatable) |
--env KEY=VALUE | Environment variable for the server process (repeatable) |
--header KEY=VALUE | HTTP header to send with every request (repeatable) |
--config | Path to .langsight.yaml to update (default: auto-discovered) |
--skip-check | Add to config without running a connection test |
Register a remote HTTP server
Register a local stdio server
When the connection test fails
If the server is unreachable,langsight add shows the error and asks whether to add it anyway:
Skip the connection test
Generated config
Bothlangsight init and langsight add write to .langsight.yaml. The schema is identical regardless of how the entry was added:
${VAR} syntax are expanded from the process environment at runtime. Never commit actual secrets to this file.
Related
- MCP Quickstart — end-to-end walkthrough
- Health Monitoring — what happens after discovery
- Self-Hosting Configuration — full list of env vars