Package Information
Downloads: 0 weekly / 14 monthly
Latest Version: 1.1.0
Author: Emmanuel Nicolaides
Documentation
n8n-nodes-mcp-oauth
Custom MCP trigger node for n8n with OAuth2 authentication support.
Features
- OAuth2 authentication for MCP trigger nodes
- Support for multiple OAuth providers (Google, GitHub, Generic)
- Configurable token header formats (Bearer or custom headers)
- Backward compatibility with existing authentication methods (None, Bearer, Header)
- MCP protocol compliance for JSON-RPC 2.0
Installation
- Clone this repository
- Install dependencies:
npm install - Build the node:
npm run build - Install in n8n:
Or copy thenpm linkdistfolder to your n8n community nodes directory.
Configuration
OAuth2 Setup
- Create an OAuth2 application with your provider (Google, GitHub, or custom)
- Configure the credential with:
- Authorization URL
- Access Token URL
- Client ID
- Client Secret
- Scope (optional)
- Select the token header format:
- Bearer Token:
Authorization: Bearer <token> - Custom Header:
<Custom-Header-Name>: <token>
- Bearer Token:
Node Configuration
- Authentication: Choose your authentication method
- Path: Set the MCP server endpoint path
- Response Mode: Choose how to handle responses
- Options: Configure additional settings like token validation
OAuth Providers
- Authorization URL:
https://accounts.google.com/o/oauth2/v2/auth - Access Token URL:
https://oauth2.googleapis.com/token - Required scopes: Depends on your use case
GitHub
- Authorization URL:
https://github.com/login/oauth/authorize - Access Token URL:
https://github.com/login/oauth/access_token - Required scopes: Depends on your use case
Generic
Use any OAuth2 provider by providing custom URLs.
Example Usage
- Add the MCP OAuth Trigger node to your workflow
- Configure OAuth2 credentials
- Connect your workflow nodes
- Test the webhook endpoint
Development
# Install dependencies
npm install
# Development mode with watch
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format
License
MIT