freshcrate
Home > MCP Servers > nornweave

nornweave

An open-source, self-hosted API that turns standard email providers (Mailgun, SES, SendGrid) into "Inbox-as-a-Service" for AI Agents.

Description

An open-source, self-hosted API that turns standard email providers (Mailgun, SES, SendGrid) into "Inbox-as-a-Service" for AI Agents.

README

The Norns weaving fate at Yggdrasil

NornWeave

"Laws they made there, and life allotted / To the sons of men, and set their fates."
- Voluspa (The Prophecy of the Seeress), Poetic Edda, Stanza 20

Open-source, self-hosted Inbox-as-a-Service API for AI Agents

CI Status License


What is NornWeave?

Standard email APIs are stateless and built for transactional sending. NornWeave adds a stateful layer (Inboxes, Threads, History) and an intelligent layer (Markdown parsing, Semantic Search) to make email consumable by LLMs via REST or MCP.

In Norse mythology, the Norns (Urdr, Verdandi, and Skuld) dwell at the base of Yggdrasil, the World Tree. They weave the tapestry of fate for all beings. Similarly, NornWeave:

  • Takes raw "water" (incoming email data streams)
  • Weaves disconnected messages into coherent Threads (the Tapestry)
  • Nourishes AI Agents with clean, structured context

Features

Foundation (The Mail Proxy)

  • Virtual Inboxes: Create email addresses for your AI agents
  • Webhook Ingestion: Receive emails from Mailgun, SES, SendGrid, Resend
  • IMAP/SMTP: Poll existing mailboxes (IMAP) and send via SMTP for any provider or self-hosted server
  • Persistent Storage: SQLite (default) or PostgreSQL with abstracted storage adapters
  • Email Sending: Send replies through your configured provider

Intelligence (The Agent Layer)

  • Content Parsing: HTML to clean Markdown, cruft removal
  • Threading: Automatic conversation grouping via email headers
  • Thread Summarization: LLM-generated thread summaries (OpenAI, Anthropic, Gemini) for list views and token savings
  • MCP Server: Connect directly to Claude, Cursor, and other MCP clients
  • Attachment Processing: Extract text from PDFs and documents

Enterprise (The Platform Layer)

  • Semantic Search: Vector embeddings with pgvector
  • Real-time Webhooks: Get notified of new messages
  • Rate Limiting: Protect against runaway agents
  • Multi-Tenancy: Organizations and projects

Quick Start

Try NornWeave with no config: demo mode gives you a local sandbox and a pre-configured inbox.

pip install nornweave[mcp]
nornweave api --demo

API: http://localhost:8000. Open /docs, call GET /v1/inboxes to get the demo inbox id, then use MCP (nornweave mcp) to send and list messages. When you're ready for real email, set a provider and domain (see below).

Install options

# Base (SQLite, Mailgun/SES/SendGrid/Resend)
pip install nornweave

# With IMAP/SMTP support
pip install nornweave[smtpimap]

# With PostgreSQL
pip install nornweave[postgres]

# With MCP server (recommended for agents)
pip install nornweave[mcp]

# Full
pip install nornweave[all]

Real email (after demo)

Create a .env file and set your provider and domain:

# .env β€” for inbox creation with a real provider
EMAIL_PROVIDER=mailgun   # or ses, sendgrid, resend, imap-smtp
EMAIL_DOMAIN=mail.yourdomain.com
# ... plus provider-specific keys (see .env.example)

See Configuration for all settings.

nornweave api

Data is stored in ./nornweave.db (SQLite default).

Using Docker (Recommended for Production)

# Clone the repository
git clone https://github.com/DataCovey/nornweave.git
cd nornweave

# Copy environment configuration and set EMAIL_DOMAIN + provider keys (see above)
cp .env.example .env

# Start the stack
docker compose up -d

# Run migrations (PostgreSQL only β€” SQLite tables are created automatically)
docker compose exec api alembic upgrade head

Using uv (Development)

# Clone the repository
git clone https://github.com/DataCovey/nornweave.git
cd nornweave

# Install dependencies
make install-dev

# Copy environment configuration and set EMAIL_DOMAIN + provider keys (see above)
cp .env.example .env

# Run migrations (PostgreSQL only β€” SQLite tables are created automatically)
# make migrate

# Start the development server
make dev

API Overview

Create an Inbox

curl -X POST http://localhost:8000/v1/inboxes \
  -H "Content-Type: application/json" \
  -d '{"name": "Support Agent", "email_username": "support"}'

Read a Thread

curl http://localhost:8000/v1/threads/th_123

Response (LLM-optimized):

{
  "id": "th_123",
  "subject": "Re: Pricing Question",
  "messages": [
    { "role": "user", "author": "bob@gmail.com", "content": "How much is it?", "timestamp": "..." },
    { "role": "assistant", "author": "agent@myco.com", "content": "$20/mo", "timestamp": "..." }
  ]
}

Send a Reply

curl -X POST http://localhost:8000/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "inbox_id": "ibx_555",
    "reply_to_thread_id": "th_123",
    "to": ["client@gmail.com"],
    "subject": "Re: Pricing Question",
    "body": "Thanks for your interest! Our pricing starts at $20/mo."
  }'

MCP Integration

NornWeave exposes an MCP server for direct integration with Claude, Cursor, and other MCP-compatible clients.

Available Tools

Tool Description
create_inbox Provision a new email address
send_email Send an email (auto-converts Markdown to HTML)
search_email Find relevant messages in your inbox
wait_for_reply Block until a reply arrives (experimental)

Configure in Cursor/Claude

pip install nornweave[mcp]
{
  "mcpServers": {
    "nornweave": {
      "command": "nornweave",
      "args": ["mcp"],
      "env": {
        "NORNWEAVE_API_URL": "http://localhost:8000"
      }
    }
  }
}

