A cool thing about this MCP Server is that for KurrentDB, we have something called a projection engine inside the database (you can think of it as an ongoing left fold on data kept in a stream) which executes Javascript code.
Because of that we can do something interesting with MCP. When you ask the MCP Server to create a projection for you. Let's say you want a running average of the stock count for something in your inventory.
The MCP Server tells the client to do the following:
Write the code -> create the projection (run it) -> write events (test data) -> read the output and based on the output modify the code and repeat. This works as a feedback loop and the models like Claude Opus get the code right quite quickly (a few tries usually worst case).
The whole concept of having a feedback loop helps to read an end goal with more accuracy in a syntax and logic sense.
Because of that we can do something interesting with MCP. When you ask the MCP Server to create a projection for you. Let's say you want a running average of the stock count for something in your inventory.
The MCP Server tells the client to do the following: Write the code -> create the projection (run it) -> write events (test data) -> read the output and based on the output modify the code and repeat. This works as a feedback loop and the models like Claude Opus get the code right quite quickly (a few tries usually worst case).
The whole concept of having a feedback loop helps to read an end goal with more accuracy in a syntax and logic sense.