sinhala-mcp
Provides translation of Sinhala/Singlish instructions into English technical specifications using Google Gemini AI models.
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., "@sinhala-mcpමට login flow එකක් හදන්න ඕන"
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.
🇱🇰 sinhala-mcp
🚀 Sri Lanka's First AI-Powered MCP Server for Sinhala Developers
Break the language barrier. Code in your mother tongue.
A production-ready Model Context Protocol server that translates Sinhala/Singlish instructions into precise English technical specifications using Google Gemini AI.
Note (v0.1.8+): Previous versions of this README documented incorrect configuration methods that resulted in silent failures. The methods below have been tested and verified. If you previously configured sinhala-mcp using the old instructions, remove the old config and follow the updated steps below.
Why sinhala-mcp?
As the first of its kind in Sri Lanka, sinhala-mcp empowers Sinhala-speaking developers to:
Code naturally in your preferred language (Sinhala or Singlish)
Get precise technical translations optimized for AI coding agents
Boost productivity by removing language friction from development workflows
Stay ahead with cutting-edge AI integration via Google's Gemini
Related MCP server: Gemini MCP Server
Features
Sinhala/Singlish Translation: Convert colloquial commands into structured English technical specifications
Context-Aware: Automatically infers technical context (e.g., "Login" → "Authentication flow")
Environment Variable Auth: Secure API key management via environment variables
Production-Ready: Comprehensive error handling, retry logic, timeout protection, input validation, and health checks
MCP Compliant: Works with Claude Desktop, VS Code, Claude Code CLI, and other MCP-compatible tools
Latest AI: Uses Google GenAI SDK with Gemini models (supports 1.5-flash, 2.5-flash, 2.5-flash-lite, 2.5-pro)
Installation
pip install sinhala-mcpOr with uv:
uv pip install sinhala-mcpManual Installation from Source
If you encounter issues with PyPI installation:
git clone https://github.com/Thamindu-Dev/sinhala-mcp.git
cd sinhala-mcp
pip install -e .Verifying Installation
After installing, verify the server is accessible:
sinhala-mcp --helpIf this returns a help message, the package is installed correctly and available on your PATH.
Windows users: If
sinhala-mcpis not found, the Python Scripts directory may not be on your PATH. The executable is located atC:\Users\<you>\AppData\Local\Programs\Python\PythonXX\Scripts\sinhala-mcp.exewhereXXis your Python version (e.g.,Python313). See Troubleshooting for details.
Configuration
Step 1: Get a Google Gemini API Key
Visit Google AI Studio
Create a new API key
Keep it secure — never commit it to version control
Step 2: Configure Your MCP Client
IMPORTANT: The server reads the API key from the GEMINI_API_KEY environment variable. Without this key, the server will silently fail to connect — you will see "Failed to reconnect" in your MCP client, not a clear error message.
Method 1: Claude Code CLI (Recommended)
The fastest way to add sinhala-mcp to Claude Code:
claude mcp add sinhala-mcp -e GEMINI_API_KEY=your-api-key-here -- sinhala-mcpWith a specific Gemini model:
claude mcp add sinhala-mcp -e GEMINI_API_KEY=your-key -e GEMINI_MODEL=gemini-2.5-flash-lite -- sinhala-mcpWhat this does: Writes the server config to ~/.claude.json under the mcpServers key. This is the correct config file for Claude Code — do NOT use ~/.claude/settings.json (it does not support MCP servers) or ~/.claude/.mcp.json.
To verify it was added:
claude mcp listTo remove it later:
claude mcp remove sinhala-mcpManual Claude Code Config
If you prefer to edit the config file directly:
macOS/Linux: ~/.claude.json
Windows: %USERPROFILE%\.claude.json
Add under the "mcpServers" key:
{
"mcpServers": {
"sinhala-mcp": {
"type": "stdio",
"command": "sinhala-mcp",
"args": [],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Windows users: If
sinhala-mcpis not on PATH, use the full path:"command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\sinhala-mcp.exe"Replace
<you>with your Windows username andPython313with your installed Python version.
Project-Specific Config
To add sinhala-mcp for a specific project only, navigate to the project directory and run:
claude mcp add sinhala-mcp -e GEMINI_API_KEY=your-key -s project -- sinhala-mcpOr add it manually to the project entry in ~/.claude.json under "<project-path>" → "mcpServers".
Method 2: Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Roaming\Claude\claude_desktop_config.json
{
"mcpServers": {
"sinhala-mcp": {
"type": "stdio",
"command": "sinhala-mcp",
"args": [],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Optional: Override the default model by adding "GEMINI_MODEL": "gemini-2.5-flash-lite" to env.
Method 3: VS Code MCP Extension
Create or update .vscode/settings.json:
{
"mcp.servers": {
"sinhala-mcp": {
"command": "sinhala-mcp",
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}For advanced configuration with model sampling, create .vscode/mcp.json:
{
"servers": {
"sinhala-mcp": {
"command": "uvx",
"args": ["sinhala-mcp"],
"env": {
"GEMINI_API_KEY": "${input:gemini_api_key}",
"GEMINI_MODEL": "${input:gemini_model}"
},
"type": "stdio"
}
},
"inputs": [
{
"id": "gemini_api_key",
"type": "promptString",
"description": "Google Gemini API Key",
"default": ""
},
{
"id": "gemini_model",
"type": "promptString",
"description": "Gemini Model (optional)",
"default": "gemini-2.5-flash"
}
]
}Then update .vscode/settings.json for model sampling:
{
"chat.mcp.serverSampling": {
"sinhala-mcp/.vscode/mcp.json: sinhala-mcp": {
"allowedModels": [
"copilot/auto",
"gemini-1.5-flash",
"gemini-2.5-flash",
"gemini-2.5-flash-lite",
"gemini-2.5-pro"
]
}
}
}Available Tools
translate_sinhala_instruction
Translates Sinhala or Singlish instructions into precise English technical prompts.
Usage:
Use translate_sinhala_instruction to translate "mata login form ekak hadanna one"Parameters:
instruction(string, required): The Sinhala or Singlish instruction (max 5000 characters)
Example Output:
Original (Sinhala/Singlish):
mata login page ekak hadanna one
Translated (English Technical Prompt):
Implement a user authentication system with login functionality including:
- Username/email and password input fields
- Form validation for credentials
- Authentication endpoint integration
- Session management after successful login
- Error handling for failed authentication attemptshealth_check
Check if the MCP server and Gemini API connection are working.
Usage:
Run health_checkUsage Examples
Web Development
Input: "Mata dashboard ekak denna user stats display karanna" Output:
Create a user analytics dashboard with:
- Real-time user statistics display
- Data visualization charts
- Filtering and search capabilities
- Responsive layout for mobile/desktop
- Authentication-protected accessBackend Development
Input: "Database eka connect karanna API endpoint ekak hadala denna" Output:
Implement database integration with REST API:
- Set up database connection pool
- Create CRUD endpoints for data access
- Implement proper error handling
- Add data validation and sanitization
- Include authentication/authorization middlewareFrontend Features
Input: "Profile page eke photo upload eka hadanna" Output:
Implement profile photo upload feature:
- File upload input with image type validation
- Client-side image preview
- Size and format restrictions
- Upload progress indicator
- Server-side file storage integration
- Error handling for upload failuresDevelopment
# Clone the repository
git clone https://github.com/Thamindu-Dev/sinhala-mcp.git
cd sinhala-mcp
# Install in editable mode
pip install -e .
# Test server
python test_simple.pyProject Structure
sinhala-mcp/
├── src/
│ └── sinhala_mcp/
│ ├── __init__.py
│ └── server.py # Main MCP server implementation
├── pyproject.toml # Package configuration
├── README.md
└── LICENSESecurity
API keys stored in environment variables only
No local file storage of credentials
Input validation and sanitization
Protection against injection attacks
Rate limit handling
Open source — fully auditable
Technical Specifications
Build Backend: hatchling
Python Version: 3.10+ (tested on 3.10-3.13)
Dependencies:
mcp>=0.9.0,google-genai>=1.0.0,google-api-core>=1.0.0Default Model:
gemini-2.5-flashSupported Models:
gemini-2.5-flash,gemini-2.5-flash-lite,gemini-2.5-pro,gemini-1.5-flashMax Instruction Length: 5000 characters
API Timeout: 30 seconds
Retry Logic: 2 retries with exponential backoff
Troubleshooting
"Failed to reconnect" in Claude Code / Claude Desktop
This is the most common issue and has two root causes:
Missing
GEMINI_API_KEY: The server silently fails to start without the API key. You won't see a clear error — just "Failed to reconnect".Stale Python path (Windows): If you upgraded Python, the
commandpath in your config points to the old version (e.g.,Python310instead ofPython313). The executable no longer exists at the old path, so the server can't start. This was the primary issue reported by users — the old documentation did not account for Python version path changes on Windows.
Fix: Ensure both the API key and the correct executable path are set:
{
"mcpServers": {
"sinhala-mcp": {
"type": "stdio",
"command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\sinhala-mcp.exe",
"args": [],
"env": {
"GEMINI_API_KEY": "your-actual-key-here"
}
}
}
}Windows: Always verify the path exists. Run
where sinhala-mcpin terminal to find the correct path. If you upgraded Python, the old path won't work — see Python version path changes below.
After updating the config, restart Claude Code / Claude Desktop.
"sinhala-mcp" command not found
Cause: The Python Scripts directory is not on your system PATH, or the package was installed under a different Python version.
Fix (Windows): Use the full path to the executable:
C:\Users\<you>\AppData\Local\Programs\Python\PythonXX\Scripts\sinhala-mcp.exeReplace <you> with your username and XX with your Python version folder (e.g., Python313).
Fix (macOS/Linux): Find the executable path:
which sinhala-mcp
# or
python -c "import shutil; print(shutil.which('sinhala-mcp'))"Use the full path in your MCP config if needed.
Python version path changes (Windows)
This is the #1 cause of "Failed to reconnect" on Windows.
When you upgrade Python (e.g., 3.10 → 3.13), pip installs packages into the new version's Scripts directory. The old executable path becomes invalid:
Python 3.10: C:\...\Python310\Scripts\sinhala-mcp.exe
Python 3.13: C:\...\Python313\Scripts\sinhala-mcp.exeIf your MCP config points to the old path, the server won't start. Reinstall the package on the new Python version and update the path in your config:
# Reinstall on new Python
pip install sinhala-mcp
# Update config with new path
claude mcp remove sinhala-mcp
claude mcp add sinhala-mcp -e GEMINI_API_KEY=your-key -- "C:\Users\<you>\AppData\Local\Programs\Python\Python313\Scripts\sinhala-mcp.exe"VS Code Compatibility Issues
Some VS Code MCP extensions have model validation restrictions
Workaround: Set
GEMINI_MODEL=gemini-1.5-flashin your configuration for better compatibilityImportant: After changing
GEMINI_MODEL, restart your MCP client for changes to take effectAlternative: Use Claude Desktop or Claude Code CLI for better compatibility
Model Changes Not Taking Effect
Issue: Setting
GEMINI_MODELdoesn't change the model being usedSolution: Restart your MCP client (Claude Desktop, VS Code) after modifying environment variables
Verify: Check MCP server logs for "Using Gemini model: ..." message on startup
Translation Issues
The model may block content due to safety settings
Try rephrasing the instruction
Wrong config file location (Claude Code)
Claude Code reads MCP servers from ~/.claude.json (the "mcpServers" key at the top level), not from:
~/.claude/settings.json— this file only holds settings like env vars and plugins, not MCP servers~/.claude/.mcp.json— this is not a valid Claude Code config location.claude/settings.local.json— this only holds per-project permissions
Use claude mcp add to add servers correctly, or edit ~/.claude.json directly.
Support
Report Issues: GitHub Issues
MCP Protocol: modelcontextprotocol.io
Contributing
Contributions are welcome! Fork the repository, create a feature branch, and submit a Pull Request.
License
MIT License — see LICENSE for details.
About the Developer
sinhala-mcp was created by Thamindu Hatharasinghe — a passionate Sri Lankan developer dedicated to breaking language barriers in technology.
As Sri Lanka's first Sinhala-to-English technical translation tool for developers, this project represents a milestone in making AI-assisted development accessible to Sinhala-speaking developers worldwide.
Portfolio: www.thamindu.zynthlab.com
GitHub: Thamindu-Dev
Made in Sri Lanka, for Sinhala developers worldwide
Available Tools
2 toolshealth_checkA
Check if the MCP server and Gemini API connection are working.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. It fails to disclose behavioral traits such as side effects (likely none), rate limits, or what happens on failure. The description is minimal and lacks depth.
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?
Single sentence, no wasted words. Every word earns its place. Appropriately sized 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?
The description is adequate for a simple health check, but lacks mention of return value or status format. Since no output schema exists, some detail on expected output would improve completeness.
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?
No parameters exist (input schema empty with 100% schema coverage). Baseline for 0 parameters is 4. Description adds no parameter info as there are none.
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 the tool checks health of MCP server and Gemini API connection, using a specific verb ('Check') and explicit resources. It distinctly differs from sibling tool 'translate_sinhala_instruction' which is unrelated.
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?
No explicit guidance on when to use or avoid this tool. The purpose is implied (diagnostics) but no alternatives or context are provided. With only one sibling, no comparison is made.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
translate_sinhala_instructionA
Translate a Sinhala or Singlish instruction into a precise English technical prompt for an AI coding agent. Automatically infers technical context.
| Name | Required | Description | Default |
|---|---|---|---|
| instruction | Yes | The Sinhala or Singlish instruction to translate (max 5000 characters). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the transformation and automatic context inference, but it does not mention input validation behavior (e.g., if input is not Sinhala/Singlish) or output format. The description is adequate but lacks details about potential limitations or side effects.
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 concise with two sentences, no wasted words, and front-loads the main action. Every sentence adds value.
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 translation tool with one parameter and no output schema, the description is relatively complete. It covers the input, transformation, and output context. However, it lacks details about error handling or behavior on invalid input, which would improve completeness.
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?
The input schema already describes the parameter as a Sinhala/Singlish instruction with a max length. The description adds meaning by specifying the output: a precise English technical prompt for an AI coding agent, and mentions automatic context inference, which provides additional context beyond the schema.
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 verb ('Translate'), resource ('Sinhala or Singlish instruction'), and target output ('precise English technical prompt for an AI coding agent'). It also mentions automatic context inference, distinguishing it from its only sibling, health_check.
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 purpose is clear enough that an agent would know to use this tool when it has a non-English instruction for the AI agent. However, it does not explicitly state when to use or not use it (e.g., if the input is already English), nor does it provide alternatives. Given the sibling is health_check, the need is lower, but still a minor gap.
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.
2 tool updates
v0.1.8- First observed
health_check - First observed
translate_sinhala_instruction
TDQS
Health check and translation are completely distinct concerns with no functional overlap. An agent can easily choose the correct tool.
Both tools use snake_case, but 'health_check' is a noun phrase while 'translate_sinhala_instruction' is imperative verb+noun, showing minor inconsistency.
With only two tools, the set is minimal but arguably sufficient for the narrow scope of health checking and translation. Borderline acceptable.
The server covers only one main operation (translation) plus health check. Missing auxiliary features like language detection or reverse translation, but core purpose is served.
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
Turn PRDs and product ideas into structured specs so coding agents build your intent, not theirs.
Turn your app idea into IA, wireframes, PRD, style guides, and dev specs for coding agents.
Turns rough requests into sharp Role/Task/Context/Format prompts. Thai and English.
Official AI agent for Stuart Innovations. Real-time project scoping, tech-stack advisory, and UK-based development capacity for Web, Mobile, and AI solutions
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive codebase analysis using Google's Gemini AI through CLI integration. Provides architectural reviews and targeted code analysis with code2prompt integration for efficient context extraction.182Apache 2.0
- AlicenseAqualityDmaintenanceEnables interaction with Google's Gemini AI models including file uploads, conversation management, and batch API processing for large-scale tasks at reduced costs. Supports multiple Gemini models with advanced features like embeddings generation and automated workflow processing.21201MIT
- AlicenseBqualityCmaintenanceIntegrates Google's Gemini AI with Claude Code to provide advanced development assistance including code analysis, implementation planning, technical explanations, debugging support, and strategic development guidance.10707MIT
- AlicenseNot gradedqualityDmaintenanceIntegrates Google Gemini API capabilities into Claude Code, supporting text generation, image analysis, and AI image creation. It features specialized tools for creative brainstorming and managing multi-turn chat sessions.70MIT
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/Thamindu-Dev/sinhala-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server