Setting it up
Install kscript first (Install and editors). Each assistant below starts kscript mcp itself. If one says it can't find kscript, which happens with desktop apps that don't read your shell's PATH, give the full path instead: ~/.kscript/bin/kscript on macOS and Linux (written out, such as /Users/you/.kscript/bin/kscript), or %LOCALAPPDATA%\Programs\kscript\kscript.exe on Windows.
Claude Code
claude mcp add kscript -- kscript mcpAdd --scope project to save it in the project's .mcp.json, so everyone working on the project gets it:
{
"mcpServers": {
"kscript": { "command": "kscript", "args": ["mcp"] }
}
}Claude Desktop
Open Settings → Developer → Edit Config and add the server to claude_desktop_config.json, then restart Claude:
{
"mcpServers": {
"kscript": { "command": "/Users/you/.kscript/bin/kscript", "args": ["mcp"] }
}
}Cursor
Add it to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"kscript": { "command": "kscript", "args": ["mcp"] }
}
}VS Code
In a trusted workspace, the KScript extension automatically provides KScript Docs to agents that use VS Code's MCP servers. Find it under MCP: List Servers in the command palette and enable its tools in the agent's tools picker. The extension uses the same KScript installation as the editor, including kscript.server.path if set. In a Remote SSH workspace, install KScript on the remote host. Each workspace folder gets a server that uses that folder's syntax, lint and format settings.
If you use VS Code without the KScript extension, you can add the server with MCP: Add Server or in .vscode/mcp.json:
{
"servers": {
"kscript": { "type": "stdio", "command": "kscript", "args": ["mcp"] }
}
}Windsurf
Add it to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"kscript": { "command": "kscript", "args": ["mcp"] }
}
}Codex
codex mcp add kscript -- kscript mcpOr add it to ~/.codex/config.toml:
[mcp_servers.kscript]
command = "kscript"
args = ["mcp"]Gemini CLI
Add it to ~/.gemini/settings.json, or .gemini/settings.json in your project:
{
"mcpServers": {
"kscript": { "command": "kscript", "args": ["mcp"] }
}
}Other assistants
Most assistants take the same thing: a command, kscript, with the argument mcp. For one that connects to a URL instead, run kscript mcp --http and give it http://localhost:4181/mcp. The HTTP server only listens on localhost and turns away requests from web pages. --port picks another port.