सामग्री पर जाएँ

एजेंट · प्रगति पर

MCP सर्वर

Identvia एक स्टेटलेस MCP सर्वर दिखाता है ताकि सहायक AgentPass-सक्षम साइटों की पहुँच उपयोगकर्ता से माँगकर इस्तेमाल कर सकें, जबकि उपयोगकर्ता नियंत्रण में रहे।

अपने AI एजेंट के लिए प्रॉम्प्ट कॉपी करें

कोडिंग एजेंट इस्तेमाल कर रहे हैं? यह प्रॉम्प्ट उसे इन दस्तावेज़ों की ओर भेजता है और वे नियम बताता है जिनका पालन उसे करना है। वह जो लिखे, उसकी समीक्षा किसी भी दूसरे कोड की तरह करें।

You are helping me add "Sign in with Identvia" to my app (PHP). Identvia is an OpenID Connect provider.

Read these first (they are plain Markdown and are the source of truth; prefer them over anything you remember):
- https://id.identvia.com/developers/docs/quickstart.md
- https://id.identvia.com/developers/docs/oidc.md
- https://id.identvia.com/developers/docs/security.md
- Discovery: https://id.identvia.com/.well-known/openid-configuration

Stack: plain PHP 8.1+ (no framework). Use the official SDK identvia/identvia-php (composer require identvia/identvia-php, or the zip with vendor/ from https://id.identvia.com/developers/docs/php for hosts without Composer). Create identvia.php (config), login.php (redirectToSignIn), callback.php (handleCallback, then session_regenerate_id(true) and store sub) and logout.php. Read secrets from environment variables or a config file outside the web root.

Requirements:
1. Authorization code flow with PKCE (S256 only), a random state and a nonce per sign-in. No implicit flow.
2. Validate the ID token: RS256 signature from the JWKS, iss = https://id.identvia.com, aud contains my client_id, exp/iat, and the nonce.
3. Identify users by sub (it is pairwise: different for every app). Treat email as optional, because the person may choose not to share it.
4. Redirect URIs must match exactly. Keep the client secret and refresh tokens server-side; never log tokens.
5. Ask only for the scopes I need (openid, plus email/profile if used). Handle the user canceling (error=access_denied) gracefully.

Optional, only if I ask for AI-agent access later:
- AgentPass (agents acting for a user with single-use, holder-bound passes): https://id.identvia.com/developers/docs/agentpass.md
- MCP server for agent clients: https://id.identvia.com/developers/docs/mcp.md
- Token exchange, rich authorization requests and CIBA: https://id.identvia.com/developers/docs/delegation.md

Before writing code, tell me which files you will add or change. Don't invent endpoints or options that aren't in the docs; if something is unclear, ask me.

कनेक्ट

सर्वर URL: https://id.identvia.com/mcp (Streamable HTTP, JSON जवाब, बिना सत्र या SSE)। क्लाइंट /.well-known/oauth-protected-resource/mcp से प्राधिकरण खोजते हैं, फिर PKCE वाले OAuth 2.1 और resource=https://id.identvia.com/mcp इस्तेमाल करते हैं। Client ID Metadata Document (HTTPS client_id) से पहचान या डायनामिक पंजीकरण। प्रोटोकॉल संशोधन 2026-07-28 और 2025-11-25 / 2025-06-18 / 2025-03-26 समर्थित।

स्कोप

  • profile: उपयोगकर्ता कौन है (whoami)।
  • grants:read: एजेंट पहुँच और लंबित अनुरोध सूची।
  • grants:revoke: एजेंट पहुँच रद्द करें।
  • agent:request: पहुँच माँगें, जाँचें और उसके साथ साइट कॉल करें।

टूल

  • whoami, list_grants, revoke_grant
  • request_access: उपयोगकर्ता के इनबॉक्स में AgentPass अनुरोध भेजता है।
  • check_access: उपयोगकर्ता मंज़ूर करे तो Identvia पास भुनाकर credential_handle लौटाता है। टोकन स्वयं क्लाइंट को कभी नहीं लौटता।
  • call_service: सिर्फ़ दी गई साइट पर एक HTTPS अनुरोध (10 से, 256 KB)।

कोई approve टूल नहीं है। मंज़ूरी सिर्फ़ Identvia में, साइन-इन उपयोगकर्ता द्वारा, पासकी या प्रमाणक ऐप से होती है।