Four canonical roles
Role | In an MCP deployment |
---|---|
Resource owner | End user launching an MCP-powered agent (e.g., Strava analytics bot) |
Client | The MCP host/agent code that calls tools |
Resource server | The MCP server exposing tool endpoints (/strava:get_activities , …) |
Authorization server | IdP such as AWS Cognito that mints JWTs |
Two grant types worth knowing
Grant | When to use | Flow-at-a-glance |
---|---|---|
Authorization Code | Agent acts on behalf of a user (Strava requires it) | User consents âžś code âžś access + refresh tokens |
Client Credentials | Agent needs its own service account (no user UI) | Client ID + secret âžś access + refresh tokens |
Tip: Separate authorization and resource servers for tighter security and independent scaling—even though OAuth2 doesn’t force you to.
User → MCP Host (Client) ⟶ ①access_token
⟶ MCP Server ⟶ ② access_token
âź¶ Backend API
mcp.heeki.cloud/strava:get_activities
).JWT cheat-sheet
sub → user or client ID
aud → intended audience (client)
scope → space-delimited tool permissions
exp → expiry (short-lived!)
Hurdle | What Park tried | Engineering takeaway |
---|---|---|
Custom scopes in Cognito | Six tool scopes (mcp.heeki.cloud/... ) inside a resource server | Works, but Cognito lacks Dynamic Client Registration (DCR), so MCP Inspector’s auto-test fails. |
MCP Python SDK limits | v1.7.0 only supports auth-code flow | Client-credentials support is pending in an open PR—patch or fork until merged. |
Testing with MCP Inspector | Requires DCR; Strava & Cognito don’t provide it | A PR adds manual client-ID entry; until merged, testing is tricky without DCR. |
Master these pieces and you’ll deploy MCP servers that are both context-rich and breach-resistant:
exp
, aud
).Get those fundamentals right, and even beginners on your team can wire secure, identity-aware AI agents with confidence.
IBM’s video pits two integration patterns—generic REST APIs and the purpose‑built Model Context Protocol (MCP)—against the real‑world demands…
https://www.youtube.com/watch?v=-8k9lGpGQ6g 3 Things This Tutorial Covers Dive into building your very own custom MCP server…
Unlock the power of remote MCP servers by leveraging Azure Functions’ new experimental preview—get your…
Unlock the full potential of MCP across ten powerful workflows—from tidying your file system to…
Get up and running in minutes by transforming your existing Python REST API into a…
The NVIDIA-Certified Associate: Generative AI LLM exam is a remotely proctored, 1-hour test of your…
This website uses cookies.