www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - dlang mcp server

reply Robert Schadek <rburners gmail.com> writes:
I have been playing around with agentic/vibe coding dlang for a 
little while. As training LLM's on dlang hasn't been highest 
priority, how dare them, the code produced is mostly good, but 
not as good as I think it could be.
Maybe it's because I'm cheap, I have mostly used GLM 4.7 and GLM 
5.0 since its release.

So I thought, a good project would be a mcp server for dlang.
Google gemini and claude.ai told me it would make the generated 
dlang code better, so it must be true.

The result can be found and tried here 
https://github.com/burner/dlang_mcp
PLEASE BE CAREFUL, I haven't even read all the code. It seems to 
be doing stuff and maybe the LLM works better, I don't know. I 
don't even know how to test it yet.

I used it add the http connection on top of the stdio interface. 
I haven't really tested it in anger.

The mcp server currently has 2.5 main features
* dscanner interface as mcp
* dfmt interface as mcp
* vector search for functions and example for ingested dlang 
projects (this is 0.5 feature)

As I'm still learning the whole vector/embedding things, I don't 
know if its any good or just a waste of energy. The vector search 
is cpu based, no 5k nvidia card required.

This was/is mostly a learning exercise for me, and maybe somebody 
else can learn something as well. Therefore, I'm putting it 
online.

If my attempt is completely pointless please tell me.
If you have or know where to find something better please tell me.
If you want to improve it, please tell me or even better create 
PR's or issues.
Feb 15
next sibling parent Sergey <kornburn yandex.ru> writes:
On Sunday, 15 February 2026 at 20:24:16 UTC, Robert Schadek wrote:
 I used it add the http connection on top of the stdio 
 interface. I haven't really tested it in anger.

 The mcp server currently has 2.5 main features
 * dscanner interface as mcp
 * dfmt interface as mcp
 * vector search for functions and example for ingested dlang 
 projects (this is 0.5 feature)
I wrote one for DUB https://github.com/cyrusmsk/dub_mcp
Feb 15
prev sibling parent monkyyy <crazymonkyyy gmail.com> writes:
On Sunday, 15 February 2026 at 20:24:16 UTC, Robert Schadek wrote:
 The mcp server currently has 2.5 main features
 * dscanner interface as mcp
 * dfmt interface as mcp
 If my attempt is completely pointless please tell me.
 If you have or know where to find something better please tell 
 me.
As I said in my threads on the topic, the taste of those who thought it was worth subjecting humans to these things is the inverse of those who want it for ai. The ai's produce too formal of code. They make logic errors, not syntax errors. Every new model of the month produces more and more "official style"-like code. --- Heres something that I think is finished: https://github.com/crazymonkyyy/tokenlint I dont like regex but ai's do and I can imagine encoding some rules here. I havnt tested it much yet. I really want code deduping and made this gist for that goal: https://github.com/dlang/phobos/issues/10935 (gentrification of the dna similarity algorithms) I'm imagining a nested version may produce a good codedup score then it will be trivial to wrap that up and set a cut off and have a tool that scans the project.
 mpc
theres allot of talk about how mpc's are a bad api, if the ai can write any code, it better be able to write a line of bash I think I would rather see the replacement of the json-ed editors(i.e. shit) of the agents that auto run compiles and unit tests for every block of code added. If you auto ran dfmt then, easy addition and whatever. *and then when you have taken control of the code editing pipeline, store any deleted unit tests.*
Feb 15