Skip to content

Conversation

@robalexclark
Copy link

@robalexclark robalexclark commented Aug 23, 2025

Summary

Adds an MCP server for Microsoft SQL Server. Executes T-SQL and inventories tables via a provided connection string. Uses stdio transport. Validates connectivity on startup and supports graceful shutdown.

Features
T-SQL execution tool with keyword guard (SELECT, WITH, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, EXEC, etc.)
SELECT/CTE returns formatted tabular output with headers and dynamic column widths
Non-SELECT returns rows affected
Per-cell fallback for spatial/UDT types when Microsoft.SqlServer.Types is unavailable, with conversion hints
Table listing across all accessible non-system databases, with optional allowlist via DatabaseList
Single connection factory with async open and health check
Console logging at Trace level and structured logs
MCP server hosting via ModelContextProtocol.Server with stdio transport

Requirements
Environment variables:
MSSQL_CONNECTION_STRING (required)
DatabaseList (optional, comma-separated)

Dependencies:
Microsoft.Data.SqlClient 6.1.1
Microsoft.Extensions.Hosting 9.0.8
ModelContextProtocol 0.3.0-preview.4

Runtime:
.NET 10 SDK
Network access to the target SQL Server

Summary

Adds an MCP server that exposes a single tool to fetch YouTube transcripts via YoutubeExplode. Uses stdio transport. Logs to console at Trace level and supports graceful shutdown.

Features

  • Tool: RetrieveYoutubeTranscript(url) returns the transcript for a YouTube URL
  • Language selection: tries en, then falls back to the first available caption track
  • Output formats: plain text by default; SRT supported by code path
  • SRT rendering with proper indices and HH:MM:SS,mmm timing
  • Text rendering flattens line breaks and trims whitespace
  • Clear errors when no captions exist or URL is invalid
  • Structured console logging and Trace verbosity
  • MCP hosting via ModelContextProtocol.Server with stdio transport
  • Graceful Ctrl+C handling with CancellationToken

Requirements
Environment variables:

  • None

Dependencies:

  • YoutubeExplode 6.5.4
  • Microsoft.Extensions.Hosting 9.0.8
  • ModelContextProtocol 0.3.0-preview.4

Runtime:

  • .NET 9 SDK
  • Network access to YouTube captions endpoints

@robalexclark
Copy link
Author

Sorry - I added 2 mcp servers in one PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant