Skip to main content
Glama
SirojWongpitakroj

MHTL Warehouse MCP Server

MHTL Warehouse MCP Server

An MCP server (TypeScript) that lets Claude query the local DuckDB warehouse in data/mock.duckdb — a mock motorcycle-loan warehouse with DMS (loan servicing) and LOS (loan origination) tables.

Ask Claude things like:

"Get the insights of the customer Noy Vongphachanh"

and it will look the customer up, pull their contracts, delinquency/NPL status, recent collection notes, and loan applications.

Tools exposed

Tool

What it does

list_tables

List all tables/views with row counts.

describe_table

Show columns + types for a table.

find_customer

Search customers by (partial) name or id → returns their oid.

customer_insights

The headline tool. Full profile for a customer: identity, contracts, outstanding/overdue balances, NPL flag, recent contact notes, loan applications.

query

Run an arbitrary read-only SELECT/WITH query. Auto-applies a LIMIT; blocks anything that writes.

The database is opened read-only, and the query tool rejects any non-SELECT statement and multi-statement input, so nothing can mutate the data.

Related MCP server: postgres-mcp

Setup

npm install
npm run build      # compiles src/ -> dist/

Connect it to Claude Desktop

  1. Build (npm run build).

  2. Copy claude_desktop_config.json from this folder to Claude Desktop's config location (create the folder/file if it doesn't exist):

    • Windows: %APPDATA%\Claude\claude_desktop_config.json (C:\Users\fookl\AppData\Roaming\Claude\claude_desktop_config.json)

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    If you already have other MCP servers configured, merge the mhtl-warehouse entry into your existing mcpServers object instead of overwriting the file.

  3. Fully quit and reopen Claude Desktop.

  4. In a new chat you should see the tools available (plug/tools icon). Try: "Get the insights of the customer Noy Vongphachanh."

  • dms_customer.oid (BIGINT) ← dms_contract.customer (the numeric id).

  • dms_contract.contractiddms_contact_note.contract / dms_contact_legal.contract.

  • LOS ↔ DMS customers share their last 5 id digits 1:1 (C500123L100123), used to attach loan applications.

Configuration

  • WAREHOUSE_DB_PATH — absolute path to the DuckDB file. If unset, the server defaults to ../data/mock.duckdb relative to dist/.

Project layout

src/index.ts   MCP server + tool definitions
src/db.ts      Read-only DuckDB connection + query/normalisation helpers
dist/          Compiled output (run this)
data/          mock.duckdb + parquet warehouse

Available Tools

5 tools
customer_insightsGet insights for a customerA

Given a customer name or id, return a consolidated insight profile: identity, all contracts, delinquency/NPL summary, outstanding & overdue balances, recent collection contact notes, and loan applications. This is the tool for requests like 'get the insights of the customer Max'.

ParametersJSON Schema
NameRequiredDescriptionDefault
customerYesCustomer name (full or partial), customer id (e.g. 'C500004'), or numeric oid.
notes_limitNoHow many recent contact notes to include (default 10).

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must fully disclose behavior. It enumerates the returned data but omits details like read-only nature, permissions, or performance implications. It adequately describes output components but lacks explicit behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loading the core purpose and listing returned data. The example at the end adds clarity without unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given two parameters and no output schema, the description sufficiently explains what the tool returns. It covers the main components but could be more precise about edge cases or default behavior for the notes_limit parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema describes both parameters fully, achieving 100% coverage. The description adds no additional meaning beyond the schema, so it meets the baseline without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: returning a consolidated insight profile for a customer, listing specific components (identity, contracts, etc.) and providing an example query. It distinguishes from siblings like find_customer, which likely returns basic info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a concrete example ('get the insights of the customer Max'), giving clear context for when to use this tool. However, it does not explicitly mention when not to use it or suggest alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_tableDescribe a tableA

Return the column names and data types for a given table or view. Use this to learn the schema before writing a query.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable or view name, e.g. 'dms_customer'

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description fully discloses the tool's behavior: it returns column names and data types, and it works on tables or views. No destructive side effects are implied. However, it omits details like permission requirements or scope limits, which is acceptable for a simple read-only schema tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long with no extraneous words. Every sentence adds value: first states functionality, second gives usage guidance. It is perfectly concise for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter, full schema coverage, no output schema, and clear sibling context, the description covers all necessary aspects: purpose, when to use, and what to expect. No further details are needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter 'table' is already described in the schema. The description adds no extra parameter-level meaning beyond what the schema provides (e.g., the example 'dms_customer' is already in schema). Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Return the column names and data types for a given table or view', which identifies the specific verb (return) and resource (schema of a table/view). It uses 'describe_table' and provides a use case distinct from sibling tools like list_tables (which lists table names) and query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises 'Use this to learn the schema before writing a query', giving a clear context for when to invoke the tool. It does not list when not to use or mention alternatives, but the purpose is well-directed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

