ConnectPX MCP OAuth Demo
Enables fetching authenticated user-specific data (profile, orders, invoices, subscriptions, and usage stats) from a Laravel backend API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ConnectPX MCP OAuth Demo
MCP server with OAuth 2.1 + PKCE that binds an AI client to an existing app user.
Stack: Node.js · Vercel serverless · Stateless JWT tokens (no DB needed)
Product flow (what this demo implements)
User already exists / is signed into ConnectPX (dashboard sets an app session cookie — in production this is your Laravel session)
User clicks Connect Claude
AI client starts OAuth 2.1 + PKCE
User approves on the consent page (no password re-entry when app session is present)
System associates the AI client with that user (
user_idin auth code + access token)MCP receives a Bearer JWT
Tools read
token.sub/usernameand return only that user’s data
Related MCP server: architecture-map MCP server
Deploy to Vercel (free, 2 minutes)
Option A — Vercel CLI (fastest)
npm i -g vercel
cd connectpx-mcp-demo
vercel # follow prompts, get instant HTTPS URLOption B — GitHub + Vercel Dashboard
Push this folder to a GitHub repo
Go to vercel.com → New Project → import the repo
Framework: Other · Root:
/· No build command neededClick Deploy → get your URL (e.g.
https://connectpx-mcp.vercel.app)
Optional: Set JWT secret (more secure)
In Vercel Dashboard → Project → Settings → Environment Variables:
JWT_SECRET = any-random-32-char-string-you-generate
MCP_BASE_URL = https://your-project.vercel.appTry the Connect flow in the browser
Important: Claude reaches your MCP server from Anthropic’s cloud. Use a public HTTPS URL (Vercel). localhost will not work.
Deploy and open
https://your-project.vercel.app/Pick Ahmad or Sara (establishes app session)
Click Connect Claude → Open Claude to Connect
In Claude: Add the connector, then click Connect
Browser opens ConnectPX consent → Allow Access
You’re redirected to
claude.ai— connector shows as Connected
Deep link used by the button:
https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=ConnectPX&connectorUrl=https%3A%2F%2Fyour-project.vercel.app%2FmcpUse Try locally only to simulate OAuth without Claude (stays on this site).
Test it live (API)
BASE=https://your-project.vercel.app
# 1. Protected Resource Metadata (RFC9728)
curl $BASE/.well-known/oauth-protected-resource
# 2. AS Metadata — check PKCE is S256
curl $BASE/.well-known/oauth-authorization-server
# 3. Register a client
curl -X POST $BASE/oauth/register \
-H "Content-Type: application/json" \
-d '{"client_name":"Test","redirect_uris":["http://localhost:3000/callback"]}'
# 4. MCP without token → 401 + WWW-Authenticate
curl -si -X POST $BASE/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Add to Claude Desktop / Claude with remote MCP
Point the client at your MCP URL (OAuth discovery does the rest):
https://your-project.vercel.app/mcpOptional explicit config:
{
"mcpServers": {
"connectpx": {
"url": "https://your-project.vercel.app/mcp"
}
}
}When Claude opens the authorize URL on your domain, if the user already has a ConnectPX session cookie, they only approve — then Claude receives a token for that user.
Demo credentials (consent page fallback)
User | Username | Password | Sample data |
Ahmad Raza (Premium) |
|
| 9 orders, invoices 2024–2026, 4 subscriptions, usage stats |
Sara Khan (Standard) |
|
| 7 orders, invoices 2024–2026, 3 subscriptions, usage stats |
If the dashboard (or Laravel) already set the app session cookie, password fields are hidden.
Available MCP Tools
Tool | Description |
| Profile of the authenticated user |
| Orders (filter by status, limit) |
| Invoices by year with totals |
| Active software subscriptions |
| Usage stats by period |
Replace demo data with real Laravel
App session: Replace
/app/logincookie with your real Laravel session validation ingetAppSession()(lib/store.js).Tools: In
lib/tools.js, call your Laravel API with the JWTsub(user id):
async function getOrders(userId, args) {
const resp = await fetch(`${process.env.LARAVEL_API}/users/${userId}/orders`, {
headers: { Authorization: `Bearer ${process.env.INTERNAL_KEY}` }
});
const orders = await resp.json();
return textResult(JSON.stringify(orders, null, 2));
}Architecture
User (already logged into ConnectPX / Laravel)
│
│ Click "Connect Claude"
│
AI Client (Claude)
│ POST /mcp → 401 + WWW-Authenticate: resource_metadata=...
│ GET /.well-known/oauth-protected-resource (RFC9728)
│ GET /.well-known/oauth-authorization-server (RFC8414 + PKCE S256)
│ POST /oauth/register (RFC7591 Dynamic Registration) [optional]
│ GET /oauth/authorize → Consent (uses app session if present)
│ POST /oauth/token (PKCE verifier → JWT with user_id)
│ POST /mcp + Bearer JWT → user-scoped tool results
▼
ConnectPX MCP Server (Vercel)
→ Tools return only THIS user's data (user_id from JWT sub claim)Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI phone receptionist for small businesses: calls, transcripts, recordings, contacts, appointments, texts and outbound AI calls. OAuth 2.1 with PKCE and dynamic client registration; the account owner picks what the assistant may do.
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Connect any AI assistant to Odoo 16–19 via OAuth 2.0 + PKCE. 400 free calls, no local install.
Document sharing, invoicing, and personal finance platform. 15+ AI tools via OAuth 2.1.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceConnects AI clients to the Matih data platform, enabling SQL queries, table profiling, analytics, chart creation, and file uploads through MCP tools with OAuth/PKCE authentication.83 npmApache 2.0- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI agents to read and write architecture-map projects and diagrams with per-project access controls via OAuth 2.1/PKCE.9 npm1ISC
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely access MyMLH user profiles, education, employment history, and other data via OAuth-authenticated HTTP.10-
- AlicenseNot gradedqualityBmaintenanceEnables existing apps to expose their users and data to external AI agents via MCP with OAuth 2.1 authentication and scoped tools.21 npmMIT