mcp-oauth-remote-gateway

Manually authenticate MCP servers with OAuth 2.1 PKCE on remote gateways.

Updated Jun 17, 2026
One-click install
npx skills add https://github.com/cxnaive/hermes-agent-llbot --skill mcp-oauth-remote-gateway-cxnaive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-oauth-remote-gateway
Source: https://github.com/cxnaive/hermes-agent-llbot/tree/main/optional-skills/mcp/mcp-oauth-remote-gateway
Command: npx skills add https://github.com/cxnaive/hermes-agent-llbot --skill mcp-oauth-remote-gateway-cxnaive

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill resolves the authentication failure that occurs when running Hermes as a remote gateway, where the built-in OAuth flow cannot capture callbacks due to loopback address mismatches.

Core Features & Use Cases

  • Manual OAuth Flow: Provides a step-by-step procedure to perform the OAuth dance manually when the automated browser-based flow is inaccessible.
  • Token Management: Guides the secure creation and placement of OAuth tokens and client information files so Hermes can authenticate without user intervention.
  • Diagnostic Tools: Includes scripts to smoke-test tokens and identify whether a connection failure is due to a circuit breaker, session revocation, or expired credentials.

Quick Start

Use the mcp-oauth-remote-gateway skill to manually authorize a remote MCP server and configure the necessary token files for your gateway.

Frequently Asked Questions about mcp-oauth-remote-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does OAuth authentication fail when running an MCP server on a remote gateway?

OAuth authentication fails on remote MCP servers because the built-in automated browser flow cannot capture loopback callbacks due to address mismatches on headless gateways. This requires performing the OAuth 2.1 with PKCE flow manually to establish a connection.

How do I manually authenticate a remote MCP server using OAuth 2.1 with PKCE?

To manually authenticate a remote MCP server, follow the step-by-step procedure to perform the OAuth 2.1 with PKCE dance manually. You must securely create and place the OAuth tokens and client information files so the gateway can authenticate without automated browser intervention.

How can I test if my OAuth token is valid for a headless MCP gateway?

You can test OAuth token validity for a headless MCP gateway by running the included diagnostic scripts. These scripts smoke-test tokens and identify whether connection failures are caused by a circuit breaker, session revocation, or expired credentials.

Can I use automated OAuth flows for MCP servers deployed on headless remote machines?

Automated OAuth flows are not usable for MCP servers on headless remote machines because loopback callbacks are unreachable. You must use a manual OAuth flow to configure the necessary token files and enable secure token exchange for the agent runtime.

What is the best way to manage OAuth credentials for a headless MCP gateway deployment?

The best way to manage OAuth credentials for a headless MCP gateway is through manual file-based credential provisioning. This involves guiding the secure creation and placement of token files to ensure seamless integration and validate token persistence without user intervention.

Why does my MCP gateway connection drop after completing the manual OAuth flow?

An MCP gateway connection may drop after manual OAuth due to expired credentials, a triggered circuit breaker, or session revocation. Use diagnostic scripts to validate connection health and token persistence to identify the exact cause of the failure.