Package Information
Documentation
Fusion AI Node for n8n
A production-ready n8n community node package that provides seamless integration with Fusion AI's NeuroSwitch multi-provider orchestration platform.
š Features
- Multi-Provider AI Access: Connect to OpenAI, Anthropic, Google, and other AI providers through a single unified interface
- NeuroSwitch Auto-Routing: Intelligent automatic provider selection based on availability and performance
- LangChain Integration: Full compatibility with n8n's AI Agent workflows and tool calling
- Secure Credentials: API keys are stored securely with
noData: trueprotection - Production Ready: Built with TypeScript, strict type checking, and comprehensive error handling
š¦ Installation
From npm (Recommended)
npm install fusion-node
From Source
git clone https://github.com/Fusionaimcp4/n8n-nodes-fusion.git
cd n8n-nodes-fusion
npm install
npm run build
In n8n
- Install the package in your n8n instance
- Restart n8n
- The Fusion AI nodes will appear in the node palette
š§ Setup
1. Get Your Fusion API Key
- Visit Fusion AI Platform
- Sign up for an account
- Generate your API key from the dashboard
2. Configure Credentials in n8n
Step-by-Step Credential Setup:
- Open n8n: Navigate to your n8n instance
- Go to Credentials: Click on "Credentials" in the left sidebar
- Add New Credential: Click the "+" button or "Add Credential"
- Search for Fusion: Type "Fusion API" in the search box
- Select Fusion API: Click on "Fusion API" from the results
- Enter Your Details:
- API Key: Paste your Fusion AI API key
- Base URL: Leave as default (
https://api.mcp4.ai) or enter custom URL
- Test Connection: Click "Test" to verify your credentials work
- Save: Click "Save" to store your credentials
- Name Your Credential: Give it a descriptive name like "Fusion AI Production"
Credential Fields Explained:
API Key (Required): Your Fusion AI API key for authentication
- Get this from your Fusion AI dashboard
- Keep this secure and never share it publicly
- The field is password-protected for security
Base URL (Optional): The base URL for the Fusion AI API
- Default:
https://api.mcp4.ai - Only change if using a custom Fusion AI instance
- Must include the protocol (https://)
- Default:
Security Best Practices:
- Environment Variables: In production, use environment variables for API keys
- Credential Naming: Use descriptive names to identify different environments
- Access Control: Limit API key permissions to necessary scopes only
- Regular Rotation: Periodically rotate your API keys for enhanced security
- Monitoring: Monitor API usage and costs through the Fusion AI dashboard
Troubleshooting Credentials:
"Invalid API Key" Error:
- Verify the API key is correct and active
- Check for extra spaces or characters
- Ensure the API key hasn't expired
"Connection Failed" Error:
- Verify your internet connection
- Check if the Base URL is correct
- Ensure your firewall allows HTTPS connections to api.mcp4.ai
"Test Connection Failed":
- Double-check your API key
- Verify the Base URL is accessible
- Check n8n logs for detailed error messages
šÆ Usage
Fusion Chat Model Node (AI Agent Integration)
The primary node for AI Agent workflows:
- Add Node: Drag "Fusion Chat Model" from the node palette
- Select Model: Choose from available providers:
- NeuroSwitch (auto routing) - Recommended
- OpenAI: GPT-4, GPT-3.5-turbo
- Anthropic: Claude 3 Sonnet, Claude 3 Haiku
- Google: Gemini Pro, Gemini Pro Vision
- Configure Options:
- Temperature: 0.0-1.0 (default: 0.3)
- Max Tokens: 1-4096 (default: 1024)
- Connect to AI Agent: Use as a Language Model in AI Agent workflows
Example AI Agent Workflow
{
"nodes": [
{
"name": "Fusion Chat Model",
"type": "fusionChatModel",
"parameters": {
"model": "neuroswitch",
"options": {
"temperature": 0.3,
"maxTokens": 1024
}
}
},
{
"name": "AI Agent",
"type": "aiAgent",
"parameters": {
"languageModel": "={{ $('Fusion Chat Model').item.json.response }}"
}
}
]
}
š Security
Credential Protection
- API Keys: Stored securely with
noData: trueprotection - No Data Persistence: Credentials are not logged or stored in plain text
- Secure Transmission: All API calls use HTTPS encryption
Best Practices
- Environment Variables: Use environment variables for API keys in production
- Access Control: Limit API key permissions to necessary scopes
- Monitoring: Monitor API usage and costs through Fusion AI dashboard
- Rotation: Regularly rotate API keys for enhanced security
Reporting Security Issues
If you discover a security vulnerability, please do not open a public GitHub issue. Instead:
- Email:
security@mcp4.ai - Response Time: We aim to respond within 24-48 hours
- See: SECURITY.md for detailed reporting guidelines
š ļø Development
Prerequisites
- Node.js >= 18.0.0
- npm or yarn
- TypeScript knowledge
Building from Source
# Clone repository
git clone https://github.com/Fusionaimcp4/n8n-nodes-fusion.git
cd n8n-nodes-fusion
# Install dependencies
npm install
# Build the project
npm run build
# Run linting
npm run lint
# Format code
npm run format
Project Structure
āāā dist/ # Built files (production)
āāā nodes/Fusion/ # Source TypeScript files
ā āāā FusionChatModel.node.ts # Main AI Agent node
ā āāā FusionApi.credentials.ts # Credential configuration
ā āāā fusion.svg # Node icon
āāā package.json # Package configuration
āāā tsconfig.json # TypeScript configuration
āāā README.md # This file
š Supported Models
OpenAI
- GPT-4
- GPT-4 Turbo
- GPT-3.5-turbo
- GPT-3.5-turbo-16k
Anthropic
- Claude 3 Sonnet
- Claude 3 Haiku
- Claude 3 Opus
- Gemini Pro
- Gemini Pro Vision
Auto-Routing (NeuroSwitch)
- Automatically selects the best available provider
- Handles failover and load balancing
- Optimizes for cost and performance
š Troubleshooting
Common Issues
"Invalid model ID" Error
- Ensure the model string format is correct:
provider:model_id - Check that the model is active in your Fusion AI account
"Could not resolve parameter dependencies" Error
- This has been fixed in the latest version
- Update to the latest package version
Connection Timeout
- Verify your API key is correct
- Check your internet connection
- Ensure the base URL is accessible
Debug Mode
Enable debug logging in n8n to see detailed error messages:
N8N_LOG_LEVEL=debug npm start
š Performance
Optimization Tips
- Use NeuroSwitch: Automatic routing optimizes for speed and cost
- Batch Requests: Process multiple items in a single workflow execution
- Cache Results: Store frequently used responses
- Monitor Usage: Track token consumption and costs
Rate Limits
- Fusion AI handles rate limiting automatically
- NeuroSwitch provides intelligent queuing
- Respect individual provider rate limits
š¤ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
š License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
š Support
- Documentation: Fusion AI API Docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@mcp4.ai
š Changelog
v0.1.4
- Initial release
- Fusion Chat Model node for AI Agent integration
- Multi-provider support (OpenAI, Anthropic, Google)
- NeuroSwitch auto-routing
- Secure credential handling
- Production-ready build system
Made with ā¤ļø by the Fusion AI team