MCP Server 2.0 (#452)

* MCP Server 2.0

- Updated application version from 2.23.14 to 2.24.0 in package.json.
- MCP Server improved with new features
- Migrated functionality from Dev Tools to MCP Server
- Improved getMonitoringProvider not to crash application when misconfigured
This commit is contained in:
Giancarlo Buomprisco
2026-02-11 20:42:01 +01:00
committed by GitHub
parent 059408a70a
commit f3ac595d06
123 changed files with 17803 additions and 5265 deletions

View File

@@ -0,0 +1,32 @@
'use server';
import { relative } from 'path';
import { DatabaseTool } from '@kit/mcp-server/database';
export async function getTableDetailsAction(
tableName: string,
schema = 'public',
) {
try {
DatabaseTool.ROOT_PATH = relative(process.cwd(), '../..');
console.log('Fetching table info for:', { tableName, schema });
const tableInfo = await DatabaseTool.getTableInfo(schema, tableName);
console.log('Successfully fetched table info:', tableInfo);
return {
success: true,
data: tableInfo,
};
} catch (error) {
console.error('Error fetching table info:', error);
return {
success: false,
error: `Failed to fetch table information: ${(error as Error).message}`,
};
}
}