{
  "markdown": "# Mimer MCP Server\n\nA 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.\n\n<!-- mcp-name: io.github.mimersql/mimer-mcp -->\n\n## Available Tools\n\n### Database Schema Tools\n- `list_schemas` — List all available schemas in the database\n- `list_table_names` — List table names within the specified schema\n- `get_table_info` — Get detailed table schema and sample rows\n\n### Query Execution Tools\n- `execute_query` — Execute SQL query with parameter support (Only SELECT queries are allowed)\n\n### Stored Procedure Tools\n- `list_stored_procedures` — List read-only stored procedures in the database\n- `get_stored_procedure_definition` — Get the definition of a stored procedure\n- `get_stored_procedure_parameters` — Get the parameters of a stored procedure\n- `execute_stored_procedure` — Execute a stored procedure in the database with JSON parameters\n\n## Getting Started\n\n### Prerequisites\n- Python 3.10 or later (with uv installed) _or_ Docker\n- Mimer SQL 11.0 or later\n\n---\n\n### Environment Configuration\n\nBefore running the server, you need to configure your database connection settings using environment variables. The Mimer MCP Server reads these from a `.env` file.\n\nMimer MCP Server can be configured using environment variables through `.env` file with the following configuration option:\n\n| Environment Variable | Default | Description |\n|---------------------|---------|-------------|\n| `DB_DSN` | *Required* | Database name to connect to |\n| `DB_USER` | *Required* | Database username |\n| `DB_PASSWORD` | *Required* | Database password |\n| `DB_HOST` | - | Database host address (use `host.docker.internal` for Docker) |\n| `DB_PORT` | `1360` | Database port number |\n| `DB_PROTOCOL` | `tcp` | Connection protocol |\n| `DB_POOL_INITIAL_CON` | `0` | Initial number of idle connections in the pool |\n| `DB_POOL_MAX_UNUSED` | `0` | Maximum number of unused connections in the pool |\n| `DB_POOL_MAX_CON` | `0` | Maximum number of connections allowed (0 = unlimited) |\n| `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 |\n| `DB_POOL_DEEP_HEALTH_CHECK` | `true` | If `true`, validates connection health before getting from pool (slower but more reliable) |\n| `MCP_LOG_LEVEL` | `INFO` | Logging level for the MCP server. Options: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` |\n\n## Usage with VS Code\n\nMCP 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.\n\nOne 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.\n\n1. Create a `.vscode/mcp.json` file in your workspace.\n2. Add the following configuration to your `.vscode/mcp.json` file, depending on how you want to run the MCP server.\n\n\n### Option 1: Using Docker (Recommended)\n\n#### Option 1.1: Build the Docker Image Locally\n\n```bash\ndocker build -t mimer-mcp-server .\n```\n\nThen, add the following configuration to `.vscode/mcp.json` file\n\n```json\n{\n\t\"servers\": {\n\t\t\"mimer-mcp-server\": {\n\t\t\t\"command\": \"docker\",\n\t\t\t\"args\": [\n\t\t\t\t\"run\",\n\t\t\t\t\"-i\",\n\t\t\t\t\"--rm\",\n\t\t\t\t\"--add-host=host.docker.internal:host-gateway\",\n\t\t\t\t\"--env-file=/absolute/path/to/.env\",\n\t\t\t\t\"mimer-mcp-server\",\n\t\t\t]\n\t\t}\n\t},\n\t\"inputs\": []\n}\n```\n\n#### Option 1.2: Use the Pre-Built Image from Docker Hub\n\n```json title=\"mcp.json\"\n{\n    \"servers\": {\n        \"mimer-mcp-server\": {\n            \"command\": \"docker\",\n            \"args\": [\n                \"run\",\n                \"-i\",\n                \"--rm\",\n                \"--add-host=host.docker.internal:host-gateway\",\n                \"--env-file=/absolute/path/to/.env\",\n                \"mimersql/mimer-mcp:latest\"\n            ]\n        }\n    },\n    \"inputs\": []\n}\n```\n\n### Option 1.3: Use Docker compose and the official Mimer SQL docker container\n\nThis will start a Mimer SQL Docker container as well as the mimer-mcp-server container,\nset up a private network between the two containers and create the Mimer SQL example database.\nThe Mimer SQL database will be stored in the docker volume called `mimer_mcp_data` so that database changes are persistent.\n\n```\n{\n  \"servers\": {\n    \"mimer-mcp-server\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"compose\",\n        \"run\",\n        \"--rm\",\n        \"-i\",\n        \"--no-TTY\",\n        \"mimer-mcp-server\"\n      ]\n    }\n  },\n  \"inputs\": []\n}\n```\n\n### Option 2.1: Using uvx\n\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Mimer_MCP_Server-0098FF?style=flat&logo=visualstudiocode&logoColor=ffffff)](vscode:mcp/install?%7B%22name%22%3A%22mimer-mcp-server%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22run%22%2C%22--with%22%2C%22fastmcp%22%2C%22fastmcp%22%2C%22run%22%2C%22%2Fabsolute%2Fpath%2Fto%2Fserver.py%22%5D%7D)\n\n```json\n{\n\t\"servers\": {\n\t\t\"mimer-mcp-server\": {\n\t\t\t\"type\": \"stdio\",\n\t\t\t\"command\": \"uvx\",\n\t\t\t\"args\": [\n\t\t\t\t\"mimer_mcp_server\"\n\t\t\t],\n\t\t\t\"env\": {\n\t\t\t\t\"DOTENV_PATH\": \"/absolute/path/to/.env\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n### Option 2.2: Using uv\n\n```json\n{\n\t\"servers\": {\n\t\t\"mimer-mcp-server\": {\n\t\t\t\"type\": \"stdio\",\n\t\t\t\"command\": \"uv\",\n\t\t\t\"args\": [\n\t\t\t\t\"run\",\n\t\t\t\t\"--with\",\n\t\t\t\t\"fastmcp\",\n\t\t\t\t\"fastmcp\",\n\t\t\t\t\"run\",\n\t\t\t\t\"/path-to/server.py\"\n\t\t\t],\n    }\n  }\n}\n```\n\n3. After saving the configuration file, VS Code will display a **Start** button in the `mcp.json` file. Click it to launch the server.\n\n<img src=\"docs/images/start-mcp-server.png\" alt=\"Start button to start Mimer MCP Server\" width=400>\n\n5. Open Copilot Chat and in the Copilot Chat box, select Agent mode from the dropdown.\n\n<img src=\"docs/images/copilot-agent-mode.png\" alt=\"Copilot Chat Agent Mode\" width=400>\n\n6. Select the Tools button to view the list of available tools. Make sure the tools from Mimer MCP Server are selected.\n\n<img src=\"docs/images/mimer-mcp-tools.png\" alt=\"Tool Button on Chat\" width=490%>\n\n7. 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](https://developer.mimer.com/article/the-example-database/))\n\n<img src=\"docs/images/prompt-anthology.png\" alt=\"Prompt asking what kind of product is Anthology\" width=90%>\n\n<img src=\"docs/images/agent-answer.png\" alt=\"Agent answers with the gathered queries results\" width=90%>\n\n## Development \n\n### Prerequisites\n- Python: 3.10+\n- [uv](https://github.com/astral-sh/uv): for dependency management and running the server\n- Mimer SQL 11.0 or later\n- Node.js and npm: for debugging with MCP inspector\n\n#### Install `uv`:\n```bash\n# macOS / Linux\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# or via Homebrew\nbrew install uv\n```\n\nVerify installation:\n```bash\nuv --version\n```\n\n#### Install Node.js and npm:\n```bash\n# Linux (Ubuntu/Debian)\nsudo apt install nodejs npm\n\n# macOS (via Homebrew)\nbrew install node\n```\n\nVerify installation:\n```bash\nnode --version\nnpm --version\n```\n\n### Getting Started\n1. Clone the repository\n\n2. Create and activate a virtual environment\n```bash\nuv venv\n\n# macOS / Linux\nsource .venv/bin/activate\n# Windows\n.venv\\Scripts\\activate\n```\n\n3. Install dependencies from pyproject.toml\n```bash\nuv sync\n```\n\n4. Configure environment variables\n```bash\ncp .env.example .env\n# Edit .env with your database credentials\n```\nThe configuration is loaded automatically via `config.py`.\n\n### Debug with MCP inspector\n\nMCP Inspector provides a web interface for testing and debugging MCP Tools (Requires Node.js: 22.7.5+):\n```bash\nnpx @modelcontextprotocol/inspector\n```\n\nNote: 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. \n\nAlternatively, you can use FastMCP CLI to start the MCP inspector\n```bash\nuv run fastmcp dev /absolute/path/to/server.py\n```\n\nTo run the Mimer SQL docker image and mimer-mcp-server using Docker compose, run:\n```bash\nMCP_TRANSPORT=http docker compose up\n```\n\nor to run it as a daemon:\n```bash\nMCP_TRANSPORT=http docker compose up -d\n```\nThis way it is possible to call the mimer-mcp-server using HTTP and port 3333.",
  "bytes": 8648,
  "sha": "a6ac807cbbee6470ced3c3474cfa9f551a58501bf74e407eb64fb5bc4af25706",
  "repo_slug": "mimersql/mimer-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mimersql_mimer_mcp_bab3d42c/readme"
}