@forgeframework/mcp-db
v2.0.0
Published
MCP server for database access.
Maintainers
Readme
@forgeframework/mcp-db
MCP server for database access.
Part of the Forge Framework — a TypeScript framework for backend microservices and web applications.
Installation
npm install @forgeframework/mcp-dbUsage
import { McpDbServer } from '@forgeframework/mcp-db';
const server = new McpDbServer({
connections: {
primary: {
name: 'primary',
type: 'postgres',
host: 'localhost',
port: 5432,
database: 'myapp',
username: 'reader',
password: process.env.DB_PASSWORD!,
ssl: true,
poolSize: 5,
},
analytics: {
name: 'analytics',
type: 'mysql',
host: 'analytics-db.internal',
port: 3306,
database: 'analytics',
username: 'readonly',
password: process.env.ANALYTICS_DB_PASSWORD!,
},
},
readOnly: true,
maxResultRows: 5000,
queryTimeout: 15000,
audit: {
enabled: true,
logQueries: true,
correlationId: true,
maxLogEntries: 10000,
},
});
await server.start({ type: 'stdio' });Documentation
Full API reference and guides: https://carbonforge.io/framework/docs/mcp/mcp-db
(Documentation site launching soon.)
License
MIT © Carbon Forge
