MCP Academy · Lesson

Implement Tools, Resources & Prompts

Build all three primitives for the use case.

Build All Three Primitives

With a plan in hand, you now write real code. This lesson wires up your tools, resources, and prompts into one working server. 🛠️

Set Up the Backend

First, give the server something to act on. A tiny store, like a list or a SQLite file, holds the notes every primitive will share.

import sqlite3

db = sqlite3.connect("notes.db")
db.execute("CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY, title TEXT, body TEXT)")

All lessons in this course

  1. Scope the Project & Tools
  2. Implement Tools, Resources & Prompts
  3. Test, Inspect & Harden
  4. Document & Publish the Server
← Back to MCP Academy