io.github.mimersql/mimer-mcp
An MCP server with Mimer SQL Database Connectivity
ماذا يمكنك أن تفعل مع io.github.mimersql/mimer-mcp؟
list_schemas— List all available schemas in the databaselist_table_names— List table names within the specified schemaget_table_info— Get detailed table schema and sample rows
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
mimer-mcp-serverclaude mcp add mimer-mcp -e 'DB_DSN=<DB_DSN>' -e 'DB_USER=<DB_USER>' -e 'DB_PASSWORD=<your db_password>' -e 'DB_HOST=<DB_HOST>' -e 'DB_PORT=<DB_PORT>' -e 'DB_PROTOCOL=<DB_PROTOCOL>' -e 'DB_POOL_INITIAL_CON=<DB_POOL_INITIAL_CON>' -e 'DB_POOL_MAX_UNUSED=<DB_POOL_MAX_UNUSED>' -e 'DB_POOL_MAX_CON=<DB_POOL_MAX_CON>' -e 'DB_POOL_BLOCK=<DB_POOL_BLOCK>' -e 'DB_POOL_DEEP_HEALTH_CHECK=<DB_POOL_DEEP_HEALTH_CHECK>' -e 'MCP_LOG_LEVEL=<MCP_LOG_LEVEL>' -- uvx mimer-mcp-server==1.0.5
{
"mcpServers": {
"mimer-mcp": {
"command": "uvx",
"args": [
"mimer-mcp-server==1.0.5"
],
"env": {
"DB_DSN": "<DB_DSN>",
"DB_USER": "<DB_USER>",
"DB_PASSWORD": "<your db_password>",
"DB_HOST": "<DB_HOST>",
"DB_PORT": "<DB_PORT>",
"DB_PROTOCOL": "<DB_PROTOCOL>",
"DB_POOL_INITIAL_CON": "<DB_POOL_INITIAL_CON>",
"DB_POOL_MAX_UNUSED": "<DB_POOL_MAX_UNUSED>",
"DB_POOL_MAX_CON": "<DB_POOL_MAX_CON>",
"DB_POOL_BLOCK": "<DB_POOL_BLOCK>",
"DB_POOL_DEEP_HEALTH_CHECK": "<DB_POOL_DEEP_HEALTH_CHECK>",
"MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>"
}
}
}
}
متغيرات البيئة
DB_DSNإلزامي Mimer SQL Database DSNDB_USERإلزامي Database userDB_PASSWORDإلزامي سري Database passwordDB_HOSTDatabase hostDB_PORTDatabase portDB_PROTOCOLDatabase protocolDB_POOL_INITIAL_CONInitial number of idle connections in the poolDB_POOL_MAX_UNUSEDMaximum number of unused connections in the poolDB_POOL_MAX_CONMaximum number of connections allowedDB_POOL_BLOCKBlock and wait for connection when exceeding max connectionsDB_POOL_DEEP_HEALTH_CHECKDeep health check - validates connection health before getting from poolMCP_LOG_LEVELLogging level for the MCP server (DEBUG, INFO, WARNING, ERROR, CRITICAL)
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
المحتويات
Mimer MCP Server
A Model Context Protocol (MCP) server that provides Mimer SQL database connectivity to browse database schemas, execute read-only queries with parameterization support, and manage stored procedures.
Available Tools
Database Schema Tools
list_schemas— List all available schemas in the databaselist_table_names— List table names within the specified schemaget_table_info— Get detailed table schema and sample rows
Query Execution Tools
execute_query— Execute SQL query with parameter support (Only SELECT queries are allowed)
Stored Procedure Tools
list_stored_procedures— List read-only stored procedures in the databaseget_stored_procedure_definition— Get the definition of a stored procedureget_stored_procedure_parameters— Get the parameters of a stored procedureexecute_stored_procedure— Execute a stored procedure in the database with JSON parameters
Getting Started
Prerequisites
- Python 3.10 or later (with uv installed) or Docker
- Mimer SQL 11.0 or later
Environment Configuration
Before running the server, you need to configure your database connection settings using environment variables. The Mimer MCP Server reads these from a .env file.
Mimer MCP Server can be configured using environment variables through .env file with the following configuration option:
| Environment Variable | Default | Description |
|---|---|---|
DB_DSN | Required | Database name to connect to |
DB_USER | Required | Database username |
DB_PASSWORD | Required | Database password |
DB_HOST | - | Database host address (use host.docker.internal for Docker) |
DB_PORT | 1360 | Database port number |
DB_PROTOCOL | tcp | Connection protocol |
DB_POOL_INITIAL_CON | 0 | Initial number of idle connections in the pool |
DB_POOL_MAX_UNUSED | 0 | Maximum number of unused connections in the pool |
DB_POOL_MAX_CON | 0 | Maximum number of connections allowed (0 = unlimited) |
DB_POOL_BLOCK | false | Determines behavior when exceeding the maximum number of connections. If true, block and wait for a connection to become available; if false, raise an error when maxconnections is exceeded |
DB_POOL_DEEP_HEALTH_CHECK | true | If true, validates connection health before getting from pool (slower but more reliable) |
MCP_LOG_LEVEL | INFO | Logging level for the MCP server. Options: DEBUG, INFO, WARNING, ERROR, CRITICAL |
Usage with VS Code
MCP servers are configured using a JSON file (mcp.json). Different MCP hosts may have slightly different configuration formats. In this guide, we'll focus on VS Code as an example. First, ensure you've installed the latest version of VS Code and have access to Copilot.
One way to add MCP server in VS Code is to add the server configuration to your workspace in the .vscode/mcp.json file. This will allow you to share configuration with others.
- Create a
.vscode/mcp.jsonfile in your workspace. - Add the following configuration to your
.vscode/mcp.jsonfile, depending on how you want to run the MCP server.
Option 1: Using Docker (Recommended)
Option 1.1: Build the Docker Image Locally
docker build -t mimer-mcp-server .
Then, add the following configuration to .vscode/mcp.json file
{
"servers": {
"mimer-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--add-host=host.docker.internal:host-gateway",
"--env-file=/absolute/path/to/.env",
"mimer-mcp-server",
]
}
},
"inputs": []
}
Option 1.2: Use the Pre-Built Image from Docker Hub
{
"servers": {
"mimer-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--add-host=host.docker.internal:host-gateway",
"--env-file=/absolute/path/to/.env",
"mimersql/mimer-mcp:latest"
]
}
},
"inputs": []
}
Option 1.3: Use Docker compose and the official Mimer SQL docker container
This will start a Mimer SQL Docker container as well as the mimer-mcp-server container,
set up a private network between the two containers and create the Mimer SQL example database.
The Mimer SQL database will be stored in the docker volume called mimer_mcp_data so that database changes are persistent.
{
"servers": {
"mimer-mcp-server": {
"command": "docker",
"args": [
"compose",
"run",
"--rm",
"-i",
"--no-TTY",
"mimer-mcp-server"
]
}
},
"inputs": []
}
Option 2.1: Using uvx
{
"servers": {
"mimer-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"mimer_mcp_server"
],
"env": {
"DOTENV_PATH": "/absolute/path/to/.env"
}
}
}
}
Option 2.2: Using uv
{
"servers": {
"mimer-mcp-server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"/path-to/server.py"
],
}
}
}
- After saving the configuration file, VS Code will display a Start button in the
mcp.jsonfile. Click it to launch the server. - Open Copilot Chat and in the Copilot Chat box, select Agent mode from the dropdown.
- Select the Tools button to view the list of available tools. Make sure the tools from Mimer MCP Server are selected.
- Enter a prompt in the chat input box and notice how the agent autonomously selects a suitable tool, fix errors and generate a final answer from gathered queries results. (Following examples use the Example Database from Mimer, which is owned by MIMER_STORE. Read more about this database: here)
Development
Prerequisites
- Python: 3.10+
- uv: for dependency management and running the server
- Mimer SQL 11.0 or later
- Node.js and npm: for debugging with MCP inspector
Install uv:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# or via Homebrew
brew install uv
Verify installation:
uv --version
Install Node.js and npm:
# Linux (Ubuntu/Debian)
sudo apt install nodejs npm
# macOS (via Homebrew)
brew install node
Verify installation:
node --version
npm --version
Getting Started
- Clone the repository
- Create and activate a virtual environment
`bash uv venv
macOS / Linux
source .venv/bin/activate
Windows
.venv\Scripts\activate
3. Install dependencies from pyproject.toml
```bash
uv sync
- Configure environment variables
bash cp .env.example .env # Edit .env with your database credentialsThe configuration is loaded automatically viaconfig.py.
Debug with MCP inspector
MCP Inspector provides a web interface for testing and debugging MCP Tools (Requires Node.js: 22.7.5+):
npx @modelcontextprotocol/inspector
Note: MCP Inspector is a Node.js app and the npx command allows running MCP Inspector without having to permanently install it as a Node.js package.
Alternatively, you can use FastMCP CLI to start the MCP inspector
uv run fastmcp dev inspector src/mimer_mcp_server/server.py
To run the Mimer SQL docker image and mimer-mcp-server using Docker compose, run:
MCP_TRANSPORT=http docker compose up
or to run it as a daemon:
MCP_TRANSPORT=http docker compose up -d
This way it is possible to call the mimer-mcp-server using HTTP and port 3333.
الأسئلة الشائعة
ما هو io.github.mimersql/mimer-mcp؟
An MCP server with Mimer SQL Database Connectivity
كيف أثبّت io.github.mimersql/mimer-mcp؟
يعمل على جهازك. في Claude Code: claude mcp add mimer-mcp -e 'DB_DSN=<DB_DSN>' -e 'DB_USER=<DB_USER>' -e 'DB_PASSWORD=<your db_password>' -e 'DB_HOST=<DB_HOST>' -e 'DB_PORT=<DB_PORT>' -e 'DB_PROTOCOL=<DB_PROTOCOL>' -e 'DB_POOL_INITIAL_CON=<DB_POOL_INITIAL_CON>' -e 'DB_POOL_MAX_UNUSED=<DB_POOL_MAX_UNUSED>' -e 'DB_POOL_MAX_CON=<DB_POOL_MAX_CON>' -e 'DB_POOL_BLOCK=<DB_POOL_BLOCK>' -e 'DB_POOL_DEEP_HEALTH_CHECK=<DB_POOL_DEEP_HEALTH_CHECK>' -e 'MCP_LOG_LEVEL=<MCP_LOG_LEVEL>' -- uvx mimer-mcp-server==1.0.5. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.mimersql/mimer-mcp إلى مفتاح API؟
نعم. يتطلب DB_DSN, DB_USER, DB_PASSWORD، وتضبطها في إعداداته.
هل io.github.mimersql/mimer-mcp مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.mimersql/mimer-mcp؟
ينشره mimersql. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.