No2SQL 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package No2SQL --version 1.0.1
                    
NuGet\Install-Package No2SQL -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="No2SQL" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="No2SQL" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="No2SQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add No2SQL --version 1.0.1
                    
#r "nuget: No2SQL, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package No2SQL@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=No2SQL&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=No2SQL&version=1.0.1
                    
Install as a Cake Tool

No2SQL MCP Server

No2SQL helps you analyze MongoDB databases and generate SQL-friendly outputs:

  • inferred relationships,
  • SQL schema scripts,
  • SQL INSERT seed statements,
  • ER diagrams in Mermaid, PlantUML, and GraphViz DOT.

Install and Configure

MongoDB connection

Set MongoDB connection string using either:

  1. NO2SQL_MONGO environment variable (recommended)
  2. ConnectionStrings:MongoDb in No2SQL/appsettings.json

Example format:

mongodb+srv://<username>:<password>@<cluster-host>/<database>?retryWrites=true&w=majority

Use from NuGet in VS Code

Create .vscode/mcp.json:

{
  "servers": {
    "No2SQL": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "No2SQL",
        "--version",
        "1.0.0",
        "--yes"
      ]
    }
  }
}

Use from source during development

{
  "servers": {
    "No2SQL": {
      "type": "stdio",
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "No2SQL"
      ]
    }
  }
}

Available MCP Tools

  • TestConnectivity
  • ListDatabases
  • ListInferredRelationships
  • CompareIdFieldsToIds
  • GenerateSqlSchema
  • GenerateSqlSchemaAdvanced
  • GenerateSeedersForCollection
  • GenerateErdMermaid
  • GenerateErdPlantUml
  • GenerateErdDot

Example Copilot Prompts

  • "Use No2SQL to list my databases."
  • "Infer relationships for database mydb."
  • "Generate SQL schema for mydb."
  • "Generate Mermaid ERD for mydb with source sql."
  • "Generate SQL seeders for collection orders in mydb."

Security Guardrails

The server validates tool inputs and supports policy-based controls.

Environment variables:

  • NO2SQL_ALLOWED_DATABASES: Optional comma-separated allowlist.
  • NO2SQL_BLOCK_SYSTEM_DATABASES: Defaults to true; blocks admin, config, local.

Validation covers:

  • databaseName
  • collectionName
  • source values (sql, mongo, auto)
  • override fields (fromCollection, fromField, toCollection, toField)
  • prompt-injection marker patterns

Recommended baseline:

  1. Set a strict NO2SQL_ALLOWED_DATABASES allowlist.
  2. Keep NO2SQL_BLOCK_SYSTEM_DATABASES=true.

Build and Publish

Pack:

dotnet pack -c Release

Publish:

dotnet nuget push bin/Release/*.nupkg --api-key <your-api-key> --source https://api.nuget.org/v3/index.json

References

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 225 6/14/2026
1.0.2 219 6/8/2026
1.0.1 120 6/6/2026
1.0.0 237 5/26/2026
0.1.0 261 5/4/2026