Omnibase MCP Server for AI Agents

0.1.30 · active · verified Wed Apr 22

Omnibase-MCP (Multi-Agent Communication Protocol) is a server designed to provide universal database access for AI agents. It acts as a central control plane, enabling agents to interact with various SQL databases such as PostgreSQL, MySQL, and SQLite. The package, currently in version 0.1.30, is under rapid and active development with frequent minor releases, often multiple times a month, indicating a project in its early, evolving stages. Key differentiators include a dynamic driver plugin architecture, comprehensive CLI tools for lifecycle management (e.g., upgrade, status monitoring), and support for user-defined custom tools. Its core purpose is to abstract database-specific complexities, allowing AI agents to perform complex data queries and management tasks through a unified interface.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically start the Omnibase MCP server with a basic SQLite database configuration, showing typical server setup and graceful shutdown handling.

import { startMcp } from 'omnibase-mcp';
import path from 'path';

async function main() {
  // Example configuration for the MCP server. Real applications would fetch this securely.
  const config = {
    // Ensure your database drivers are available at runtime or via plugins.
    databases: [
      {
        name: 'my_app_db',
        type: 'sqlite',
        connectionString: 'sqlite://' + path.join(process.cwd(), 'my_app.sqlite'),
      },
      // Add more database configurations here (e.g., PostgreSQL, MySQL)
    ],
    // The port on which the MCP server will listen.
    port: process.env.MCP_SERVER_PORT ? parseInt(process.env.MCP_SERVER_PORT) : 8000,
    // Enable or disable specific features, e.g., custom tools.
    enableCustomTools: true,
    logLevel: 'info'
  };

  try {
    console.log(`Starting Omnibase MCP server on port ${config.port}...`);
    // Start the MCP server programmatically
    const server = await startMcp(config);
    console.log('Omnibase MCP server started successfully.');

    // Keep the process alive, or set up graceful shutdown handlers
    process.on('SIGINT', async () => {
      console.log('Stopping Omnibase MCP server...');
      // Assuming server.close() exists for graceful shutdown
      // await server.close(); 
      console.log('Omnibase MCP server stopped.');
      process.exit(0);
    });
    process.on('SIGTERM', async () => {
      console.log('Stopping Omnibase MCP server...');
      // await server.close();
      console.log('Omnibase MCP server stopped.');
      process.exit(0);
    });

  } catch (error) {
    console.error('Failed to start Omnibase MCP server:', error);
    process.exit(1);
  }
}

main();

view raw JSON →