MHTL Warehouse MCP Server
Provides tools for querying a DuckDB database, including listing tables, describing schema, searching customers, retrieving customer insights, and running arbitrary read-only SQL queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MHTL Warehouse MCP ServerGet insights on customer Jane Doe"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 all tables/views with row counts. |
| Show columns + types for a table. |
| Search customers by (partial) name or id → returns their |
| The headline tool. Full profile for a customer: identity, contracts, outstanding/overdue balances, NPL flag, recent contact notes, loan applications. |
| Run an arbitrary read-only |
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
Build (
npm run build).Copy
claude_desktop_config.jsonfrom 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-warehouseentry into your existingmcpServersobject instead of overwriting the file.Fully quit and reopen Claude Desktop.
In a new chat you should see the tools available (plug/tools icon). Try: "Get the insights of the customer Noy Vongphachanh."
How the data links together
dms_customer.oid(BIGINT) ←dms_contract.customer(the numeric id).dms_contract.contractid←dms_contact_note.contract/dms_contact_legal.contract.LOS ↔ DMS customers share their last 5 id digits 1:1 (
C500123↔L100123), used to attach loan applications.
Configuration
WAREHOUSE_DB_PATH— absolute path to the DuckDB file. If unset, the server defaults to../data/mock.duckdbrelative todist/.
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 warehouseAvailable Tools
5 toolscustomer_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'.
| Name | Required | Description | Default |
|---|---|---|---|
| customer | Yes | Customer name (full or partial), customer id (e.g. 'C500004'), or numeric oid. | |
| notes_limit | No | How many recent contact notes to include (default 10). |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table or view name, e.g. 'dms_customer' |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Full or partial name, e.g. 'Max', 'Khamla Sengdara', or a customer id like 'C500004'. | |
| limit | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SELECT or WITH statement. | |
| params | No | Positional parameters bound to ? placeholders in the SQL. | |
| max_rows | No | Maximum rows to return (default 200). |
TDQS
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.
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.
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.
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.
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.
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.
5 tool updates
v1.0.0- First observed
customer_insights - First observed
describe_table - First observed
find_customer - First observed
list_tables - First observed
query
TDQS
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.
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.
Five tools is well-scoped for a warehouse MCP server. It provides essential operations (schema discovery, customer lookup, SQL query) without unnecessary bloat.
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
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
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables executing SQL queries on DuckDB databases locally or on MotherDuck cloud, with support for multiple databases, read-only mode, and Claude Desktop integration.MIT
- AlicenseAqualityDmaintenanceEnables Claude to interact with a local PostgreSQL database through SQL queries, schema inspection, and CRUD operations.8121MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying and managing a CRM database through natural language conversations with Claude Desktop.-
- AlicenseAqualityCmaintenanceProvides 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.5MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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