Skip to content
Back to search

mcp_server

A local Model Context Protocol (MCP) server that connects an AI client to a PostgreSQL-based English-to-Hindi dictionary.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/krishnagondaliya34-cell--mcp-server/badge.svg)](/listings/krishnagondaliya34-cell--mcp-server)

HTML

<a href="/listings/krishnagondaliya34-cell--mcp-server"><img src="/api/listings/krishnagondaliya34-cell--mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

python -m pip install --upgrade pip
python -m pip install -r requirements.txt

The `uv` package is included because the MCP Inspector development command may use it to launch the server.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 160 lines
  1. # English-to-Hindi Dictionary MCP Server
  2. A local Model Context Protocol (MCP) server that connects an AI client
  3. to a PostgreSQL-based English-to-Hindi dictionary.
  4. The server currently provides two tools:
  5. - `lookup_word`: looks up an English word and returns its Hindi
  6. meaning.
  7. - `save_translation`: inserts a new English-to-Hindi translation. The
  8. database prevents duplicate English words from being inserted.
  9. > **Save approval:** The `save_translation` tool is intended to be
  10. > called only when the user explicitly asks the AI client to add, save,
  11. > or store a translation. The tool description communicates this
  12. > instruction to the AI client. The client must still follow that
  13. > instruction; the server itself does not independently verify the
  14. > user's conversational approval.
  15. ## Project structure
  16. A typical project folder looks like this:
  17. ``` text
  18. hindi-dictionary/
  19. ├── .venv/ # Python virtual environment (not committed)
  20. ├── .env # Local database credentials (not committed)
  21. ├── .gitignore
  22. ├── requirements.txt
  23. ├── README.md
  24. └── server.py
  25. ```
  26. ## Requirements
  27. - Python 3.10 or newer
  28. - PostgreSQL
  29. - A PostgreSQL database and user with permission to create/read/write
  30. the dictionary table
  31. - An MCP-compatible client, such as Claude Desktop or Gemini CLI
  32. The project uses the MCP 1.x FastMCP API. The requirements file
  33. intentionally constrains the MCP package to versions below 2 because the
  34. server code imports `FastMCP` from `mcp.server.fastmcp`.
  35. ## 1. Create and activate a virtual environment
  36. From the project directory in Windows PowerShell:
  37. ``` powershell
  38. python -m venv .venv
  39. .\.venv\Scripts\Activate.ps1
  40. ```
  41. If PowerShell blocks activation, you can run the virtual-environment
  42. Python directly, or follow your organization's PowerShell execution
  43. policy guidance.
  44. ## 2. Install dependencies
  45. ``` powershell
  46. python -m pip install --upgrade pip
  47. python -m pip install -r requirements.txt
  48. ```
  49. The `uv` package is included because the MCP Inspector development
  50. command may use it to launch the server.
  51. ## 3. Create the PostgreSQL database and table
  52. Create a database named `hindi_dictionary` in PostgreSQL if it does not
  53. already exist.
  54. Connect to that database, then execute:
  55. ``` sql
  56. CREATE TABLE IF NOT EXISTS translations (
  57. id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  58. english_word VARCHAR(200) NOT NULL UNIQUE,
  59. hindi_meaning TEXT NOT NULL,
  60. created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  61. );
  62. ```
  63. Verify the table exists:
  64. ``` sql
  65. SELECT * FROM translations;
  66. ```
  67. You can run these SQL commands in pgAdmin's Query Tool after selecting
  68. the `hindi_dictionary` database.
  69. ## 4. Configure the `.env` file
  70. Create a file named `.env` in the same folder as `server.py`:
  71. ``` env
  72. DB_HOST=localhost
  73. DB_PORT=5432
  74. DB_NAME=hindi_dictionary
  75. DB_USER=postgres
  76. DB_PASSWORD=your_postgresql_password
  77. ```
  78. Replace `your_postgresql_password` with the password for your PostgreSQL
  79. user.
  80. Do not commit or share `.env`. It contains credentials. Add the
  81. following to `.gitignore`:
  82. ``` gitignore
  83. .env
  84. .venv/
  85. __pycache__/
  86. *.pyc
  87. ```
  88. ## 5. Run the MCP server
  89. The server uses standard input/output (STDIO) transport:
  90. ``` powershell
  91. python server.py
  92. ```
  93. A STDIO MCP server normally waits for an MCP client and may not print a
  94. friendly "server started" message. Keep the process running when testing
  95. it directly. When an MCP client launches the server, the client manages
  96. that process.
  97. ## 6. Test with MCP Inspector
  98. With the virtual environment activated, run:
  99. ``` powershell
  100. mcp dev server.py
  101. ```
  102. Open the Inspector URL shown in the terminal. Connect using the STDIO
  103. transport and confirm that these tools are listed:
  104. - `lookup_word`
  105. - `save_translation`
  106. Test `save_translation` with a new word and Hindi meaning, then test
  107. `lookup_word` with that English word. Test the duplicate case by
  108. attempting to save the same English word again; the existing translation
  109. should remain unchanged.
  110. If the Inspector reports that it cannot spawn `uv`, verify that `uv` is
  111. installed in the active environment:
  112. ``` powershell
  113. python -m pip install uv
  114. uv --version
  115. ```
  116. Restart the Inspector after installing it.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.