Custom-MCP-Server

lucianocrossaniell/Custom-MCP-Server

3.2

If you are the rightful owner of Custom-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Filesystem Assistant with Web UI is a local AI assistant designed to interact with files in a workspace using a modern web interface and GPT-4o for file analysis and queries.

Tools
  1. filesystem

    MCP-compatible Filesystem Server

MCP Filesystem Assistant – Azure Functions Backend

This project is an AI-powered file assistant with an Azure serverless backend.
It supports secure per-user storage and retrieval of files, ready for integration with a React frontend.


Features

āœ… Upload files to Azure Blob Storage
āœ… List files stored for each user
āœ… Download files via secure SAS URLs
āœ… Delete files and metadata
āœ… Per-user data isolation (userId folders and PartitionKeys)
āœ… Fallback testuser mode for local/Postman testing
āœ… Ready for React frontend with MSAL authentication


Project Structure

backend/
ā”œā”€ā”€ Upload/
│   └── index.js         # Upload file endpoint
ā”œā”€ā”€ Download/
│   └── index.js         # Generate SAS URL
ā”œā”€ā”€ Delete/
│   └── index.js         # Delete file and metadata
ā”œā”€ā”€ List/
│   └── index.js         # List metadata
ā”œā”€ā”€ shared/
│   ā”œā”€ā”€ auth.js          # Parses user claims (oid/sub)
│   └── storage.js       # Table Storage helpers

Prerequisites

  • Node.js v18+
  • Azure Subscription
  • Azure Function App deployed with:
    • Blob Storage container (userfiles)
    • Table Storage table (FileMetadata)
  • App Registration in Azure AD (for authentication)

Installation & Deployment

  1. Clone this repo.

  2. Install dependencies:

    npm install
    
  3. Create the following Application Settings in Azure:

    • AzureWebJobsStorage
    • AZURE_BLOB_CONTAINER_NAME
    • AZURE_TABLE_NAME
  4. Deploy to Azure Functions (e.g., using VS Code Azure Functions extension).


Testing with Postman

āœ… All endpoints can be tested without authentication using fallback testuser mode:

POST   /api/Upload
GET    /api/List
GET    /api/Download?filename=<name>
GET    /api/Delete?filename=<name>

Fallback Logic: If no valid claims are detected:

const userId = "testuser";

This allows you to test without needing tokens.


How It Works

  • Files are stored in:
    userfiles/<userId>/<filename>
    
  • Metadata stored in Table Storage with:
    PartitionKey = <userId>
    RowKey = <filename>
    
  • When your frontend is ready and you authenticate users via Azure AD:
    • The getUserFromHeaders() function will parse x-ms-client-principal.
    • Files will be isolated per user automatically.

Next Steps

āœ… Build React frontend (Phase 1.6)

  • Add MSAL.js login flow
  • Display per-user file lists
  • Integrate Upload/Download/Delete UI

āœ… Re-enable authentication in Azure Portal before production:

  • Turn "Require Authentication" back on
  • Remove fallback testuser logic if desired

āœ… Add Application Insights for monitoring


License

MIT License