No2SQL 1.0.0
{ "inputs": [ { "type": "promptString", "id": "NO2SQL_MONGO", "description": "MongoDB connection string used by the No2SQL MCP server." } ], "servers": { "no2sql": { "type": "stdio", "command": "dnx", "args": ["no2sql@1.0.0", "--yes"], "env": { "NO2SQL_MONGO": "${input:NO2SQL_MONGO}" } } } }
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's
.vscode/mcp.json settings file.
dotnet tool install --global No2SQL --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local No2SQL --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=No2SQL&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package No2SQL --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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:
NO2SQL_MONGOenvironment variable (recommended)ConnectionStrings:MongoDbinNo2SQL/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
TestConnectivityListDatabasesListInferredRelationshipsCompareIdFieldsToIdsGenerateSqlSchemaGenerateSqlSchemaAdvancedGenerateSeedersForCollectionGenerateErdMermaidGenerateErdPlantUmlGenerateErdDot
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 totrue; blocksadmin,config,local.
Validation covers:
databaseNamecollectionNamesourcevalues (sql,mongo,auto)- override fields (
fromCollection,fromField,toCollection,toField) - prompt-injection marker patterns
Recommended baseline:
- Set a strict
NO2SQL_ALLOWED_DATABASESallowlist. - 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 | Versions 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.
This package has no dependencies.
Initial stable release of the No2SQL MCP server package.