TD

techwithtim/descope-mcp-video

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

9 stars 7 forks Качество 63 Тренд 25

MCP servers explained, then built with Descope Agentic Identity Hub (Tech With Tim video)

Обзор

Three versions of the same "notes" MCP server, built in the order you show them on camera. - Script: script.md (theory fully scripted, build + Descope as bullets) - Brand-facing script (Google Doc): https://docs.google.com/document/d/1PCnNyEp0rB_m-_FViT_pYCKwViQmGUElSLTVpRmpPqQ/edit - Theory slide deck: presentation/index.html (open locally, arrows to move, F for fullscreen) or https://clever-opera-nnya.here.now/ Versions pinned on purpose: fastmcp<4 and mcp<2, because descope-mcp 0.1.0 still imports FastMCP from the old mcp.server path and breaks on mcp 2.x. Already done in pyproject.toml. Claude Desktop: same block in %APPDATA%/Claude/claude_desktop_config.json. Cursor: {"notes": {"url": "http://localhost:8000/mcp"}}. Point out that the same URL works from any machine on the network and there is no "who" anywhere. 1. Sign up at https://www.descope.com (Free Forever tier) and open the console. 2. . Name it notes. 3.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Servers Explained + Descope (video build)

Three versions of the same “notes” MCP server, built in the order you show them on camera.

File What it is Auth
v1_local.py stdio server, Claude/Cursor launch it as a subprocess none (local only)
v2_remote.py same tools over Streamable HTTP at http://localhost:8000/mcp none (the problem)
v3_auth.py same tools, protected by Descope, notes stored per user, scopes per tool Descope OAuth 2.1
test_client.py terminal client; --oauth triggers the browser login flow
notes_db.py SQLite helper shared by all three

Versions pinned on purpose: fastmcp<4 and mcp<2, because descope-mcp 0.1.0 still imports FastMCP from the old mcp.server path and breaks on mcp 2.x. Already done in pyproject.toml.

Setup

uv sync
cp .env.example .env

v1: local (stdio)

Cursor: ~/.cursor/mcp.json

{
  "mcpServers": {
    "notes": {
      "command": "uv",
      "args": ["run", "--directory", "C:/Users/User/Desktop/descope-mcp-video", "v1_local.py"]
    }
  }
}

Claude Desktop: same block in %APPDATA%/Claude/claude_desktop_config.json.

Or from the terminal, no editor needed:

uv run python -c "import asyncio; from fastmcp import Client; asyncio.run((lambda: Client('v1_local.py').__aenter__())())"

v2: remote, no auth

uv run v2_remote.py
uv run test_client.py

Cursor: {"notes": {"url": "http://localhost:8000/mcp"}}. Point out that the same URL works from any machine on the network and there is no “who” anywhere.

v3: Descope

Console (one time, about 2 minutes)

  1. Sign up at https://www.descope.com (Free Forever tier) and open the console.
  2. Agentic Identity Hub -> MCP Servers -> + MCP Server. Name it notes.
  3. MCP Server URL: http://localhost:8000/mcp (change to the public URL when you deploy). This becomes the aud claim.
  4. Client registration: enable Dynamic Client Registration (DCR) and CIMD. This is what lets Cursor / Claude register themselves.
  5. Scopes: add
    • notes:read, consent text “Read your notes”
    • notes:write, consent text “Create and delete your notes” Leave both optional so you can demo denying one on the consent screen.
  6. Expand Connect your MCP server to Descope and copy the Well-Known URL. Put it in .env as DESCOPE_CONFIG_URL.

Run

uv run v3_auth.py

Show the 401 first:

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "notes": { "command": "uv", "args": ["run", "--directory", "C:/Users/User/Desktop/descope-mcp-video", "v1_local.py"] } } }