Package icon

Noundry.MCP.Server 2.0.0

by Noundry

Noundry MCP Documentation Server

A Model Context Protocol (MCP) server that exposes Noundry platform documentation to LLM clients like Claude Code and Codex CLI.

Features

  • MCP Protocol Support: HTTP transport for universal LLM client compatibility
  • Markdown Processing: Loads and parses markdown files with YAML frontmatter
  • Full-Text Search: Intelligent search with relevance ranking
  • Auto-Reload: Automatically detects and reloads documentation when files change (2-second debounce)
  • API Key Authentication: Secure access control via Authorization header
  • Rich Metadata: Supports titles, descriptions, tags, and more
  • HTML Rendering: Converts markdown to HTML using Markdig with advanced extensions

Architecture

NoundryMCP/
├── Models/
│   └── DocMetadata.cs          # Document models
├── Services/
│   └── NoundryDocsService.cs   # Core documentation service
├── Tools/
│   └── NoundryDocsTools.cs     # MCP tool implementations
├── Middleware/
│   └── ApiKeyAuthenticationMiddleware.cs
├── Program.cs                  # Application entry point
└── appsettings.json           # Configuration

Prerequisites

  • .NET 9.0 SDK
  • Documentation files in C:\Work\Noundry\src\master-docs (or configure custom path)

Installation

1. Restore Dependencies

cd C:\Work\Noundry\src\NoundryMCP
dotnet restore

2. Configure Settings

Edit appsettings.json:

{
  "NoundryDocs": {
    "Path": "C:\\Work\\Noundry\\src\\master-docs",
    "EnableFileWatcher": true
  },
  "ApiKeys": [
    "your-secure-api-key-here"
  ]
}

Configuration Options:

  • Path: Directory containing markdown documentation files
  • EnableFileWatcher: Auto-reload when files change (default: true, set to false to disable)

For development (no auth), use appsettings.Development.json with empty ApiKeys array.

3. Build and Run

dotnet build
dotnet run

The server will start on:

  • HTTP: http://localhost:5000
  • HTTPS: https://localhost:5001

Usage

Claude Code Integration

Add to your Claude Code MCP configuration:

claude mcp add --transport http noundry-docs https://mcp.noundry.ai/mcp

Or manually edit your MCP configuration file:

{
  "mcpServers": {
    "noundry-docs": {
      "type": "http",
      "url": "https://mcp.noundry.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${NOUNDRY_API_KEY}"
      }
    }
  }
}

Environment Variables

Set your API key:

# Windows
set NOUNDRY_API_KEY=your-api-key-here

# Linux/Mac
export NOUNDRY_API_KEY=your-api-key-here

Available MCP Tools

1. ListDocs

List all available documentation files with optional filtering.

Parameters:

  • filter (optional): Keyword to filter by title, description, tags, or filename

Example:

ListDocs filter="api"

Response:

{
  "totalCount": 5,
  "filter": "api",
  "docs": [
    {
      "fileName": "api-reference",
      "title": "API Reference",
      "description": "Complete API documentation",
      "tags": ["api", "reference"],
      "relativePath": "api-reference.md",
      "lastModified": "2025-10-04 10:30:00"
    }
  ]
}

2. GetDoc

Retrieve the full content of a specific document.

Parameters:

  • docName (required): Filename without .md extension

Example:

GetDoc docName="getting-started"

Response:

{
  "metadata": {
    "fileName": "getting-started",
    "title": "Getting Started",
    "description": "Introduction to Noundry",
    "tags": ["intro", "setup"],
    "relativePath": "getting-started.md",
    "lastModified": "2025-10-04 10:30:00"
  },
  "content": {
    "markdown": "# Getting Started\n\n...",
    "html": "<h1>Getting Started</h1>..."
  }
}

3. SearchDocs

Search documentation with relevance ranking.

Parameters:

  • query (required): Search query string
  • maxResults (optional): Maximum results (default: 5, max: 20)

Example:

SearchDocs query="authentication" maxResults="10"

Response:

{
  "query": "authentication",
  "resultCount": 3,
  "results": [
    {
      "fileName": "auth-guide",
      "title": "Authentication Guide",
      "description": "How to authenticate",
      "tags": ["auth", "security"],
      "relativePath": "auth-guide.md",
      "snippet": "...authentication process...",
      "relevance": 150.5,
      "lastModified": "2025-10-04 10:30:00"
    }
  ]
}

4. ReloadDocs

Manually reload all documentation files from disk.

Note: With auto-reload enabled (default), files are automatically detected and reloaded within 2 seconds of changes. This tool is useful when:

  • Auto-reload is disabled (EnableFileWatcher: false)
  • You want to force an immediate reload without waiting for the debounce timer

