Skip to main content
Glama

🐟 MIT Catalog β†’ MCP

Most of the web has no API, so agents can't use it. This MCP server turns the MIT Course Catalog (real site, no public API) into typed agent tools β€” TinyFish Fetch does the reading underneath.

Python 3.9+ MCP TinyFish Fetch Tests License: MIT

TinyFish Student Bounty Site to MCP (Drop 002) Β· 3+ endpoints β†’ 150 pts tier

πŸ“‘ Contents

Related MCP server: CrawlForge MCP Server

πŸš€ Installing / Getting started

pip install -r requirements.txt
export TINYFISH_API_KEY=...   # https://agent.tinyfish.ai/api-keys
mit-catalog health              # all 4 tools live; status: ok

What actually happens ↑: each tool fetches the live MIT catalog page via TinyFish Fetch and parses it into typed JSON. No API key for MIT itself β€” the key is only for TinyFish.

🎯 Usage

mit-catalog subjects --limit 6
mit-catalog courses 18 --limit 3
mit-catalog search "computer science" --limit 3
mit-catalog degree electrical-engineering-computing-course-6-5

πŸ€– Use with AI (MCP)

{
  "mcpServers": {
    "mit-catalog": {
      "command": "mit-catalog-mcp",
      "env": { "TINYFISH_API_KEY": "..." }
    }
  }
}

Tools: list_subjects Β· list_courses(subject) Β· search_degrees(query) Β· get_degree_info(url_or_slug) Β· health_check() β€” all return typed JSON, and the CLI above is the same code without an MCP client.

πŸ›  Tools

Tool

Input

Output

Real call

list_subjects(limit)

β€”

[{course_number, name}]

subjects --limit 6

list_courses(subject)

"18", "7", "6"…

[{code,title,units,term,prereq,description}]

courses 18 --limit 3

search_degrees(query)

"computer science"

[{title,url,snippet}]

search "computer science"

get_degree_info(slug)

slug or URL

{title,overview,courses:[{code,title,units}]}

degree electrical-engineering-computing-course-6-5

health_check()

β€”

{status, details[4]}

health

Multi-step agent use works because the tools compose: search_degrees returns a URL or slug, and get_degree_info consumes it in the next turn.

πŸ—οΈ How it works

flowchart LR
    subgraph tinyfish["TinyFish Fetch (underneath)"]
      F[fetch markdown<br/>catalog.mit.edu]
    end
    F --> P[Pure parsers<br/>parsers.py]
    P --> T1[list_subjects] & T2[list_courses] & T3[search_degrees] & T4[get_degree_info]
    T1 & T2 & T3 & T4 --> MCP[MCP tools + CLI<br/>typed JSON]
    MCP --> H[health_check<br/>fails loudly if MIT redesigns]
  • TinyFish Fetch does the reading/clicking for every tool β€” remove it and nothing works.

  • Pure parsers (parsers.py) are offline-tested (make test, 7 tests).

  • Retry with backoff β€” one flaky fetch doesn't break a tool call.

  • Health check runs all 4 tools against known inputs and reports ok / broken with per-tool detail.

βœ… Live proof (2026-11-08)

health β†’ status: ok, 4/4 tools green. Examples in examples/:

  • subjects.json β€” 16 Aeronautics, 21A anthropology, …

  • courses-18.json β€” 18.01 Calculus, 5-0-7 units, Fall/Spring

  • degrees.json β€” CS degree search hits with URLs

  • degree.json β€” EECS 6-5 chart: 6.100A Intro to CS Programming in Python, …

πŸ”€ State machines (explicit, in states.py)

stateDiagram-v2
    [*] --> ToolHealth: ok / broken
    ToolHealth --> System: aggregate = all tools ok ? ok : broken
    [*] --> CLI: subjects / courses / search / degree / health
    CLI --> Input: required-arg guard (exit 2) / fetch error (exit 3)
    [*] --> Target: slug / full URL β†’ normalized catalog URL

mitcatalog.states is the machine-readable spec: REQUIRED_ARG, aggregate_health, normalize_degree_target. Tool names and JSON shapes unchanged.

πŸ“ Project structure

mitcatalog/
β”œβ”€β”€ __init__.py   # version + catalog base URL
β”œβ”€β”€ cli.py        # same tools, no MCP client needed
β”œβ”€β”€ client.py     # TinyFish Fetch wrapper (retry/backoff)
β”œβ”€β”€ parsers.py    # pure offline-tested parsers
β”œβ”€β”€ server.py     # MCP tools (FastMCP)
β”œβ”€β”€ health.py     # 4-tool health check
mitcatalog.py     # shim (python3 mitcatalog.py …)
tests/            # parsers + health (mocked)
examples/         # live JSON outputs

🀝 Contributing

Issues and PRs welcome. Parser changes need a test; new tools need a health-check entry.

πŸ“œ Licensing

MIT β€” see LICENSE.


Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides 42+ MCP tools for browser automation, web scraping, and search, enabling AI agents like Claude and Cursor to browse, extract data, and run research agents on the live web.
      8
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables turning any website into a self-healing, typed JSON API with parameterized lookups, automatic drift detection/healing, and MCP-native exposure of sources as typed lookup tools.
      4
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Turns any website URL into a crawled markdown corpus and knowledge graph, then exposes it to AI agents over MCP. Enables full-text search, full page retrieval, subgraph neighbor expansion, and site statistics so agents can answer questions grounded in a specific site's documentation.
      10
      MIT