microsoft/MCP-Server-and-PostgreSQL-Sample-Retail
A Model Context Protocol (MCP) server that provides comprehensive customer sales database access for Zava Retail DIY Business. This server enables AI assistants to query and analyze retail sales data through a secure, schema-aware interface.
1b6e188622fePaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
- Supply Chain: no dependency file the scanner reads was found, so it has no number
Top risks in plain words
- HIGHTool
execute_sales_queryruns SQL by design: an agent steered by prompt injection can use it that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Connect it with a read-only database user
execute_sales_querycan run any query it is given. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
execute_sales_query, switch them off. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 4 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
semantic_search_productsexecute_sales_query, get_multiple_table_schemas, semantic_search_productsNo tool was seen to: start other programs on the machine; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
6 request addresses could not be settled from the code (built at run time).
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files1 tool · semantic_search_products
- web or API responses3 tools · execute_sales_query, get_multiple_table_schemas, semantic_search_products
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (4: 4 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
execute_sales_querytool Always fetch and inspect the database schema before generating any SQL using the get_multiple_table_schemas tool; use only exact table and column names, and nevNetworkoutside textRuns SQL
Always fetch and inspect the database schema before generating any SQL using the get_multiple_table_schemas tool; use only exact table and column names, and never invent or infer data, columns, tables, or values—if the information isn't present in the schema or database, clearly state that it cannot be answered. Join related tables for clarity, aggregate results where appropriate, and limit output to 20 rows with a note that the limit is for readability. To identify store types, use the retail.store.is_online boolean: true indicates an online store, false indicates a physical store. **NEVER** return entity IDs or UUIDs in the response, as they are not meaningful to the user. Instead, use descriptive names or values.
Args:
postgresql_query: A well-formed PostgreSQL query.
Returns:
Query results as a string.get_current_utc_datetool Get the current UTC date and time in ISO format. Useful for date time relative queries or understanding the current date for time-sensitive analysis.
Get the current UTC date and time in ISO format. Useful for date time relative queries or understanding the current date for time-sensitive analysis.
Returns:
Current UTC date and time in ISO format (YYYY-MM-DDTHH:MM:SS.fffffZ)get_multiple_table_schemastool Retrieve schemas for multiple tables. Use this tool only for schemas you have not already fetched during the conversation.Networkoutside text
Retrieve schemas for multiple tables. Use this tool only for schemas you have not already fetched during the conversation.
Args:
table_names: List of table names. Valid table names include 'retail.customers', 'retail.stores', 'retail.categories', 'retail.product_types', 'retail.products', 'retail.orders', 'retail.order_items', 'retail.inventory'.
Returns:
Concatenated schema strings for the requested tables.semantic_search_productstool Search for Zava products using natural language descriptions to find matches based on semantic similarity—considering functionality, form, use, and other attribFilesNetworkoutside text
Search for Zava products using natural language descriptions to find matches based on semantic similarity—considering functionality, form, use, and other attributes.
Returns:
Compact success shape:
{"c":["col1","col2"],"r":[[v11,v12],[v21,v22]],"n":2}
Empty result adds 'msg':
{"c":[],"r":[],"n":0,"msg":"No rows"}
Error shape:
{"err":"...","q":"SELECT ...","c":[],"r":[],"n":0}Text the model reads (4)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
semantic_search_products tool
Search for Zava products using natural language descriptions to find matches based on semantic similarity—considering functionality, form, use, and other attributes.
Returns:
Compact success shape:
{"c":["col1","col2"],"r":[[v11,v12],[v21,v22]],"n":2}
Empty result adds 'msg':
{"c":[],"r":[],"n":0,"msg":"No rows"}
Error shape:
{"err":"...","q":"SELECT ...","c":[],"r":[],"n":0}get_multiple_table_schemas tool
Retrieve schemas for multiple tables. Use this tool only for schemas you have not already fetched during the conversation.
Args:
table_names: List of table names. Valid table names include 'retail.customers', 'retail.stores', 'retail.categories', 'retail.product_types', 'retail.products', 'retail.orders', 'retail.order_items', 'retail.inventory'.
Returns:
Concatenated schema strings for the requested tables.execute_sales_query tool
Always fetch and inspect the database schema before generating any SQL using the get_multiple_table_schemas tool; use only exact table and column names, and never invent or infer data, columns, tables, or values—if the information isn't present in the schema or database, clearly state that it cannot be answered. Join related tables for clarity, aggregate results where appropriate, and limit output to 20 rows with a note that the limit is for readability. To identify store types, use the retail.store.is_online boolean: true indicates an online store, false indicates a physical store. **NEVER** return entity IDs or UUIDs in the response, as they are not meaningful to the user. Instead, use descriptive names or values.
Args:
postgresql_query: A well-formed PostgreSQL query.
Returns:
Query results as a string.get_current_utc_date tool
Get the current UTC date and time in ISO format. Useful for date time relative queries or understanding the current date for time-sensitive analysis.
Returns:
Current UTC date and time in ISO format (YYYY-MM-DDTHH:MM:SS.fffffZ)What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 4 tool handlers traced
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 4 tool handlers traced
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 4 tool handlers traced
- Requests any addressNo tool sends a request to an address the caller supplies — 4 tool handlers traced
- Runs caller-supplied SQL1 finding the scanner could not decide; see the findings below
- Tools that start processesNot seen in the traced code of 4 capabilities; 4 more call code the scanner could not follow, where it may happen
- Tools that touch files1 of 4 capabilities touch files; 3 more call code the scanner could not follow, where it may happen
- Tools that call the network3 of 4 capabilities call the network; 1 more call code the scanner could not follow, where it may happen
Where the code is: 4 handlers in 1 file at commit 1b6e188622fe
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifestsNo manifest found
- Lockfiles checked against OSVNothing could be resolved to exact versions
- MCP SDK versionNo MCP SDK declared in a manifest
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 4 capabilities; 4 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | Streamable HTTP, SSE |
| Sign-in | not checked needs the live server |
| Servers in the code | 1 (mcp-zava-sales) |
The project's own security
| Security policy | yes SECURITY.md |
|---|---|
| Private reporting | the policy does not name a private channel |
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-05 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 1 catalog (github_search) |
|---|---|
| License | MIT |
| Created | 2025-09-25 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.