a37630aeac
A Model Context Protocol (MCP) server for Paperless-ngx document management. Features: - Full CRUD operations for documents, tags, correspondents, document types, storage paths, and custom fields - Document upload with retry logic (base64 and file path) - Bulk operations with dry-run support - Search with full-text and metadata filtering - Pagination support across all list operations - Proper error handling with McpResponse wrapper Built with .NET 10 and the official MCP SDK. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
770 B
Docker
33 lines
770 B
Docker
# Build stage
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview AS build
|
|
WORKDIR /src
|
|
|
|
# Copy project file and restore dependencies
|
|
COPY PaperlessMCP.csproj .
|
|
RUN dotnet restore
|
|
|
|
# Copy source code and build
|
|
COPY . .
|
|
RUN dotnet publish -c Release -o /app/publish
|
|
|
|
# Runtime stage
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview AS runtime
|
|
WORKDIR /app
|
|
|
|
# Copy published application
|
|
COPY --from=build /app/publish .
|
|
|
|
# Set environment variables
|
|
ENV ASPNETCORE_URLS=http://+:5000
|
|
ENV MCP_PORT=5000
|
|
|
|
# Expose port for HTTP transport
|
|
EXPOSE 5000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:5000/mcp || exit 1
|
|
|
|
# Run the application (HTTP mode by default)
|
|
ENTRYPOINT ["dotnet", "PaperlessMCP.dll"]
|