You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README to clarify MySQL MCP Server's usage
- Removed instructions for running server directly with Python
- Added section about using MCP Inspector for debugging
- Clarified that the server is not meant to be run standalone
- Emphasized integration with AI applications like Claude Desktop
- Updated terminology from "server" to "implementation" to better
reflect the component's nature as a protocol implementation
A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.
4
5
5
-
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. This server allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
6
+
> **Note**: MySQL MCP Server is not designed to be used as a standalone server, but rather as a communication protocol implementation between AI applications and MySQL databases.
6
7
7
8
## Features
8
-
9
9
- List available MySQL tables as resources
10
10
- Read table contents
11
11
- Execute SQL queries with proper error handling
12
12
- Secure database access through environment variables
13
13
- Comprehensive logging
14
14
15
15
## Installation
16
-
17
16
### Manual Installation
18
17
```bash
19
18
pip install mysql-mcp-server
20
19
```
21
20
22
21
### Installing via Smithery
23
-
24
-
To install MySQL Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mysql-mcp-server):
25
-
22
+
To install MySQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mysql-mcp-server):
26
23
```bash
27
24
npx -y @smithery/cli install mysql-mcp-server --client claude
28
25
```
29
26
30
27
## Configuration
31
-
32
28
Set the following environment variables:
33
-
34
29
```bash
35
30
MYSQL_HOST=localhost # Database host
36
31
MYSQL_PORT=3306 # Optional: Database port (defaults to 3306 if not specified)
@@ -40,11 +35,8 @@ MYSQL_DATABASE=your_database
40
35
```
41
36
42
37
## Usage
43
-
44
38
### With Claude Desktop
45
-
46
39
Add this to your `claude_desktop_config.json`:
47
-
48
40
```json
49
41
{
50
42
"mcpServers": {
@@ -68,45 +60,41 @@ Add this to your `claude_desktop_config.json`:
68
60
}
69
61
```
70
62
71
-
### As a standalone server
63
+
### Debugging with MCP Inspector
64
+
While MySQL MCP Server isn't intended to be run standalone or directly from the command line with Python, you can use the MCP Inspector to debug it.
65
+
66
+
The MCP Inspector provides a convenient way to test and debug your MCP implementation:
72
67
73
68
```bash
74
69
# Install dependencies
75
70
pip install -r requirements.txt
76
-
77
-
# Run the server
78
-
python -m mysql_mcp_server
71
+
# Use the MCP Inspector for debugging (do not run directly with Python)
79
72
```
80
73
81
-
## Development
74
+
The MySQL MCP Server is designed to be integrated with AI applications like Claude Desktop and should not be run directly as a standalone Python program.
0 commit comments