# X4CodeSense (npm · x4-script-mcp)

X4: Foundations scripts: checks, schema elements, expression types, scripts, cues and texts.

- Trust score: 93/100 (high trust)
- Change this week: +2
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- npm · `x4-script-mcp`: 93/100 (this document), [markdown](https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp.md), [page](https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp)

## Channel facts

- Registry: `npm`
- Package: `x4-script-mcp`
- Version: `0.5.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Supply Chain Security**: 98/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - 30 of 96 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to chemodun/X4CodeSense).
  - Clear OSI-approved license (Apache-2.0).
  - Actively maintained (last published 11 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 69/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 1702 tokens (~189/item across 9 items; 9 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 100/100
  - No destabilizing schema changes in the last 30 days.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 9 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 10 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the X4CodeSense MCP server?

X4CodeSense runs locally as an npm package, launched with npx -y x4-script-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add chemodun-x4-script-mcp -- npx -y x4-script-mcp
```

### Cursor

```json
{
  "mcpServers": {
    "chemodun-x4-script-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x4-script-mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "chemodun-x4-script-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x4-script-mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add chemodun-x4-script-mcp -- npx -y x4-script-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "chemodun-x4-script-mcp": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "x4-script-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add chemodun-x4-script-mcp --command npx --arg -y --arg x4-script-mcp
```

### Hermes

```yaml
mcp_servers:
  chemodun-x4-script-mcp:
    command: "npx"
    args: ["-y", "x4-script-mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "chemodun-x4-script-mcp": {
      "Transport": "stdio",
      "Command": "npx",
      "Arguments": [
        "-y",
        "x4-script-mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add chemodun-x4-script-mcp -t stdio -c npx -a -y x4-script-mcp
```

### Other

