Skip to content

HT-010 — Nova MCP Integration (Brave Search via n8n)

Purpose

Enable Nova to perform live web searches by connecting her to the Brave Search API via an n8n MCP Server Agent workflow. This document covers the full integration stack: n8n installation, MCP credential configuration, workflow import, and Nova MCP endpoint verification.

Goal: Nova queries localhost:5678/mcp-server/http → n8n routes to Brave Search → Nova receives live web results without performing the search herself.


Overview

Component Role Location
n8n v2.17.3 MCP server host + workflow engine WSL2, PM2 id:3, port 5678
MCP Server Agent Chat trigger → AI Agent → Brave Search n8n workflow
Brave Search API Live web search provider External API
Nova MCP client — queries the endpoint Trunks WSL2
PM2 Process persistence for n8n WSL2 Ubuntu

Prerequisites

  • WSL2 Ubuntu running on Trunks ✅
  • Node v24+ and npm installed in WSL2 ✅
  • PM2 installed globally ✅
  • Brave Search API key (free tier: 2,000 queries/month) ✅
  • OpenAI API key for the AI Agent node ✅

Step 1 — Install n8n via npm

From WSL2 Ubuntu:

# Confirm Node and npm versions
node --version    # should be v24+
npm --version     # should be v11+

# Install n8n globally
sudo npm install -g n8n

# Verify installation
n8n --version     # should return 2.17.3 or later

Expected output:

added 2510 packages in 2m
n8n version: 2.17.3


Step 2 — Start n8n and Complete Owner Setup

n8n start

Watch for:

Editor is now accessible via:
http://localhost:5678

Open http://localhost:5678 in browser. Complete the owner account setup:

Field Value
Email srhardin@gmail.com
First Name Shane
Last Name Hardin
Password (use password manager)

Accept the license key when prompted — check srhardin@gmail.com for the key. Enter at: Avatar → Settings → License → Enter activation key.

Stop n8n with Ctrl+C after setup is confirmed. PM2 will manage it going forward.


Step 3 — Add n8n to PM2

pm2 start n8n --name "n8n" -- start
pm2 save
pm2 list

Expected PM2 output:

┌────┬──────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name         │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼──────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 3  │ n8n          │ fork     │ 0-9  │ online    │ 0%       │ 85.7mb   │
└────┴──────────────┴──────────┴──────┴───────────┴──────────┴──────────┘

Restart count (↺) of 5-10 on first start is normal — PM2 retries while n8n initializes.


Step 4 — Configure Credentials in n8n

Navigate to http://localhost:5678CredentialsAdd first credential.

4.1 OpenAI Credential

  1. Search for OpenAI
  2. Enter your OpenAI API key (from platform.openai.com → API Keys)
  3. Save as OpenAi account

4.2 MCP Client (STDIO) Credential

  1. Search for MCP Client
  2. Select MCP Client (STDIO) API
  3. Fill in:
Field Value
Command /usr/bin/npx
Arguments -y @modelcontextprotocol/server-brave-search
Environments BRAVE_API_KEY=your_brave_api_key_here

Critical: Use /usr/bin/npx (full path) — bare npx fails under PM2's restricted PATH.

Verify npx path:

which npx
# Should return: /usr/bin/npx

  1. Save as MCP Client (STDIO) account

Security note: Never paste API keys in chat or documentation. Enter directly into n8n credentials vault only.


Step 5 — Import MCP Server Agent Workflow

  1. In n8n → Workflows → top right Add WorkflowImport from file
  2. Import MCP_Server_Agent.json from D:\Data\AtlantisITS\ or Forgejo

Workflow structure:

Chat Trigger
    └── AI Agent (GPT-4.1-mini)
            ├── Simple Memory (10 message context)
            ├── MCP Client — listTools
            └── MCP Client1 — executeTool

