Skip to main content
Glama

MCP Server Starter

API Endpoint MCP Server

Tools existed inside this MCP Server (As 10 September 2025):

  1. SQL tools for different databases (Postgres, MySQL, SQL, Oracle)

SQL tools for different databases (Postgres, MySQL, SQL, Oracle)

After you deploying the MCP Server on the website, you will get a particular link called Base URL. With that link, you be able to access some information through the endpoints that is specified. If your Base URL such as http://localhost:8787, then you can use the endpoints as http://localhost:8787/health. You can test the endpoints using Postman as well.

This MCP Server does not manage multiple databases of the same type. Instead, it provides connectivity to multiple database system (Postgres, MySQL, MSSQL, Oracle). Each system is configured independently via environment variables, and queries are executed againts the selected DB.

Note: We can extend the current MCP Server to support not only multiple database types but also multiple instances of the same database type if needed.

Below are the endpoints under the SQL Tools:

MethodEndpointDescription
GET/dbsLists all configured databases.
GET/healthHealth check endpoint (server status).
POST/sql/queryExecutes an SQL query against a database.

To specify what should be sent to the /sql/query, you have to send in JSON form with 2 information:

  1. "db" : To specify what kind of database that we wanted it to be connected to.
    • "pg" : PostgreSQL
    • "mysql" : MySQL
    • "mssql" : Microsoft SQL
    • "oracle": Oracle
  2. "sql" : SQL Queries based on the database used.

Below is the exact format:

{ "db": "mysql", // Database Type "sql": "SELECT * FROM orders LIMIT 10;" // SQL queries based on db type }

Database Used and Data

In this project, multiple relational database system were tested to ensure compatibility with the MCP Server. The database used are:

  • PostgreSQL
  • MySQL
  • Microsoft SQL Server (MSSQL)
  • Oracle Database

Each database contains two custom tables with a few sample rows of data.

  • The tables are designed with different themes per database (e.g., hospital system, university system, employee system, etc.) so that outputs can be easily distinguished during testing.
  • This prevents confusion when retrieving results and makes it clear which database the data originated from.

1) POSTGRESQL DATABASE (Library System)

TABLE NAME: books

book_idtitleauthorgenreyear_published
1The Silent ForestJohn RiversFiction2015
2Data Science SimplifiedAlice TanEducation2020
2Demon Slayer: Kimetsu no YaibaKoyoharu GotougeFiction2016

TABLE NAME: members

member_idnameemailjoin_dateactive
101Sarah Limsarah@example.com2021-03-10true
102Ahmad Zakiahmad.zaki@example.com2022-07-22false
103Megan Raajmegan.raaj@example.com2025-09-10false

Testing Using Postman to retrieve information:

// Get all table { "db": "pg", "sql": "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' ORDER BY table_name" } // List all tables with columns + contents { "db": "pg", "sql": "SELECT c.table_name, c.column_name, c.data_type FROM information_schema.columns c JOIN information_schema.tables t ON c.table_name = t.table_name WHERE t.table_schema = 'public' AND t.table_type = 'BASE TABLE' ORDER BY c.table_name, c.ordinal_position;" } // List contents of a specific table with its columns - "SELECT * FROM <table-name> LIMIT 10;" { "db": "pg", "sql": "SELECT * FROM books LIMIT 10;" }

2) MySQL Database (E-commerce Store)

TABLE NAME: products

product_idnamecategorypricestock
501Laptop X100Electronics3500.0015
502Running ShoesSports280.0050
503Office TableFurniture200.0010

TABLE NAME: orders

order_idproduct_idcustomer_namequantityorder_date
9001501Daniel Wong12024-12-15
9002502Mei Li22025-01-20
9003503Syahid Akbar22025-09-10

Testing Using Postman to retrieve information:

// Get all table { "db": "mysql", "sql": "SELECT TABLE_NAME FROM information_schema.tables WHERE TABLE_SCHEMA = DATABASE() AND TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME" } // List all tables with columns + contents { "db": "mysql", "sql": "SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME, ORDINAL_POSITION;" } // List contents of a specific table with its columns - "SELECT * FROM <table-name> LIMIT 10;" { "db": "mysql", "sql": "SELECT * FROM orders LIMIT 10;" }

3) MSSQL Database (Hospital Management)

TABLE NAME: patients

patient_idfull_namedobblood_typeadmitted
P001Kevin Smith1990-05-21O+2025-02-01
P002Aisha Rahman1985-11-03A-2025-02-07
P003Ariff Hafizal2001-08-06AB2025-09-01

TABLE NAME: doctors

doctor_idnamespecialtyphoneavailable
D001Dr. MichaelCardiology012-3456789Yes
D002Dr. Nur FarahPediatrics019-8765432No
D003Dr. Abd. RahmanSurgeon011-78150955Yes

Testing Using Postman to retrieve information:

// Get all table { "db": "mssql", "sql": "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAME" } // List all tables with columns + contents { "db": "mssql", "sql": "SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS ORDER BY TABLE_NAME, ORDINAL_POSITION;" } // List contents of a specific table with its columns - "SELECT TOP 10 * FROM <table-name>;" { "db": "mssql", "sql": "SELECT TOP 10 * FROM Doctors;" }

4) Oracle Database (University System)

TABLE NAME: COURSES

course_idcourse_namedepartmentcreditssemester
CSE101Intro to Computer ScienceComputing4Fall
BUS201Marketing BasicsBusiness3Spring
ENG301ThermodynamicsEngineering4Fall

TABLE NAME: STUDENTS

student_idnamemajorgpaenrollment_year
S1001Raj KumarComputer Science3.82021
S1002Emily TanBusiness Administration3.52020
S1003Ahmad AliMechanical Engineering3.22019

Testing Using Postman to retrieve information:

// Get all table { "db": "oracle", "sql": "SELECT DISTINCT table_name FROM user_tab_columns WHERE table_name NOT LIKE 'ROLLING$%' AND table_name NOT LIKE 'SCHEDULER_%' -- AND UPPER(table_name) NOT IN (<your excludedOracleTables uppercased>) ORDER BY table_name" } // List all tables with columns + contents { "db": "oracle", "sql": "SELECT table_name, column_name, data_type FROM user_tab_columns ORDER BY table_name, column_id" } // List contents of a specific table with its columns { "db": "oracle", "sql": "SELECT * FROM COURSES" }

Database Environments

The MCP Server uses environment variables for database connections.

  • Not all environments are required.
  • If an environment for a database type is missing, the server will still run (It can be used for all database or just use for your desired database).
  • This project do supports SQLite but it will not be focused on since SQLite is usually for the local testing.
VariableUsage / DescriptionExample Value
MYSQL_HOSTHostname or IP address of the MySQL server127.0.0.1
MYSQL_PORTPort number for the MySQL server (default: 3306)3306
MYSQL_USERUsername to authenticate with the MySQL serverroot
MYSQL_PASSWORDPassword for the MySQL usermypassword
MYSQL_DBName of the MySQL database to connect totest_db
PG_HOSTHostname or IP address of the PostgreSQL server127.0.0.1
PG_PORTPort number for the PostgreSQL server (default: 5432)5432
PG_USERUsername to authenticate with the PostgreSQL serverpostgres
PG_PASSWORDPassword for the PostgreSQL usersecret123
PG_DBName of the PostgreSQL database to connect tosampledb
MSSQL_HOSTHostname or IP address of the Microsoft SQL Server127.0.0.1
MSSQL_PORTPort number for the Microsoft SQL Server (default: 1433)1433
MSSQL_USERUsername to authenticate with the Microsoft SQL Serversa
MSSQL_PASSWORDPassword for the Microsoft SQL Server userP@ssw0rd!
MSSQL_DBName of the Microsoft SQL Server database to connect tohospital_db
ORACLE_CONNECT_STRINGOracle EZConnect string in the format host:port/service_name127.0.0.1:1521/XEPDB1
ORACLE_USERUsername to authenticate with the Oracle databasesystem
ORACLE_PASSWORDPassword for the Oracle useroracle123

Deployment to Azure Web App

Delete the existing node_modules and installs dependencies exactly as listed in your package-lock.json (ci = clean install):

npm ci

Runs the build script in your package.json under "scripts":

npm run build

Delete the existing node_modules and installs dependencies exactly as listed in your package-lock.json (ci = clean install):

npm ci

Runs the build script in your package.json under "scripts":

npm run build

Remove of the directory if exist:

if exist srcpkg rmdir /s /q srcpkg

Make directory to be zipped:

mkdir srcpkg

Copy project sources and assets Oryx needs. If you read any templates at runtime, include them too. DO NOT copy node_modules (Oryx will install on Linux):

xcopy src srcpkg\src\ /E /I /Y copy package.json srcpkg\ copy package-lock.json srcpkg\ >NUL 2>&1 copy tsconfig.json srcpkg\ >NUL 2>&1 copy dbs.yaml srcpkg\ >NUL 2>&1 if exist src\tools\sql\templates xcopy src\tools\sql\templates srcpkg\src\tools\sql\templates\ /E /I /Y

Build a ZIP whose root is the content (not a nested folder):

if exist artifact-src.zip del /f /q artifact-src.zip tar -a -c -f artifact-src.zip -C srcpkg .

Azure Login:

az login

Set runtime to Node 20 LTS:

az webapp config set -g <resource-group> -n <web-app-name> --linux-fx-version "NODE|20-lts"

Enable build automation (Oryx):

az webapp config appsettings set -g <resource-group> -n <web-app-name> --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true NPM_CONFIG_PRODUCTION=false

Deploy to Azure:

az webapp deploy -g <resource-group> -n <web-app-name> --src-path artifact-src.zip

Enable Logs and Monitor to view (In another cmd):

az webapp log config -g <resource-group> -n <web-app-name> --application-logging filesystem --docker-container-logging filesystem --level information az webapp log tail -g <resource-group> -n <web-app-name>

Find the outbound IP - to put in the SQL Server if your server is inside Azure

az webapp show -g <resource-group> -n <web-app-name> --query outboundIpAddresses -o tsv
Deploy Server
-
security - not tested
F
license - not found
-
quality - not tested

A starter template for building MCP servers with SQLite database integration. Provides a foundation with SQL query tools, database seeding capabilities, and a development client for testing.

  1. Tools existed inside this MCP Server (As 10 September 2025):
    1. SQL tools for different databases (Postgres, MySQL, SQL, Oracle)
      1. Database Used and Data
      2. Database Environments
      3. Deployment to Azure Web App

    Related MCP Servers

    • A
      security
      A
      license
      A
      quality
      A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
      Last updated -
      68,079
      MIT License
    • -
      security
      F
      license
      -
      quality
      An MCP server that provides safe, read-only access to SQLite databases through MCP. This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.
      Last updated -
      84
    • -
      security
      A
      license
      -
      quality
      A template project for building custom MCP servers that enables direct access to PostgreSQL databases, allowing SQL query execution and schema information retrieval through the Model Context Protocol.
      Last updated -
      31
      MIT License
      • Apple
      • Linux
    • -
      security
      A
      license
      -
      quality
      A lightweight MCP server that provides read-only access to SQLite databases, allowing users to execute SELECT queries, list tables, and describe table schemas.
      Last updated -
      MIT License

    View all related MCP servers

    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/Muhammad-Idzhans/mcp-server'

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