CodeceptJS supports the Model Context Protocol (MCP) for IDE integration, particularly with Cursor.
To use CodeceptJS with Cursor:
- Start the MCP server directly using the standalone executable:
npx codecept-mcpor
node bin/codecept-mcp.js [path]Where [path] is optional and points to your CodeceptJS project (defaults to current directory).
- In Cursor, connect to the MCP server by selecting "Connect to MCP Server" and choose "CodeceptJS" from the list.
The server provides these tools:
list-tests: List all availble testslist-suites: List all suites
If Cursor shows "Found 0 tools, 0 resources, and 0 resource templates" when connecting:
- Make sure you're using the standalone executable (
codecept-mcp.js) - The MCP server process should be running independently and not as a subprocess
- Check that you're in the correct CodeceptJS project directory by specifying path as a parameter
- Verify that your CodeceptJS configuration file (codecept.conf.js or codecept.json) exists in path and is valid