Clarion LSP for use with Claude Code?

Hi everyone,

has anyone already created or experimented with a Language Server Protocol (LSP) implementation for Clarion?

My main goal would be to use it with Claude Code, so it can better understand and navigate a Clarion codebase (find references, symbol lookup)

Before looking into building something from scratch, I wanted to ask whether anyone in the Clarion community has already worked on an LSP, a prototype, or anything similar that could be used as a starting point.

Even an incomplete or experimental implementation would be very interesting.

Has anyone looked into this?

Yes — I’ve done quite a bit of work on an LSP for Clarion as part of my VS Code extension:

msarson/Clarion-Extension: VS Code Extension for Clarion

It already provides much of the language/symbol information you’re talking about, so if your aim is to give Claude Code better understanding and navigation of a Clarion codebase, it should at least give you a substantial starting point rather than having to build an LSP from scratch.

However, before going too far down that route, @John_Hickey has developed a full-blown Clarion add-in called Clarion Assistant, which may actually be much closer to what you’re trying to achieve already. You can find it on the ClarionLive GitHub page:

ClarionLive

Clarion Assistant integrates my LSP, along with Claude, a code graph for Clarion solutions, the Monaco editor (the editor component used by VS Code), and quite a bit more. So I’d definitely have a look at that first, particularly given that your end goal is Claude integration and codebase navigation.

If you still want to experiment with your own approach, my LSP is completely open source under the MIT licence, as is Clarion Assistant, so you’re welcome to use either as a starting point.

Cheers,
Mark

Have you seen this?

Cant comment on it.

Thanks, Mark — those references look like a very good starting point. I’ll definitely take a closer look at both your LSP and Clarion Assistant.

Not an LSP, but a related idea that might be worth exploring: rather than a full language server, one could set up an MCP (Model Context Protocol) server that gives Claude Code searchable access to Clarion documentation, the official Clarion help plus third-party library docs (CHM-based help files, HTML docs, …).

The thinking behind it: Clarion isn’t as heavily represented in general AI training data as some more mainstream languages, so instead of relying on the assistant to “remember” the right syntax or a library’s API, it could look things up in the actual help docs while you’re working, grounding answers in real documentation rather than guesswork. In practice this kind of retrieval-based grounding tends to make a real difference for less common languages and libraries.

Roughly how the pipeline could look:

  • Extract the CHM help files (compiled HTML help) into plain HTML/text, e.g. via chmlib
  • Parse each source’s HTML into clean topic text (every vendor formats their help a bit differently, so this needs some per-source handling)
  • Build a searchable index (title/keyword/content, ranked matching) across the topics
  • Expose that index as MCP tools, so an assistant like Claude Code can search and pull up specific topics on demand during a coding session

It wouldn’t touch the compiler or give live syntax checking/autocomplete like an LSP, more like letting the assistant check the manual instead of guessing. But it’s a fairly approachable build, even without prior MCP experience.

One thing worth checking before going down this path: the license/EULA terms for whichever CHM files you’d use, both Clarion’s own help and any third-party library docs. Since these are copyrighted materials from SoftVelocity and the respective vendors, it’s worth confirming what your license actually permits (personal/internal use vs. any form of redistribution) before extracting and repurposing their content, even just for a personal tool.

Isn’t this what CodeGraph is for in the Clarion Assistant?

It includes all the Clarion documentation, as well as CapeSoft and BoxSoft documentation, and you can add your own personal documentation.