find_customerFind a customer by nameA

Search customers by (partial) first name, last name, or customer id. Returns matching customers with their internal oid — pass that oid (or the name) to customer_insights.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesFull or partial name, e.g. 'Max', 'Khamla Sengdara', or a customer id like 'C500004'.
limitNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It implies a read operation ('search') but does not explicitly state safety, rate limits, or side effects. It adds some behavioral context (returns oid, next step) but not full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: first states purpose and inputs, second states output and next step. No fluff, front-loaded, and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter search tool with no output schema, the description covers the main inputs, output (oid), and next step. However, it omits mention of the limit parameter and details like pagination, error handling, or return structure. Adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%: only the 'name' parameter has a description with examples. The tool's description repeats that 'name' can be partial or ID but adds no new meaning. The 'limit' parameter lacks description in both schema and tool description, so the description fails to compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for customers by partial name or ID, and distinguishes from siblings by specifying the return of an internal oid for use with customer_insights.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit context: use partial name/id to search, then pass oid or name to customer_insights. It does not explicitly state when not to use, but the guidance is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesList warehouse tablesA

List all tables and views in the warehouse with their row counts. Use this first to discover what data is available.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool lists all tables and views (a read-only operation) and includes row counts. It does not mention potential limitations like large result sets or ordering, but for a simple listing tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with action, no fluff. Every sentence adds value: the first states what it does, the second advises when to use it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description is mostly complete. It tells the agent to use it first for discovery. It could specify the return format (e.g., list of names with counts) but is sufficient for an effective choice.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so per guidelines baseline is 4. The description does not need to add parameter meaning as the schema is empty and coverage is 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all tables and views in the warehouse with row counts, using a specific verb 'List' and resource 'tables and views'. It distinguishes from sibling tools like describe_table (describes a specific table) and query (queries data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this first to discover what data is available', giving a clear when-to-use instruction. However, it does not explicitly mention when not to use or provide alternatives, though context from siblings implies describe_table for specific tables.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

queryRun a read-only SQL queryA

Execute a read-only SELECT/WITH SQL query against the DuckDB warehouse and return the rows. Tables live in the 'main' schema (e.g. dms_customer, dms_contract, dms_contact_note, los_loan_app). A LIMIT is applied automatically if you omit one. Use ? placeholders with the params array for values.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SELECT or WITH statement.
paramsNoPositional parameters bound to ? placeholders in the SQL.
max_rowsNoMaximum rows to return (default 200).

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility. It declares read-only behavior and automatic LIMIT, but does not detail error handling, performance, or return format. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences front-load the core action, table context, and parameter usage. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and simple tool purpose, description adequately covers read-only constraint, table schema hint, parameter binding, and automatic limit. Minor gap on error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 3 parameters (100% coverage). Description enhances meaning by explaining ? placeholders with params array and default max_rows. Adds value over schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it executes read-only SQL queries against DuckDB, distinguishing it from sibling tools that provide predefined insights or table metadata. The verb 'Execute' and resource 'read-only SQL query' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for custom SQL queries but does not explicitly state when to use this tool over siblings like customer_insights or describe_table. Absence of when-not or alternative guidance limits clarity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedcustomer_insights
    • First observeddescribe_table
    • First observedfind_customer
    • First observedlist_tables
    • First observedquery

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: find_customer for searching customers, customer_insights for consolidated profile, list_tables and describe_table for schema discovery, query for arbitrary SQL. No overlap.

Naming Consistency4/5

Four tools follow a consistent verb_noun pattern (find_customer, customer_insights, describe_table, list_tables). 'query' deviates as a single verb, but it's a common term and doesn't create confusion.

Tool Count5/5

Five tools is well-scoped for a warehouse MCP server. It provides essential operations (schema discovery, customer lookup, SQL query) without unnecessary bloat.

Completeness4/5

Covers the main use cases: discovering schema, finding customers, getting insights, and querying. Minor gaps like a dedicated contract search tool, but SQL can cover those needs.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables executing SQL queries on DuckDB databases locally or on MotherDuck cloud, with support for multiple databases, read-only mode, and Claude Desktop integration.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables Claude to interact with a local PostgreSQL database through SQL queries, schema inspection, and CRUD operations.
    8
    121
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables querying and managing a CRM database through natural language conversations with Claude Desktop.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Provides Claude with read-only access to local development databases (Postgres, MySQL, SQLite) to inspect schemas, run SELECT queries, and explain query plans without leaving the conversation.
    5
    MIT

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/SirojWongpitakroj/ClaudeMCPServerTest'

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