contentrx-lsp
Inline content-design diagnostics in any LSP-capable editor — VS Code, Cursor, Zed, Neovim, JetBrains IDEs.
ContentRX's Language Server reads JSX/TSX source, pulls out UI copy (JSX text content and stringy JSX attributes), and surfaces violations of the ContentRX content model directly in the editor's problems panel as you type.
Install
uvx contentrx-lsp # one-shot, no persistent install
pipx install contentrx-lsp
pip install contentrx-lsp
Most editors don't need you to install this by hand — use the ContentRX VS Code / Cursor extension and it will launch the server on first activation.
Configure
Set CONTENTRX_API_KEY in the environment the editor runs with.
Generate a key at contentrx.io/dashboard.
export CONTENTRX_API_KEY=cx_...
For local development against npm run dev:
export CONTENTRX_API_URL=http://localhost:3000
export CONTENTRX_INSECURE_HTTP=1
What it emits
For every extracted string, the server calls /api/check and emits
one LSP diagnostic per violation:
violationverdict → severityWarning(yellow squiggle)review_recommendedverdict → severityInformation(blue squiggle)passverdict → no diagnostic
Each diagnostic carries the standard ID as the diagnostic code and
points at the full rationale on docs.contentrx.io.
How it works
initializehandshake advertises incremental text sync and UTF-16 position encoding — the LSP spec's default, matches every editor.didOpen/didChangeupdate the in-memory document state. Lint jobs debounce for 400ms so rapid typing doesn't thrash the API.- A per-document token bucket caps API calls at 2 per second.
- Tree-sitter parses the TSX source; string extraction is scoped to
JSX text children and allow-listed copy attributes (
alt,aria-label,placeholder,title,tooltip,label, …). /api/checkruns server-side — the LSP is a thin HTTP client, no engine imports. Results map to LSP diagnostics viasrc/contentrx_lsp/diagnostics.py.
Architecture
Three surfaces talk to the same /api/check:
- MCP server (
contentrx-mcp) — Claude Code, Cursor chat, Claude desktop - LSP server (
contentrx-lsp) — inline diagnostics - CLI (
contentrx-cli) — terminal + CI
One source of truth for verdicts; no per-surface drift.
Try it
With an API key set, point any LSP client at contentrx-lsp and open
a TSX file. The reference test case:
export function SignInButton() {
return <button>Click here</button>;
}
Expected diagnostic: ACT-01 (generic CTA verb) on the Click here
text range.
Metadata
Release files for contentrx-lsp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| contentrx_lsp-0.1.0.tar.gz | 22.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| contentrx_lsp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.5 kB
Release files / contentrx_lsp-0.1.0.tar.gz
| Download URL | contentrx_lsp-0.1.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db2c686ec28d97c4dda385e7bc1ad70201f24f2fde3f06298e73498a3be923e2
|
|
BLAKE2b-256 checksum How to use checksums |
aa26b1d233ef68590f6e0ea2db29de87b2135c710feb89c49f955127df13540f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / contentrx_lsp-0.1.0-py3-none-any.whl
| Download URL | contentrx_lsp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22ea9944470c6da5251ec372819b9647ce0ebcf75b5ff8470adf1312fe8076c3
|
|
BLAKE2b-256 checksum How to use checksums |
09992bdcaf384251dd06a9705b1a928e5ba008cbe37d32d05865ac3041868062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for contentrx-lsp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.