TrueNAS Middleware MCP Server

TrueNAS Middleware MCP Server

Provides optimized documentation and API patterns from the TrueNAS middleware repository to help AI assistants understand its codebase structure without context overload. It automatically processes CLAUDE.md files to expose categorized resources including plugin guides, API models, and testing patterns.

Category
Visit Server

README

TrueNAS Middleware MCP Server

This MCP (Model Context Protocol) server provides optimized documentation resources from the TrueNAS middleware repository to Code Claude, helping it understand the codebase structure and APIs without context overload.

Quick Start

  1. For Code Claude Integration: See INTEGRATION_GUIDE.md
  2. For Usage in Code Claude: See QUICK_REFERENCE.md
  3. For Adding Documentation: See DOCUMENTATION_GUIDE.md
  4. For Plugin Doc Template: See PLUGIN_DOCUMENTATION_TEMPLATE.md
  5. For Development Plans: See ACTION_PLAN.md

Features

  • Automatically discovers and processes all CLAUDE.md files in the middleware repository
  • Organizes documentation into logical categories (Overview, Plugins, API, Testing, Subsystems)
  • Provides concise, focused resources to avoid context overload
  • Implements intelligent content summarization

Setup Options

Option 1: Native Python (Recommended)

  1. Create and activate the virtual environment:
python3.11 -m venv venv_tn_mcp
source venv_tn_mcp/bin/activate  # On Windows: venv_tn_mcp\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
./run_server.sh  # Or: python truenas_mcp_server.py

Option 2: Docker Container

  1. Build the Docker image:
docker-compose build
  1. Run the server:
docker-compose run --rm truenas-mcp

Available Resources

The server provides the following types of resources:

Overview Resources

  • truenas://overview - High-level middleware architecture
  • truenas://development/guidelines - Development best practices

Plugin Resources

  • truenas://plugins/service-types - Guide to service base classes
  • truenas://plugins/patterns - Common plugin patterns
  • truenas://plugins/categories - Categorized plugin list
  • truenas://plugins/{plugin_name} - Specific plugin documentation

API Resources

  • truenas://api/versioning - API versioning guide
  • truenas://api/models - Pydantic model patterns

Testing Resources

  • truenas://testing/overview - Testing guide
  • truenas://testing/patterns - Common testing patterns

Subsystem Resources

  • truenas://subsystems/{name} - Documentation for specific subsystems

Integration with Code Claude

See INTEGRATION_GUIDE.md for detailed setup instructions.

Quick Config (add to claude_desktop_config.json):

{
  "mcpServers": {
    "truenas-docs": {
      "command": "/path/to/venv_tn_mcp/bin/python",
      "args": ["/path/to/tn_mcp/truenas_mcp_server.py"]
    }
  }
}

How It Works

  1. The server scans the middleware repository for all CLAUDE.md files
  2. Each file is processed and categorized based on its location
  3. Content is intelligently summarized to reduce context size
  4. Resources are exposed via MCP protocol for Code Claude to query

Optimization Strategy

To avoid context overload, the server:

  • Extracts key sections from documentation
  • Limits code examples to essential ones
  • Focuses on API signatures and patterns rather than full implementations
  • Groups related information into logical resources

Running Tests

Tests are run using Docker to ensure a consistent environment.

Run All Tests

docker-compose run --rm truenas-mcp-test

Run Specific Test File

docker-compose run --rm truenas-mcp-test pytest tests/test_truenas_mcp_tools_server.py -v

Run with Coverage

docker-compose run --rm truenas-mcp-test pytest --cov=. --cov-report=html

Running Middleware Tests

The server includes a tool for running TrueNAS middleware tests. Use the run_middleware_tests.sh script:

# Run all middleware tests
./run_middleware_tests.sh

# Run a specific test file
./run_middleware_tests.sh . test_construct_schema.py

# Clean up test container
./run_middleware_tests.sh /path/to/middleware --cleanup

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured