Skip to main content
Glama
aletafuro

AI-Orchestrator-MCP

by aletafuro

AI-Orchestrator-MCP

An AI Database Assistant built with OpenAI Agents SDK and the Model Context Protocol (MCP).

This project demonstrates how to build an AI Agent capable of autonomously interacting with heterogeneous databases through modular MCP tools.

Currently supported databases:

  • MySQL

  • MongoDB

  • Google BigQuery


Features

  • OpenAI Agents SDK

  • FastMCP Server

  • MCP Client

  • AI Database Assistant

  • Automatic Tool Discovery

  • SQLiteSession conversation memory

  • OpenAI Tracing

  • MySQL integration

  • MongoDB integration

  • Google BigQuery integration

  • Modular architecture

  • Easily extensible


Architecture

High-level overview

                          User
                            │
                            ▼
                 Database Assistant
                  (OpenAI Agents SDK)
                            │
                            ▼
                     SQLiteSession
                            │
                            ▼
                       MCP Client
                            │
                            ▼
                       MCP Server
                            │
          ┌─────────────────┼─────────────────┐
          ▼                 ▼                 ▼

     MySQL Tools      MongoDB Tools     BigQuery Tools

          │                 │                 │
          ▼                 ▼                 ▼

       MySQL            MongoDB          BigQuery

Architecture Diagram

Related MCP server: Database MCP Server

Architecture

Technologies

  • Python 3.13

  • OpenAI Agents SDK

  • FastMCP

  • MCP (Model Context Protocol)

  • PyMySQL

  • PyMongo

  • Google Cloud BigQuery

  • python-dotenv

  • SQLiteSession


Project Structure

AI-Orchestrator-MCP/
│
├── config/
│   ├── config.py
│   └── .env.example
│
├── db/
│   ├── mysql.py
│   ├── mongodb.py
│   └── bigquery.py
│
├── tools/
│   ├── mysql_tools.py
│   ├── mongodb_tools.py
│   └── bigquery_tools.py
│
├── tests/
├── models/
├── logs/
│
├── mcp_client.py
├── mcp_server.py
├── requirements.txt
└── README.md

Supported Databases

MySQL

  • Execute SQL queries

  • List databases

  • List tables

  • Search tables

  • Describe tables

  • List columns

  • Show CREATE TABLE

  • Count rows

  • List views

  • Show indexes

  • Show foreign keys

  • Database statistics

  • Explain query

MongoDB

  • List databases

  • List collections

  • Count documents

  • Find documents

  • Sample documents

Google BigQuery

  • List datasets

  • List tables

  • Read table schema

  • Execute SQL queries


How It Works

The Agent never accesses databases directly.

Workflow:

  1. The user submits a request.

  2. The Agent reasons about the request.

  3. The Agent selects the appropriate MCP tool.

  4. The MCP Client invokes the MCP Server.

  5. The selected tool queries the database.

  6. Results are returned to the Agent.

  7. The Agent generates the final response.


Example Conversation

User

How many collections are available in the MongoDB database "dating"?

Assistant

The database contains 24 collections including:

- users
- chats
- events
- email_logs
...

User

Describe the MySQL table users.

Assistant

The table contains the following columns:

- id
- username
- email
- created_date
...

User

List the available BigQuery datasets.

Assistant

Available datasets:

- analytics
- marketing
- reporting
...

Installation

Clone the repository:

git clone https://github.com/yourusername/AI-Orchestrator-MCP.git

Create a virtual environment:

python -m venv .venv

Activate it:

Windows

.venv\Scripts\activate

Linux / macOS

source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Configuration

Create a .env file starting from .env.example.

Example:

DB_HOST=
DB_PORT=3306
DB_NAME=
DB_USER=
DB_PASSWORD=

MONGO_URI_ATLAS=
MONGO_URI_LOCAL=

BIGQUERY_CREDENTIALS=C:\path\credentials.json

Running the Project

Run the application:

python mcp_client.py

The client automatically starts the MCP Server and initializes the Database Assistant.

To exit:

exit

or

quit

Adding a New Database

  1. Add credentials to .env.

  2. Create a new manager in db/.

  3. Implement the database methods.

  4. Create MCP tools in tools/.

  5. Register the tools in mcp_server.py.

  6. Update the Agent instructions if needed.

  7. Test the manager.

  8. Test the tools.

  9. Test the Agent.


Design Principles

  • Modular architecture

  • Separation of concerns

  • Independent tools

  • Reusable components

  • Extensible design

  • Clean code


Roadmap

  • PostgreSQL support

  • Redis integration

  • Snowflake integration

  • Vector databases

  • Automatic schema exploration

  • Query planning

  • Multi-Agent workflows

  • RAG integration


License

MIT License


About

This project was created as a personal AI Engineering project to explore:

  • OpenAI Agents SDK

  • Model Context Protocol (MCP)

  • AI Database Assistants

  • Tool Calling

  • Multi-database orchestration

  • Agentic AI

The architecture has been designed to be modular, extensible and easily adaptable to additional databases and external services.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    C
    maintenance
    Enables LLMs and agents to interact with relational databases (SQL Server, MySQL, PostgreSQL) through MCP tools. Supports executing queries, inserting records, listing tables, and exposing database schemas with secure credential management.
    Last updated
  • A
    license
    -
    quality
    D
    maintenance
    Provides universal database operations for AI assistants through MCP, supporting 40+ databases including PostgreSQL, MySQL, MongoDB, Redis, and SQLite with built-in introspection tools for schema exploration.
    Last updated
    34
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables natural language interaction with MySQL databases through MCP, supporting SQL execution, schema exploration, and database management via tools, resources, and prompts.
    Last updated
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

  • GibsonAI MCP server: manage your databases with natural language

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aletafuro/AI-Orchestrator-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server