

Picture by Ideogram
Most of my days as a knowledge scientist appear like this:
- Stakeholder: “Are you able to inform us how a lot we made in promoting income within the final month and what number of that got here from search adverts?”
- Me: “Run an SQL question to extract the info and hand it to them.”
- Stakeholder: “I see. What’s our income forecast for the following 3 years?”
- Me: “Consolidate information from a number of sources, communicate to the finance staff, and construct a mannequin that forecasts income.”
Duties just like the above are advert hoc requests from enterprise stakeholders. They take round 3–5 hours to finish and are normally unrelated to the core undertaking I am engaged on.
When data-related questions like these are available in, they usually require me to push the deadlines of present tasks or work additional hours to get the job performed. And that is the place AI is available in.
As soon as AI fashions like ChatGPT and Claude have been made obtainable, the staff’s effectivity improved, as did my capacity to reply to advert hoc stakeholder requests. AI dramatically diminished the time I spent writing code, producing SQL queries, and even collaborating with completely different groups for required data. Moreover, after AI code assistants like Cursor have been built-in with our codebases, effectivity features improved even additional. Duties just like the one I simply defined above might now be accomplished twice as quick as earlier than.
Not too long ago, when MCP servers began gaining reputation, I believed to myself:
Can I construct an MCP that automates these information science workflows additional?
I spent two days constructing this MCP server, and on this article, I’ll break down:
- The outcomes and the way a lot time I’ve saved with my information science MCP
- Assets and reference supplies used to create the MCP
- The essential setup, APIs, and companies I built-in into my workflow
# Constructing a Knowledge Science MCP
Should you do not already know what an MCP is, it stands for Mannequin Context Protocol and is a framework that means that you can join a big language mannequin to exterior companies.
This video is a good introduction to MCPs.
// The Core Downside
The issue I wished to resolve with my new information science MCP was:
How do I consolidate data that’s scattered throughout numerous sources and generate outcomes that may straight be utilized by stakeholders and staff members?
To perform this, I constructed an MCP with three elements, as proven within the flowchart under:


Picture by Writer | Mermaid
// Element 1: Question Financial institution Integration
As a data base for my MCP, I used my staff’s question financial institution (which contained questions, a pattern question to reply the query, and a few context in regards to the tables).
When a stakeholder asks me a query like this:
What proportion of promoting income got here from search adverts?
I not should look by a number of tables and column names to generate a question. The MCP as a substitute searches the question financial institution for the same query. It then features context in regards to the related tables it ought to question and adapts these queries to my particular query. All I must do is name the MCP server, paste in my stakeholder’s request, and I get a related question in a couple of minutes.
// Element 2: Google Drive Integration
Product documentation is normally saved in Google Drive—whether or not it is a slide deck, doc, or spreadsheet.
I linked my MCP server to the staff’s Google Drive so it had entry to all our documentation throughout dozens of tasks. This helps shortly extract information and reply questions like:
Are you able to inform us how a lot we made in promoting income within the final month?
I additionally listed these paperwork to extract particular key phrases and titles, so the MCP merely has to undergo the key phrase listing based mostly on the question relatively than accessing tons of of pages directly.
For instance, if somebody asks a query associated to “cellular video adverts,” the MCP will first search by the doc index to establish essentially the most related information earlier than trying by them.
// Element 3: Native Doc Entry
That is the best part of the MCP, the place I’ve a neighborhood folder that the MCP searches by. I add or take away information as wanted, permitting me so as to add my very own context, data, and directions on prime of my staff’s tasks.
# Abstract: How My Knowledge Science MCP Works
Here is an instance of how my MCP at present works to reply advert hoc information requests:
- A query is available in: ”What number of video advert impressions did we serve in Q3, and the way a lot advert demand do we have now relative to provide?”
- The doc retrieval MCP searches our undertaking folder for “Q3,” “video,” “advert,” “demand,” and “provide,” and finds related undertaking paperwork
- It then retrieves particular particulars in regards to the Q3 video advert marketing campaign, its provide, and demand from staff paperwork
- It searches the question financial institution for related questions on advert serves
- It makes use of the context obtained from the paperwork and question financial institution to generate an SQL question about Q3’s video marketing campaign
- Lastly, the question is handed to a separate MCP that’s linked to Presto SQL, which is robotically executed
- I then collect the outcomes, assessment them, and ship them to my stakeholders
# Implementation Particulars
Right here is how I applied this MCP:
// Step 1: Cursor Set up
I used Cursor as my MCP consumer. You possibly can set up Cursor from this hyperlink. It’s basically an AI code editor that may entry your codebase and use it to generate or modify code.
// Step 2: Google Drive Credentials
Nearly all of the paperwork utilized by this MCP (together with the question financial institution) have been saved in Google Drive.
To offer your MCP entry to Google Drive, Sheets, and Docs, you may must arrange API entry:
- Go to the Google Cloud Console and create a brand new undertaking.
- Allow the next APIs: Google Drive, Google Sheets, Google Docs.
- Create credentials (OAuth 2.0 consumer ID) and save them in a file known as
credentials.json
.
// Step 3: Set Up FastMCP
FastMCP is an open-source Python framework used to construct MCP servers. I adopted this tutorial to construct my first MCP server utilizing FastMCP.
(Word: This tutorial makes use of Claude Desktop because the MCP consumer, however the steps are relevant to Cursor or any AI code editor of your alternative.)
With FastMCP, you possibly can create the MCP server with Google integration (pattern code snippet under):
@mcp.software()
def search_team_docs(question: str) -> str:
"""Search staff paperwork in Google Drive"""
drive_service, _ = get_google_services()
# Your search logic right here
return f"Trying to find: {question}"
// Step 4: Configure the MCP
As soon as your MCP is constructed, you possibly can configure it in Cursor. This may be performed by navigating to Cursor’s Settings window → Options → Mannequin Context Protocol. Right here, you may see a piece the place you possibly can add an MCP server. While you click on on it, a file known as mcp.json
will open, the place you possibly can embody the configuration in your new MCP server.
That is an instance of what your configuration ought to appear like:
{
"mcpServers": {
"team-data-assistant": {
"command": "python",
"args": ["path/to/team_data_server.py"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "path/to/credentials.json"
}
}
}
}
After saving your modifications to the JSON file, you possibly can allow this MCP and begin utilizing it inside Cursor.
# Ultimate Ideas
This MCP server was a easy aspect undertaking I made a decision to construct to save lots of time on my private information science workflows. It is not groundbreaking, however this software solves my fast ache level: spending hours answering advert hoc information requests that take away from the core tasks I am engaged on. I imagine {that a} software like this merely scratches the floor of what is attainable with generative AI and represents a broader shift in how information science work will get performed.
The standard information science workflow is transferring away from:
- Spending hours discovering information
- Writing code
- Constructing fashions
The main focus is shifting away from hands-on technical work, and information scientists at the moment are anticipated to have a look at the larger image and clear up enterprise issues. In some circumstances, we’re anticipated to supervise product choices and step in as a product or undertaking supervisor.
As AI continues to evolve, I imagine that the traces between technical roles will change into blurred. What is going to stay related is the ability of understanding enterprise context, asking the suitable questions, decoding outcomes, and speaking insights. If you’re a knowledge scientist (or an aspiring one), there isn’t any query that AI will change the way in which you’re employed.
You’ve gotten two decisions: you possibly can both undertake AI instruments and construct options that form this alteration in your staff, or let others construct them for you.
Natassha Selvaraj is a self-taught information scientist with a ardour for writing. Natassha writes on every thing information science-related, a real grasp of all information matters. You possibly can join together with her on LinkedIn or try her YouTube channel.