MCP Study Tools

MCP Study Tools

A local MCP study assistant that explains topics, creates study plans, and generates revision checklists through the Model Context Protocol.

Category
Visit Server

README

๐ŸŽ“ MCP Study Tools โ€” Local MCP Study Assistant

A complete checkpoint project implementing a local Model Context Protocol (MCP) server for a study assistant.

โš ๏ธ Version compatibility

This project intentionally targets the FastMCP API:

from mcp.server.fastmcp import FastMCP

and pins the MCP SDK to:

mcp[cli]>=1.26,<2

This avoids the MCPServer import error that occurs when code written for a different SDK generation is mixed with a FastMCP-based installation.

The project also uses the official MCP stdio client:

from mcp import ClientSession
from mcp.client.stdio import StdioServerParameters, stdio_client

โœจ Checkpoint features

  • Local FastMCP server: MCP Study Tools
  • explain_topic
  • create_study_plan
  • generate_revision_checklist
  • Read-only project://course-outline
  • Read-only project://status
  • Structured validation errors
  • Empty-topic protection
  • Topic length and character validation
  • Study days clamped to 1โ€“14
  • Checklist items clamped to 1โ€“12
  • MCP client using stdio
  • Tool discovery
  • Multiple MCP tool calls
  • Agent-style routing
  • Explicit tool allow-list
  • Failure demonstration
  • Security documentation
  • Jupyter notebook
  • Pytest tests

๐Ÿ“ Structure

mcp-study-tools/
โ”œโ”€โ”€ server.py
โ”œโ”€โ”€ client_test.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ mcp-checkpoint-report.md
โ”œโ”€โ”€ notebooks/
โ”‚   โ””โ”€โ”€ mcp_study_tools_walkthrough.ipynb
โ””โ”€โ”€ tests/
    โ””โ”€โ”€ test_server.py

๐Ÿš€ Installation on macOS/Linux

From the project folder:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt

Verify the SDK:

python -c "import mcp; print(mcp.__version__)"
python -c "from mcp.server.fastmcp import FastMCP; print('FastMCP OK')"

๐Ÿงช Run the client checkpoint

python client_test.py

The client launches server.py through the MCP stdio transport, initializes an MCP session, discovers the three tools, calls two tools, demonstrates an empty-input failure, and performs an agent-style routing example.

Expected discovery:

=== MCP TOOL DISCOVERY ===
[
  "explain_topic",
  "create_study_plan",
  "generate_revision_checklist"
]

๐Ÿ–ฅ๏ธ MCP Inspector

The CLI development command is:

mcp dev server.py

This starts the server through the MCP development/Inspector workflow.

๐Ÿ““ Jupyter

Open:

notebooks/mcp_study_tools_walkthrough.ipynb

It covers:

  • architecture
  • validation
  • direct tool behavior
  • MCP client connection
  • tool discovery
  • tool calls
  • failure handling
  • agent-style routing
  • checkpoint verification

๐Ÿ” Security

The tools are deliberately low-risk.

Input validation

Topics:

  • must be strings;
  • cannot be empty;
  • maximum 160 characters;
  • restricted to a simple human-readable character set.

Resource limits

Study days:

1..14

Checklist items:

1..12

Values outside these ranges are clamped.

No dangerous capabilities

The server does not:

  • execute shell commands;
  • execute arbitrary Python;
  • make network requests;
  • read secrets;
  • write arbitrary files;
  • mutate persistent application state.

Agent allow-list

Before an agent-style request is executed:

ensure_allowed(tool_name)

Only the three approved learning tools may be invoked.

โŒ Failure demonstration

Calling:

explain_topic("   ")

returns a structured error:

{
  "ok": false,
  "error": {
    "code": "EMPTY_TOPIC",
    "message": "Please provide a topic, for example 'Python functions'.",
    "field": "topic"
  }
}

The server does not crash.

๐Ÿงช Automated tests

pytest -q

๐Ÿ“š Official MCP references

๐Ÿ Requirement mapping

Requirement Implementation
Python MCP SDK requirements.txt
FastMCP server server.py
3 required tools server.py
Read-only resource 2 resources
Input validation validate_topic()
Empty topic safe error EMPTY_TOPIC
Day limit 1โ€“14 clamp_integer()
Client test client_test.py
Agent demonstration pick_tool() + ensure_allowed()
Failure documentation docs/mcp-checkpoint-report.md
Jupyter notebooks/*.ipynb
Comments/documentation All Python files

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured