Server scripts

Server scripts are individual JavaScript or TypeScript files that run on the Neptune DXP - Open Edition server. They can be grouped into script projects. The MCP server provides tools for both project-level and individual script operations.

Required role: scripteditor.

If your user account does not have this role, every tool in this group fails immediately with an access denied error. Contact an administrator to request the role, or see Access control for more information on how roles are enforced.

Available tools

Parameters are shown with their type and a short description. UUIDs are always strings.

Script projects

Script projects group related server scripts together. Use the project-level tools to manage those groupings.

Tool Description Parameters

list_script_projects

List all server script projects with their scripts. Each project groups related scripts together.

None

get_script_project

Get a server script project by ID, including all its scripts.

id (string)

create_script_project

Create a new server script project to group related scripts.

  • name (string): Name of the script project.

  • description (string): Description of the script project.

  • package (string): Development package to assign the script project to.

delete_script_project

Delete a server script project by its ID.

id (string)

Individual scripts

Tool Description Parameters

get_server_script

Get a server script by ID, including its source code content.

id (string)

save_server_script

Create or update a server script.

Supports JavaScript and TypeScript. TypeScript scripts are automatically transpiled.
  • name (string): Name of the script.

  • content (string): Source code of the script.

  • id (string): ID of the script to update. Omit to create a new script.

  • projectId (string): ID of the script project to assign the script to.

  • language (string): Script language; javascript or typescript. Defaults to javascript.

  • description (string): Description of the script.

  • apis (object[]): API dependencies.

  • entitySets (object[]): Entity set dependencies.

  • agents (object[]): Agent dependencies.

  • globalScripts (object[]): Global script dependencies.

  • externalModules (object[]): External npm module dependencies.

delete_server_script

Delete a server script by ID.

  • id (string): ID of the server script to delete.

  • projectId (string): ID of the parent script project; used to update the project version after deletion.

list_ungrouped_scripts

List server scripts that are not assigned to any project.

None

run_server_script

Execute a server script by its ID. Returns the script result object (data, statusCode, contentType, filename, headers when set).

  • id (string): ID of the server script to execute.

  • body (object): Request body passed to the script as req.body.

  • params (object): Request path parameters passed to the script as req.params.

  • query (object): Query string parameters passed to the script as req.query.

  • headers (object): Request headers passed to the script as req.headers.