Example:

ReloadDocs

Response:

{
  "success": true,
  "message": "Documentation reloaded successfully",
  "documentCount": 42
}

5. GetStats

Get statistics about the documentation collection.

Example:

GetStats

Response:

{
  "totalDocuments": 42,
  "totalTags": 15,
  "mostCommonTags": [
    { "tag": "api", "count": 12 },
    { "tag": "guide", "count": 8 }
  ],
  "recentlyModified": [...]
}

Markdown Frontmatter Format

Documents should include YAML frontmatter:

---
title: Document Title
description: Brief description of the document
tags: tag1, tag2, tag3
---

# Document Content

Your markdown content here...

If no frontmatter is provided, the first H1 heading will be used as the title.

Testing

Run the comprehensive test suite:

cd NoundryMCP.Tests
dotnet test

Test coverage includes:

  • Service Tests: Document loading, parsing, search, filtering
  • Tool Tests: MCP tool functionality and error handling
  • Integration Tests: Full API and authentication flows

API Endpoints

GET /

Server information and usage examples.

POST /mcp

MCP protocol endpoint for tool calls.

GET /health

Health check endpoint (no auth required).

Security

API Key Authentication

All MCP requests require an Authorization header:

Authorization: Bearer your-api-key-here

Or simply:

Authorization: your-api-key-here

Development Mode

When no API keys are configured in appsettings.json, authentication is disabled for local development.

Production Deployment

  1. Set strong API keys in configuration
  2. Use HTTPS (certificate required)
  3. Configure CORS policies as needed
  4. Consider rate limiting for production use

Deployment to mcp.noundry.ai

Prerequisites

  • Domain configured: mcp.noundry.ai
  • SSL certificate installed
  • IIS or reverse proxy configured

IIS Deployment

  1. Publish the application:
dotnet publish -c Release -o publish
  1. Create IIS site pointing to publish folder

  2. Configure application pool for .NET 9.0

  3. Update appsettings.json with production API keys

  4. Ensure documentation path is accessible

Docker Deployment

Create Dockerfile:

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY ["NoundryMCP.csproj", "."]
RUN dotnet restore
COPY . .
RUN dotnet build -c Release -o /app/build

FROM build AS publish
RUN dotnet publish -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "NoundryMCP.dll"]

Build and run:

docker build -t noundry-mcp .
docker run -d -p 80:80 -p 443:443 \
  -v C:\Work\Noundry\src\master-docs:/docs \
  -e NoundryDocs__Path=/docs \
  -e ApiKeys__0=your-api-key \
  noundry-mcp

Configuration Reference

appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "NoundryMCP": "Information"
    }
  },
  "AllowedHosts": "*",
  "NoundryDocs": {
    "Path": "C:\\Work\\Noundry\\src\\master-docs"
  },
  "ApiKeys": [
    "key1",
    "key2"
  ],
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://0.0.0.0:5000"
      },
      "Https": {
        "Url": "https://0.0.0.0:5001"
      }
    }
  }
}

Troubleshooting

"Docs path does not exist"

Ensure the path in appsettings.json points to a valid directory containing markdown files.

"Invalid API key"

Check that the Authorization header matches one of the keys in the ApiKeys array.

No documents loaded

  • Verify markdown files exist in the configured path
  • Check file permissions
  • Look for parsing errors in application logs

Port already in use

Change the port in appsettings.json under Kestrel:Endpoints.

Development

Project Structure

  • Models: Data transfer objects and metadata classes
  • Services: Business logic for document management
  • Tools: MCP tool implementations with attributes
  • Middleware: Authentication and request processing
  • Tests: NUnit test suite with mocks and integration tests

Adding New Tools

  1. Add method to NoundryDocsTools.cs
  2. Decorate with [McpServerTool] and [Description]
  3. Add parameters with descriptions
  4. Return JSON-serialized response
  5. Add corresponding tests

Example:

[McpServerTool]
[Description("Your tool description")]
public string YourTool(
    [Description("Parameter description")] string param)
{
    var result = _docsService.YourMethod(param);
    return JsonSerializer.Serialize(result, JsonOptions);
}

License

Proprietary - Noundry Platform

Support

For issues or questions, contact the Noundry development team.


Version: 1.0.0 Last Updated: 2025-10-04

.NET 9.0

No packages depend on Noundry.MCP.Server.

Version Downloads Last Updated
2.0.0 Current 0 10/6/2025

Info

Statistics

Total Downloads
0
Current Version Downloads
0

Authors

Noundry