Provides access to documentation resources and architectural overviews for the TrueNAS middleware repository, including API signatures, plugin patterns, and tools for running middleware tests.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TrueNAS Middleware MCP Servershow me the common plugin patterns for middleware"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
For Code Claude Integration: See INTEGRATION_GUIDE.md
For Usage in Code Claude: See QUICK_REFERENCE.md
For Adding Documentation: See DOCUMENTATION_GUIDE.md
For Plugin Doc Template: See PLUGIN_DOCUMENTATION_TEMPLATE.md
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)
Create and activate the virtual environment:
Install dependencies:
Run the server:
Option 2: Docker Container
Build the Docker image:
Run the server:
Available Resources
The server provides the following types of resources:
Overview Resources
truenas://overview- High-level middleware architecturetruenas://development/guidelines- Development best practices
Plugin Resources
truenas://plugins/service-types- Guide to service base classestruenas://plugins/patterns- Common plugin patternstruenas://plugins/categories- Categorized plugin listtruenas://plugins/{plugin_name}- Specific plugin documentation
API Resources
truenas://api/versioning- API versioning guidetruenas://api/models- Pydantic model patterns
Testing Resources
truenas://testing/overview- Testing guidetruenas://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):
How It Works
The server scans the middleware repository for all CLAUDE.md files
Each file is processed and categorized based on its location
Content is intelligently summarized to reduce context size
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
Run Specific Test File
Run with Coverage
Running Middleware Tests
The server includes a tool for running TrueNAS middleware tests. Use the run_middleware_tests.sh script: