Course Overview and Prerequisites
In this course, we focus on Custom MCP Tools in the Twinit AI Service. Where the earlier AI courses showed how agents use system tools and knowledgebases, this course turns the spotlight on a different question: how do you give an AI model access to your own logic and your own Twinit data through a standard, reusable interface? The answer is the Model Context Protocol (MCP), an open standard that lets AI clients such as Cursor, Claude, and GitHub Copilot connect to external systems and call tools on demand.
A Custom MCP Tool wraps a Twinit Item Service backend script behind a well-described, schema-validated tool definition. Once created, the AI Service exposes it through its MCP server endpoint, allowing any compatible MCP client to discover the tool, understand its inputs, and invoke it during a conversation. Rather than hand-crafting prompts or copying data around, you describe a capability once and let the model call it whenever it is useful.
To make these ideas concrete, we will build a complete, working example from scratch. This includes setting up a new project, securely uploading an OpenAI API key, and preparing the environment using a predefined template package. The template re-creates a collection populated with sample Computer Science course data, the same fictitious course catalogue used in the earlier AI courses, and uploads the backend script we will turn into a Custom MCP Tool. This lets us focus on the tool itself rather than boilerplate setup.
From there you will create a Custom MCP Tool that queries the course data, expose it through the AI Service MCP endpoint, and finally consume it from an MCP client (Cursor) to ask natural-language questions that are answered directly from your Twinit data. By the end, you will understand how backend scripts, schemas, and the MCP protocol come together to extend AI clients with custom, data-driven capabilities powered by Twinit.
Throughout the course, each build and configuration step is presented in two ways: a Code workflow, where you write and run scripts, and an IDE Extension workflow, where you use the Twinit IDE Extension forms. Choose whichever approach suits you, you can follow either tab from start to finish.
Prerequisites#
Before diving into the hands-on lessons in this course, it is important to ensure you have the right setup and foundational knowledge. These prerequisites will help you follow along smoothly, understand the concepts presented, and successfully execute work against the Twinit AI Service.
Prerequisites for This Course:
- Completed the 2 | Self-Led Developer Basics course
- Completed the 3 | Self-Led Developer Intermediate course
- Completed the AI 01 | Introduction to Twinit AI course
- Completed the AI 02 | Twinit AI Hands On course
- A working understanding of APIs, REST APIs, and how they work and how to use them
- A working understanding and ability to read asynchronous JavaScript code
- A working understanding and ability to read ES Modules
- A working understanding and ability to read JSON
Twinit IDE Extension#
Be sure you are using the latest version of the Twinit IDE Extension before proceeding with the course.
You can check if a newer version of the extension is available by restarting your IDE and clicking on the Twinit IDE Extension. If a newer version is available, a message will appear with a link to download the installer.