Architecture

NornWeave uses a thematic architecture inspired by Norse mythology:

Component Name Purpose
Storage Layer Urdr (The Well) Database adapters (PostgreSQL, SQLite), migrations
Ingestion Engine Verdandi (The Loom) Webhook + IMAP ingestion, HTML→Markdown, threading, LLM thread summarization
Outbound Skuld (The Prophecy) Email sending, rate limiting, webhooks
Gateway Yggdrasil FastAPI routes, middleware, API endpoints
MCP Huginn & Muninn Read resources and write tools for AI agents

Supported Providers

Provider Sending Receiving Auto-Route Setup
Mailgun yes yes yes
AWS SES yes yes manual
SendGrid yes yes yes
Resend yes yes yes
IMAP/SMTP yes (SMTP) yes (IMAP polling) config

Documentation

Repository Structure

This is a monorepo:

Directory Purpose
src/nornweave/ Main Python package: adapters (Mailgun, SES, SendGrid, Resend, SMTP/IMAP), core config, models, huginn (MCP resources), muninn (MCP tools), skuld (outbound/sending), urdr (storage, migrations), verdandi (ingestion, parsing, threading), yggdrasil (FastAPI gateway), search, storage backends
clients/python/ Python client SDK (nornweave-client)
packages/n8n-nodes-nornweave/ n8n community node for NornWeave
tests/ Test suite: fixtures/, integration/, unit/, e2e/
web/ Hugo documentation site (content/docs/)
scripts/ DB init, migrations, dev setup
skills/ Distributable AI assistant skills (e.g. nornweave-api)
openspec/ Specs (specs/) and change artifacts (changes/, changes/archive/)

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

NornWeave is open-source software licensed under the Apache 2.0 License.


Image: "Nornorna spinner odet tradar vid Yggdrasil" by L. B. Hansen
Public Domain

Release History

VersionChangesUrgencyDate
v0.1.8## NornWeave v0.1.8 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.8 # With PostgreSQL support pip install nornweave[postgres]==0.1.8 # With MCP server for AI agents pip install nornweave[mcp]==0.1.8 # Full installation pip install nornweave[all]==0.1.8 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/18/2026
v0.1.7## NornWeave v0.1.7 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.7 # With PostgreSQL support pip install nornweave[postgres]==0.1.7 # With MCP server for AI agents pip install nornweave[mcp]==0.1.7 # Full installation pip install nornweave[all]==0.1.7 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/9/2026
v0.1.6## NornWeave v0.1.6 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.6 # With PostgreSQL support pip install nornweave[postgres]==0.1.6 # With MCP server for AI agents pip install nornweave[mcp]==0.1.6 # Full installation pip install nornweave[all]==0.1.6 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/7/2026
v0.1.5## NornWeave v0.1.5 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.5 # With PostgreSQL support pip install nornweave[postgres]==0.1.5 # With MCP server for AI agents pip install nornweave[mcp]==0.1.5 # Full installation pip install nornweave[all]==0.1.5 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/6/2026
v0.1.4## NornWeave v0.1.4 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.4 # With PostgreSQL support pip install nornweave[postgres]==0.1.4 # With MCP server for AI agents pip install nornweave[mcp]==0.1.4 # Full installation pip install nornweave[all]==0.1.4 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/5/2026
v0.1.3## NornWeave v0.1.3 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.3 # With PostgreSQL support pip install nornweave[postgres]==0.1.3 # With MCP server for AI agents pip install nornweave[mcp]==0.1.3 # Full installation pip install nornweave[all]==0.1.3 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/5/2026
v0.1.2## NornWeave v0.1.2 Install from PyPI: ```bash # Base installation (SQLite, all email providers) pip install nornweave==0.1.2 # With PostgreSQL support pip install nornweave[postgres]==0.1.2 # With MCP server for AI agents pip install nornweave[mcp]==0.1.2 # Full installation pip install nornweave[all]==0.1.2 ``` See [CHANGELOG.md](https://github.com/DataCovey/nornweave/blob/main/CHANGELOG.md) for details. Low2/5/2026
v0.1.1### Added - **MCP Server implementation** (Huginn & Muninn) for AI agent integration: - FastMCP-based server with 2 resources and 4 tools - Resources: `email://inbox/{id}/recent`, `email://thread/{id}` - Tools: `create_inbox`, `send_email`, `search_email`, `wait_for_reply` - Support for three transports: stdio (default), SSE, HTTP - CLI command `nornweave mcp` with transport selection - Registry metadata for Smithery.ai, mcp-get.com, glama.ai - Full documentation at `web/Low2/4/2026
n8n-v0.1.2## n8n-nodes-nornweave v0.1.2 Install from npm: ``` npm install @nornweave/n8n-nodes-nornweave ``` Or install via n8n Community Nodes panel. Low2/4/2026
n8n-v0.1.1## n8n-nodes-nornweave v0.1.1 Install from npm: ``` npm install @nornweave/n8n-nodes-nornweave ``` Or install via n8n Community Nodes panel. Low2/4/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

dbt-mcpA MCP (Model Context Protocol) server for interacting with dbt.v1.15.0
agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.v0.1.31
hybrid-orchestratorπŸ€– Implement hybrid human-AI orchestration patterns in Python to coordinate agents, manage sessions, and enable smooth AI-human handoffs.master@2026-04-21
AI-SkillsπŸ€– Enhance AI capabilities with modular Skills that provide expert knowledge, workflows, and integrations for any project.main@2026-04-21
AIDomesticCoreAIJπŸ› οΈ Build a robust AI Kernel for stable, auditable, and sovereign AI systems, ensuring secure execution and compliance across various domains.main@2026-04-21