
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
mcp-remote-with-okta
Advanced tools
A wrapper for mcp-remote that handles Adobe IMS or Okta authentication using OAuth implicit flow, providing seamless authentication for protected MCP servers.
npx mcp-remote-with-okta <mcp-url>
npm install -g mcp-remote-with-okta
mcp-remote-with-okta <mcp-url>
| Variable | Required | Default | Description |
|---|---|---|---|
AUTH_PROVIDER | Optional | adobe | Authentication provider (adobe or okta) |
ADOBE_CLIENT_ID | ✅ If AUTH_PROVIDER is adobe | - | Client ID for Adobe IMS |
ADOBE_SCOPE | Optional | AdobeID,openid | OAuth scope for Adobe IMS |
ADOBE_IMS_ENV | Optional | prod | IMS environment (prod, stage, dev) |
OKTA_CLIENT_ID | ✅ If AUTH_PROVIDER is okta | - | Client ID for Okta |
OKTA_DOMAIN | ✅ If AUTH_PROVIDER is okta | - | Your Okta domain (e.g., dev-12345.okta.com) |
OKTA_SCOPE | Optional | openid profile email | OAuth scope for Okta |
REDIRECT_URI | Optional | http://localhost:8080/callback | OAuth redirect URI |
AUTH_METHOD | Optional | jwt | Authentication method (jwt or access_token) |
DEBUG_MODE | Optional | false | Enable debug mode for troubleshooting |
AUTO_REFRESH | Optional | true | Enable automatic token refresh |
REFRESH_THRESHOLD | Optional | 10 | Auto-refresh threshold in minutes |
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": [
"mcp-remote-with-okta",
"https://your-mcp-server.com/mcp"
],
"env": {
"AUTH_PROVIDER": "adobe",
"ADOBE_CLIENT_ID": "your_client_id_here",
"ADOBE_IMS_ENV": "prod"
}
}
}
}
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": [
"mcp-remote-with-okta",
"https://your-mcp-server.com/mcp"
],
"env": {
"AUTH_PROVIDER": "okta",
"OKTA_CLIENT_ID": "your_okta_client_id",
"OKTA_DOMAIN": "your_okta_domain.okta.com"
}
}
}
}
The script automatically detects the configured authentication provider and handles user authentication transparently.
For Adobe:
export AUTH_PROVIDER=adobe
export ADOBE_CLIENT_ID=your_client_id
npx mcp-remote-with-okta https://my.mcp-server.com/mcp
For Okta:
export AUTH_PROVIDER=okta
export OKTA_CLIENT_ID=your_client_id
export OKTA_DOMAIN=your.okta.domain
npx mcp-remote-with-okta https://my.mcp-server.com/mcp
The package also provides CLI commands for token management:
# Authenticate user and get token
npx mcp-remote-with-okta <mcp-url> authenticate
# Check token status
npx mcp-remote-with-okta <mcp-url> status
# Display current token
npx mcp-remote-with-okta <mcp-url> token
# Clear stored tokens
npx mcp-remote-with-okta <mcp-url> clear
# Show help
npx mcp-remote-with-okta <mcp-url> help
This wrapper implements the OAuth implicit flow for authentication:
mcp-remote with Authorization: Bearer <token> header.The package implements a complete OAuth implicit flow:
1. Generate OAuth URL → Auth Server (Adobe IMS or Okta)
2. Open Browser → User Authentication
3. Capture Callback → Local HTTP Server
4. Extract Tokens → From URL Fragment
5. Store Tokens → Secure Local Storage
6. Launch MCP → With Auth Header
The library supports multiple Adobe IMS environments. For Okta, the domain is configured directly via OKTA_DOMAIN.
prod) - Default Adobe production environmentstage, stg) - Adobe staging environment for testingdev, development) - Adobe development environmentexport ADOBE_IMS_ENV="stage" # Use Adobe staging environment
"Client ID not found"
# Ensure ADOBE_CLIENT_ID or OKTA_CLIENT_ID is set for your chosen AUTH_PROVIDER
"Authentication failed"
# Check that your Developer Console project (Adobe or Okta) is properly configured
# Verify the client ID is correct for the target environment
"OAuth state parameter invalid"
# This usually indicates a callback security issue
# Clear tokens and try again
npx mcp-remote-with-okta <url> clear
"Token validation failed"
# Clear stored tokens and re-authenticate
npx mcp-remote-with-okta <url> clear
npx mcp-remote-with-okta <url> authenticate
"Auto-refresh failed"
# Check debug logs to see the specific error
export DEBUG_MODE=true
npx mcp-remote-with-okta <url> status
# Disable auto-refresh if causing issues
export AUTO_REFRESH=false
"Client error for command A system error occurred (spawn npx ENOENT)"
# If you encounter this error when using npx in MCP configuration,
# this often happens when the Node.js/npm environment isn't properly
set up
# Solution: Create an npx wrapper script
cat > ~/.cursor/npx-wrapper.sh << 'SCRIPT'
#!/bin/bash
# Source nvm to get the correct node version
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Use your preferred node version (adjust as needed)
nvm use 22.0.0 >/dev/null 2>&1
# Execute npx with all passed arguments
exec npx "$@"
SCRIPT
# Make the script executable
chmod +x ~/.cursor/npx-wrapper.sh
# Update your ~/.cursor/mcp.json to use the wrapper instead of npx:
{
"mcpServers": {
"your-server": {
"command": "/Users/your-username/.cursor/npx-wrapper.sh",
"args": [
"mcp-remote-with-okta",
"https://your-mcp-server.com/mcp"
],
"env": {
"AUTH_PROVIDER": "adobe",
"ADOBE_CLIENT_ID": "your_client_id_here"
}
}
}
}
For detailed troubleshooting, enable debug mode:
# Enable debug logging for the selected provider
export DEBUG_MODE=true
export AUTH_PROVIDER=okta # or 'adobe'
npx mcp-remote-with-okta <url> status
# Or use standard DEBUG variable
export DEBUG=okta # or 'adobe'
npx mcp-remote-with-okta <url> authenticate
Debug mode shows:
For debugging authentication issues:
# Check authentication status with debug info
export DEBUG_MODE=true
npx mcp-remote-with-okta <url> status
# View current token details
npx mcp-remote-with-okta <url> token
# Test authentication flow with full logging
export DEBUG_MODE=true
npx mcp-remote-with-okta <url> authenticate
# Clear tokens and start fresh
npx mcp-remote-with-okta <url> clear
This package is built with:
The implementation provides robust error handling, automatic token management, and follows OAuth security best practices.
The wrapper automatically refreshes tokens before they expire to ensure uninterrupted service:
# Enable auto-refresh (default: true)
export AUTO_REFRESH=true
# Set refresh threshold to 5 minutes before expiration
export REFRESH_THRESHOLD=5
# Disable auto-refresh
export AUTO_REFRESH=false
Auto-refresh features:
Contributions are welcomed! Please ensure all tests pass and maintain code coverage above 75%.
npm test # Run tests
npm run test:coverage # Run tests with coverage
npm run lint # Check code style
This project is licensed under the MIT License. See LICENSE for more information.
FAQs
MCP remote server with Adobe IMS/Okta authentication wrapper
The npm package mcp-remote-with-okta receives a total of 3 weekly downloads. As such, mcp-remote-with-okta popularity was classified as not popular.
We found that mcp-remote-with-okta demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.