```json
{
  "mcpServers": {
    "chemodun-x4-script-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x4-script-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-02 (score 93, 0)

- [security] Stability: 0.97 → pass

### 2026-11-01 (score 93, +1)

No change was recorded against any check on this day. Stability & Change Management went from 93 to 97. That category is still filling its 30-day observation window: 28 days of observed history at the previous scan, 29 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-31 (score 92, 0)

- [functional regression] Security disclosure: unverified → fail

### 2026-10-30 (score 92, +1)

- [functional regression] Security disclosure: fail → unverified

### 2026-10-28 (score 91, +1)

No change was recorded against any check on this day. Stability & Change Management went from 80 to 83. That category is still filling its 30-day observation window: 24 days of observed history at the previous scan, 25 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-26 (score 90, +1)

No change was recorded against any check on this day. Stability & Change Management went from 73 to 77. That category is still filling its 30-day observation window: 22 days of observed history at the previous scan, 23 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-25 (score 89, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-10-24 (score 74, −15)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.4.0 → 0.5.0

## MCP tools (9)

### `check` (~228 tokens)

Check scripts

Checks X4 scripts and patches as the X4CodeSense editor and x4-script-check do: well-formedness, the game schemas, expressions, variables, names, cues, scripts and texts referred to; and library files that name their schema in xsi:noNamespaceSchemaLocation against it. Returns the findings with their quick fixes (edits to apply), and counts. Run it after every change to an md or aiscripts script or a patch, and fix what it reports; with text, check a draft before writing it.

Input parameters:

- `paths` (array, required): Files and folders. A folder is checked as x4-script-check checks it: the md, aiscripts and libraries folders in it and one level deeper, so an extension or a folder of extensions. Relative paths are…
- `severity` (string): The least severe finding to report: error, warning, info or hint (the default, all).
- `text` (string): The text to check instead of what is on disk, for one file in paths: what you are about to write there.

### `describe_element` (~264 tokens)

Describe an element

An element of the Mission Director or AI script schema, from the game’s md.xsd or aiscripts.xsd, or of a library file’s schema (libraries.xsd for jobs.xml, unlocks.xsd, …): its documentation, its attributes (type, required, default, allowed values, whether the value is an expression) and the child elements it allows. Use it before writing an element or attribute you are not sure of, instead of searching md.xsd, aiscripts.xsd or common.xsd: it follows their types, groups and includes.

Input parameters:

- `attribute` (string): One attribute in full: every allowed value with its documentation. Without it, every attribute with the first values by name.
- `library` (string): Instead of script, the schema a library file names in xsi:noNamespaceSchemaLocation, by its file name: libraries (jobs.xml, ships.xml, …), unlocks, factions.
- `name` (string, required): The element name: set_value, find_ship, create_order, cue.
- `parent` (string): The parent element, for an element declared differently in different places, such as param or actions.
- `script` (string): md for Mission Director scripts, aiscripts for AI scripts; or give library instead.

### `expression_type` (~219 tokens)

Type of an expression

What a keyword or a property chain of the expression language yields, step by step, from the game’s scriptproperties.xml: player.ship, player.ship.sector, event.param; and the properties of the result with their types. Or a datatype’s properties. A variable has no type here, its type comes from the script around it: the step after it is matched against the properties of every datatype. Use it before writing a property chain you are not sure of, instead of searching scriptproperties.xml.

Input parameters:

- `datatype` (string): Instead of an expression, a datatype: ship, sector, list, faction.
- `expression` (string): A keyword and its properties: player.ship.sector.
- `filter` (string): Only the properties of the result whose names contain this text, with their descriptions, also those of the types derived from it. Without it, its own and inherited properties as name → type.
- `script` (string): The script kind, for the keywords of one kind only: md (the default) or aiscripts.

### `find` (~141 tokens)

Find scripts and cues

Mission Director scripts, AI scripts, cues, libraries and interrupt library items (actions, handlers, conditions) of the game, its DLCs and the extensions, by name: whole names first, then those starting with the query, then those containing it; the extensions’ before the game’s among equals. A query with a dot matches qualified names: md.Setup.Start. When no name contains the query, a few that have its letters in order. Use it instead of searching the files for a cue or script name.

Input parameters:

- `limit` (integer): The most names to return; 50 by default.
- `query` (string, required): A name or part of one.

### `definition` (~103 tokens)

Go to definition

Where what is named at a place of a script is defined, as the editor’s go to definition finds it: a cue, script, library, label, variable, order, text, element or attribute of the schema, property of scriptproperties.xml. Each place with its line of text.

Input parameters:

- `column` (integer, required): The column, from 1.
- `file` (string, required): The script or patch.
- `line` (integer, required): The line, from 1.

### `references` (~107 tokens)

Find references

Every place that names what is named at a place of a script, in the game, its DLCs and the extensions, as the editor finds them: who signals a cue, includes a library, runs a script. Each place with its line of text. Use it instead of searching the files for a name.

Input parameters:

- `column` (integer, required): The column, from 1.
- `file` (string, required): The script or patch.
- `line` (integer, required): The line, from 1.

### `hover` (~155 tokens)

Describe a place

What the editor’s hover shows for a place of a script or patch: an element or attribute with its documentation from the schema, a step of a property chain with its type and description from scriptproperties.xml, a variable with its type and where the type comes from, a cue or script with where it is defined, a {page, id} text as the game shows it. Use it to understand a line of an existing script, the game’s included, instead of looking each part up in the schemas, scriptproperties.xml or the t folders.

Input parameters:

- `column` (integer, required): The column, from 1.
- `file` (string, required): The script or patch.
- `line` (integer, required): The line, from 1.

### `text` (~182 tokens)

Look up texts

Texts of the game and the extensions, as the game shows them, references resolved: {page, id} in a language; the texts of a page; or the texts that contain some words. Use it instead of searching the t folders: for what a {page, id} says, or to find an existing text to reuse.

Input parameters:

- `id` (integer): The text id on the page; without it, the texts of the page.
- `language` (string): The language number, 44 for English; by default the one the server was started with.
- `limit` (integer): The most texts to return for a page or a search; 20 by default.
- `page` (integer): The page id.
- `search` (string): Instead of page and id: words that must all be in the text, without regard to case.

### `status` (~33 tokens)

Status

What the server read: the game folder, the extension folders, how many scripts and texts, and the problems met reading them.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp#diagnostics

## Score history

- 2026-11-05: 93
- 2026-11-04: 93
- 2026-11-03: 93
- 2026-11-02: 93
- 2026-11-01: 93
- 2026-10-31: 92
- 2026-10-30: 92
- 2026-10-29: 91
- 2026-10-28: 91
- 2026-10-27: 90
- 2026-10-26: 90
- 2026-10-25: 89
- 2026-10-24: 74
- 2026-10-23: 89
- 2026-10-22: 89
- 2026-10-21: 88
- 2026-10-20: 88
- 2026-10-19: 87
- 2026-10-18: 87
- 2026-10-17: 87
- 2026-10-16: 86
- 2026-10-15: 86
- 2026-10-14: 85
- 2026-10-13: 49
- 2026-10-12: 49
- 2026-10-04: 80
- 2026-10-03: 80

## Common questions

### What is the X4CodeSense MCP server?

X4CodeSense is an MCP server listed in the public MCP registry as io.github.chemodun/x4-script-mcp. X4: Foundations scripts: checks, schema elements, expression types, scripts, cues and texts. This page covers its npm package (x4-script-mcp).

### Is the X4CodeSense MCP server safe to use?

X4CodeSense scores 93 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 5 November 2026. It declares no install or post-install scripts. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the X4CodeSense MCP server expose?

X4CodeSense exposes 9 tools: check, describe_element, expression_type, find, definition, and 4 more. Their descriptions and schemas cost roughly 1,432 tokens of context every time the server is loaded.

### Is the X4CodeSense MCP server still maintained?

X4CodeSense is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the X4CodeSense MCP server under?

X4CodeSense declares the Apache-2.0 licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- npm package: https://www.npmjs.com/package/x4-script-mcp
- Socket report: https://socket.dev/npm/package/x4-script-mcp
- Repository: https://github.com/chemodun/X4CodeSense
- Website: https://github.com/chemodun/X4CodeSense/tree/main/packages/mcp
- Changelog RSS feed: https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp.xml
- Changelog JSON feed: https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp.json
- HTML version of this page: https://verifymcp.io/servers/chemodun-x4-script-mcp/x4-script-mcp