After import, link credentials to each node: - OpenAI Chat Model → select OpenAi account - MCP Client (listTools) → select MCP Client (STDIO) account - MCP Client1 (executeTool) → select MCP Client (STDIO) account


Step 6 — Enable MCP Access + Publish

  1. Click Publish (top right)
  2. When Production Checklist appears → click Enable MCP access
  3. Note the MCP Server URL and generate an Access Token:
Setting Value
MCP Server URL http://localhost:5678/mcp-server/http
Auth Access token (generate and store in password manager)
  1. Store both values securely — Nova needs them for Phase 3 integration.

Step 7 — Test the Integration

7.1 Test via n8n Chat UI

  1. Open the workflow → click Open chat (bottom of canvas)
  2. Type: What is the latest AI news?

Expected execution log:

✅ When chat message received
✅ AI Agent — ~1800 tokens, ~16s
✅ MCP Client — listTools (brave_web_search identified)
✅ MCP Client1 — executeTool (search executed)

Results should include live sources (Reuters, TechCrunch, MIT News etc.)

7.2 Test Brave MCP Server Directly

From WSL2:

BRAVE_API_KEY=your_key npx -y @modelcontextprotocol/server-brave-search

Should output: Brave Search MCP Server running on stdio Press Ctrl+C to stop.


Step 8 — Verify Nova Can Query the Endpoint

From WSL2 or Windows:

curl -X POST http://localhost:5678/mcp-server/http \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_access_token" \
  -d '{"message": "What is the weather in Atlanta today?"}'

A valid JSON response with search results confirms Nova MCP integration is operational.


Architecture Reference

Nova query
    │
    ▼
localhost:5678/mcp-server/http  (n8n MCP endpoint)
    │
    ▼
n8n MCP Server Agent workflow
    │
    ├── AI Agent (GPT-4.1-mini) reasons about query
    │
    ├── MCP Client → listTools → discovers brave_web_search
    │
    └── MCP Client1 → executeTool → Brave Search API
                                          │
                                          ▼
                                    Live web results
                                          │
                                          ▼
                                    Nova response

Troubleshooting

MCP error -32000: Connection closed

Cause: n8n cannot find or launch npx under PM2's restricted PATH.

Fix: Update MCP Client credential — change Command from npx to /usr/bin/npx.

# Verify path
which npx
# Must return full path, not just "npx"

Workflow shows ⚠️ or ? on nodes after import

Cause: Credentials from source instance (Vegeta) are not present on new instance (Trunks).

Fix: Re-link each node to the newly created credentials as described in Step 5.

n8n PM2 restart count high (↺ 9+)

Normal behavior on cold start. n8n initializes slowly — PM2 retries until it stabilizes. If restarts continue indefinitely:

pm2 logs n8n --lines 50

Check for missing environment variables or port conflicts.

Brave API returns 401

Cause: API key not set correctly in MCP credential Environments field.

Fix: Edit the MCP Client (STDIO) account credential. Ensure Environments field contains exactly:

BRAVE_API_KEY=your_actual_key
No quotes, no spaces around =.

n8n.atlantisits.co returns 502 (INC-002)

The public n8n endpoint is offline — Cloudflare tunnel points to offline Vegeta.

Workaround: Use localhost:5678 directly on Trunks. Resolution pending VPS migration (May 2026).


  • HT-011 — Nova-Alpha Quick Access
  • HT-012 — Nova Workspace Structure
  • HT-013 — PM2 Process Manager
  • HT-015 — WSL ↔ Windows Bridge
  • SOP-004 — Nova-Alpha Desktop Build & Recovery
  • SOP-005 — Forgejo Deployment (pending)

Revision History

Version Date Author Notes
1.0 2026-04-21 Ozzy Initial — n8n installed, MCP Agent live, Brave Search confirmed
1.1 2026-04-29 Ozzy Added architecture diagram, INC-002 note, npx path fix documented

End of HT-010 — Nova MCP Integration (Brave Search via n8n)