nowadays-apparelmagic-mcp
OAuth proxy that lets ChatGPT securely access the ApparelMagic MCP endpoint without exposing the API key, handling authorization and authenticated proxying of MCP requests.
README
NOWADAYS ApparelMagic MCP OAuth Proxy
This service connects ChatGPT to the ApparelMagic MCP endpoint without exposing the ApparelMagic API key to the client. It provides an OAuth 2.0 authorization-code flow with PKCE, validates short-lived bearer tokens, and forwards authenticated MCP requests to ApparelMagic with the configured X-API-Key header.
How it works
- ChatGPT discovers the OAuth and protected-resource metadata.
- The MCP client dynamically registers its redirect URI.
- An administrator authorizes access with the configured password.
- The client exchanges the one-time authorization code and PKCE verifier for an access token.
- Requests to
/mcpare authenticated and proxied to ApparelMagic.
The ApparelMagic API key remains server-side throughout this flow.
Requirements
- Node.js 20 or newer
- A public HTTPS URL for the deployed service
- An ApparelMagic API key
Installation
Install the exact dependency versions recorded in package-lock.json:
npm ci
Configuration
Set these environment variables in the deployment platform. Never commit their values.
| Variable | Required | Description |
|---|---|---|
PUBLIC_BASE_URL |
Yes* | Public HTTPS origin of this service, without a trailing slash |
RENDER_EXTERNAL_URL |
Yes* | Render-provided fallback when PUBLIC_BASE_URL is not set |
APPARELMAGIC_API_KEY |
Yes | Secret API key added to upstream requests as X-API-Key |
OAUTH_ADMIN_PASSWORD |
Yes | Password used on the authorization screen |
JWT_SECRET |
Yes | High-entropy secret used to sign clients, codes, and tokens |
PORT |
No | HTTP port; defaults to 3000 |
UPSTREAM_MCP_URL |
No | ApparelMagic MCP endpoint; defaults to https://api.apparelmagic.com/mcp |
OAUTH_SCOPE |
No | Granted OAuth scope; defaults to mcp:tools:read |
* Set either PUBLIC_BASE_URL or RENDER_EXTERNAL_URL.
Generate strong secrets locally, for example:
openssl rand -base64 48
Run locally
OAuth redirect URIs may use HTTP only for localhost; production deployments must use HTTPS.
export PUBLIC_BASE_URL=http://localhost:3000
export APPARELMAGIC_API_KEY=replace-me
export OAUTH_ADMIN_PASSWORD=replace-me
export JWT_SECRET=replace-with-a-long-random-secret
npm start
Verify the service:
curl http://localhost:3000/health
Expected response:
{"ok":true,"service":"nowadays-apparelmagic-mcp"}
Connect an MCP client
After deployment, configure the MCP server URL as:
https://your-service.example/mcp
The client can discover OAuth configuration through:
/.well-known/oauth-authorization-server/.well-known/openid-configuration/.well-known/oauth-protected-resource/.well-known/oauth-protected-resource/mcp
On first connection, complete the authorization page using OAUTH_ADMIN_PASSWORD.
Endpoints
| Endpoint | Purpose |
|---|---|
GET /health |
Health check |
GET / |
Basic service status |
GET/POST /authorize |
Authorization and administrator approval |
POST /register |
Dynamic OAuth client registration |
POST /token |
Code exchange and refresh-token rotation |
ALL /mcp |
Authenticated ApparelMagic MCP proxy |
Security notes
- Store all secrets only in the deployment platform's secret manager.
- Use a unique, high-entropy
JWT_SECRETand rotate it if exposure is suspected. - Keep
OAUTH_ADMIN_PASSWORDseparate from the ApparelMagic API key. - Use HTTPS in production and restrict access to trusted users.
- The default scope is read-oriented, but actual capabilities also depend on the upstream ApparelMagic account and API key.
- Authorization-code replay protection is held in memory. Restarting the service clears that short-lived state, and horizontal scaling would require a shared store.
Development and CI
Run the same checks used by GitHub Actions:
npm ci
npm run check
The CI workflow runs on pushes to main and on pull requests using Node.js 20. Dependabot alerts and normal dependency updates should keep package-lock.json synchronized with package.json.
License
Private NOWADAYS integration. No license is granted for redistribution unless one is added explicitly.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.