Use SecPrep via MCP

SecPrep does not host an MCP server. Instead, any OpenAPI→MCP bridge can generate tools directly from the published spec at /api/openapi.json. The recipe below uses FastMCP (Python) — no SecPrep-specific code required.

  1. Sign in at Settings → API Keys and create a key.
  2. Install FastMCP: pip install fastmcp httpx
  3. Paste the snippet below, replacing the placeholder with your key, and run it.
import os
import httpx
from fastmcp import FastMCP

SECPREP_API_KEY = os.environ["SECPREP_API_KEY"]  # sk_live_…

client = httpx.AsyncClient(
    base_url="https://secprep.io",
    headers={"Authorization": f"Bearer {SECPREP_API_KEY}"},
)

spec = httpx.get("https://secprep.io/api/openapi.json").json()
mcp = FastMCP.from_openapi(openapi_spec=spec, client=client, name="SecPrep")
mcp.run()

The resulting MCP server exposes every SecPrep API operation as a named tool (listCards, getCard, submitCard, voteCard, generateDeck, and more). Reads are open; writes require the API key and respect rate limits.