← Back to Blog

What I'm Building Now: An AI Knowledge Base for OneStream Development

Eric Padua·
So, it looks like Azure is down today. Consequently, I'm locked out of some client environments, so I guess I'm taking this as an opportunity to finish off a prototype of an AI project I've been diving into.
Behold: my very own Model Context Protocol server. I'm using the Cursor IDE to connect to it, and its entire purpose is to answer my OneStream-specific questions on both code and concepts with hopefully lower token count usage (seems to be so far).
Also along with privacy mode, to not have any of my code or documents trained on:
MCP server setup
Educational Content Disclaimer
Please read the following points carefully:
  1. Strictly Educational Use: All examples, code, concepts, and procedures presented in this material are provided strictly for educational and informational purposes. They are designed to aid in learning and understanding specific principles.
  2. Not Standard Practice: This content does not represent standard industry or professional practice. You should not use these methods, tools, or configurations in a client-facing, production, or critical environment unless you possess the necessary expertise and a thorough understanding of all potential risks and implications. Proceed with caution and professional due diligence.
  3. Isolated Environment Testing: All tests, simulations, and validations related to this material were conducted exclusively within isolated, controlled environments. Results observed here may not translate to real-world operational environments, which will introduce variables regarding performance, security, and integration.
Now onto it…

What's an MCP Server?

Most people probably have no idea what an MCP server is (and I'll be real with you, I don't really know that much either on a super granular technical level).
But in essence, it's something you can connect to that gives Cursor's AI agent the ability to use tools or access resources to better solve your problems or answer your questions.
What kind of resources? In my case, text files. These could be:
  • My own OneStream carefully templated code
  • A text version of the OneStream Design and Reference Guide
  • ...and so on.
These resources can be referenced individually as files or as entire folders. The AI can use them as a knowledge base, and you can peruse their contents as well. However, my MCP server in particular is acting as a black box and the resources themselves cannot be retrieved, just queried.

Why Bother with an MCP Server?

My goal is simple: I want a body of knowledge that Cursor's AI agent can draw upon to give me accurate, OneStream-based information.
But it's not just about general OneStream knowledge. I also want information based on techniques I have personally used before. This helps me avoid that fun exercise of thinking, "Oh, I can just do this one thing I did at another client... but I seem to have lost the code."
Or this common scenario: "Go ask Eric for that code he wrote for <other cool client>."
With this MCP server in place, I can just ask Cursor's AI agent to go and get it for me. The server can be hosted locally on a laptop or remotely on a server (in my case, on a DigitalOcean droplet).

The MCP Server in Action

Let's see what it can do. I gave it this prompt:
"In OneStream, what is the difference between GetDataBufferUsingFormula and Eval()?"
Here's the AI thinking and my server logs:
Privacy mode
AI thinking
Server logs
It's not online. I just wanted to link a cool subdomain.
And finally, the answer it provided:
Query results
As you can see, the AI agent went out and looked at the various files available to it and used my MCP server's custom "query_onestream_kb" tool. I was also running this in a folder that has some of my code, so it was checking those files, too.
And the answer is pretty legit (at least from what I can tell).

Here's Where It Gets Really Fun

The architects reading this will definitely enjoy this next part.
I started digging into performance.
The first prompt:
"If I retrieved data from 3 data buffers using GetDataBufferUsingFormula, combined the data and set the data using SetDataBuffer, would that perform better than using api.Data.Calculate and Eval3() to do the same thing?"
AI answer
First performance prompt
First performance response
Second performance prompt
As expected, DataBuffer enjoyers win again. But wait... what's this?
  • "uses the engine's built-in data buffer math?"
  • "Eval delegates add processing overhead for each data cell...?"
I thought using data buffers always produced the fastest results, even cell-by-cell loops. This prompts a follow-up.
The second prompt:
"What if instead I created a new empty DataBuffer called calcDb, looped through every DataBufferCell in the 3 DataBuffers previously mentioned to change cell amounts, then used SetCell to add the data to the calcDb, and finally used SetDataBuffer to set the data?"
Second performance response part 1
Second performance response part 2
Performance ranking
Additional insights
The AI agent kind of messed up the formatting, but the general content is still there. According to the AI, the performance stack-ranking looks like this:
  1. Fastest: Math directly on DataBuffer objects.
  2. Second: Math done directly as a member script formula.
  3. Third: Using Eval().
  4. Last: The SetCell loop method... which is something that was actually found in the code I was using in the folder! In real-world scenarios, this technique performs well enough, so I never really thought there was a cause for concern.
Pretty cool that it could reason through that though, right?

Conclusion: Trust, but Verify

Obviously, you can't just take all these statements as objective truth. You need to go out and test these things for yourself.
The fundamental issue with AI is how easy it is to just take these answers at face value without doing the extra work to check if they're true.
In some cases, like pure coding, you might get away with it. If you tell the AI to code something and it gets you the desired result, the truth is proved on usage. (But please, don't just copy-paste. Please understand the code it gives you.)
But for others, like in this case, I'm asking the AI if one thing is more performant than another in OneStream. I'm going to have to check that, because Cursor isn't directly tied to a OneStream application to test it for itself.
Either way, I think there is tremendous value in setting up a MCP server like this, so long as it's set up properly with security and privacy in mind. Imagine an AI agent that can answer niche, OneStream-specific questions or even apply your team's coding standards from a template you've fed to it, cool right?
Well, at least I think that's pretty cool.
Hopefully, my tinkering has provided you with some good insight. Until next time!