Connecting the MCP server to an MCP host
The host process must run Node.js with tsx so the TypeScript entry point src/index.ts executes directly. The standard pattern is:
npx tsx /absolute/path/to/0detect-mcp/src/index.tsReplace /absolute/path/to/0detect-mcp/ with the directory where you cloned the repository.
Cursor
Open Cursor MCP settings and add a server block:
{
"mcpServers": {
"0detect": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/0detect-mcp/src/index.ts"]
}
}
}If npx is slow or unreliable on your machine, use the full path to the tsx binary inside the repository's node_modules (after npm install) and pass src/index.ts as the only script argument:
{
"mcpServers": {
"0detect": {
"command": "/absolute/path/to/0detect-mcp/node_modules/.bin/tsx",
"args": ["/absolute/path/to/0detect-mcp/src/index.ts"]
}
}
}Restart Cursor after editing the config so it picks up the new server.
Claude Desktop
On macOS, the config file is usually at:
~/Library/Application Support/Claude/claude_desktop_config.jsonOn Windows it's typically:
%APPDATA%\Claude\claude_desktop_config.jsonMerge an mcpServers entry using the same shape as for Cursor:
{
"mcpServers": {
"0detect": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/0detect-mcp/src/index.ts"]
}
}
}Quit and reopen Claude Desktop after saving the file. The 0detect tools should appear in the tool list.
Verifying the connection
Once the host is restarted:
- Open a new chat in your MCP host.
- Ask the assistant to run
odetect_health_check. - You should see a JSON result with
"ok": trueand"status": 200.
If the host reports no tools, or a tool call returns "ok": false, jump to Troubleshooting.