Skip to content
MCP server
Install and run

Install

Clone the repository and install dependencies:

git clone https://github.com/0detect/mcp-server.git 0detect-mcp
cd 0detect-mcp
npm install

You'll need Node.js 22 or newer (the server uses the global fetch API). Check your version with node --version.

Run

Start the server manually to confirm everything works:

npm start

Equivalent aliases: npm run mcp, or directly npx tsx src/index.ts from the repository root.

The process is long-lived — MCP hosts keep it open for the duration of a session. On startup the server reads ~/.0detect/config.json to discover localApiPort and localApiKey, then waits for JSON-RPC traffic on stdio.

If 0detect is running and the config file is valid, the process stays alive and produces no stdout output. Any diagnostics go to stderr so they don't corrupt the MCP stream.

Verify the upstream

Before wiring the server into an MCP host, make sure the 0detect Local API is reachable:

curl http://localhost:56789/health-check

A successful response means the MCP server will be able to talk to 0detect. If this fails, fix the local API first — see Troubleshooting.

Development

Type-check the source:

npm run typecheck

Tech stack: @modelcontextprotocol/sdk (opens in a new tab), Zod v4 for tool schemas, TypeScript, and tsx for execution.