Skip to content

Commit 1726ad1

Browse files
Update README.md
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
1 parent 10c7f86 commit 1726ad1

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

README.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
![Tests](https://github.com/designcomputer/mysql_mcp_server/actions/workflows/test.yml/badge.svg)
22
[![smithery badge](https://smithery.ai/badge/mysql-mcp-server)](https://smithery.ai/server/mysql-mcp-server)
33
# MySQL MCP Server
4+
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.
45

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.
67
78
## Features
8-
99
- List available MySQL tables as resources
1010
- Read table contents
1111
- Execute SQL queries with proper error handling
1212
- Secure database access through environment variables
1313
- Comprehensive logging
1414

1515
## Installation
16-
1716
### Manual Installation
1817
```bash
1918
pip install mysql-mcp-server
2019
```
2120

2221
### 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):
2623
```bash
2724
npx -y @smithery/cli install mysql-mcp-server --client claude
2825
```
2926

3027
## Configuration
31-
3228
Set the following environment variables:
33-
3429
```bash
3530
MYSQL_HOST=localhost # Database host
3631
MYSQL_PORT=3306 # Optional: Database port (defaults to 3306 if not specified)
@@ -40,11 +35,8 @@ MYSQL_DATABASE=your_database
4035
```
4136

4237
## Usage
43-
4438
### With Claude Desktop
45-
4639
Add this to your `claude_desktop_config.json`:
47-
4840
```json
4941
{
5042
"mcpServers": {
@@ -68,45 +60,41 @@ Add this to your `claude_desktop_config.json`:
6860
}
6961
```
7062

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:
7267

7368
```bash
7469
# Install dependencies
7570
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)
7972
```
8073

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.
8275

76+
## Development
8377
```bash
8478
# Clone the repository
8579
git clone https://github.com/yourusername/mysql_mcp_server.git
8680
cd mysql_mcp_server
87-
8881
# Create virtual environment
8982
python -m venv venv
9083
source venv/bin/activate # or `venv\Scripts\activate` on Windows
91-
9284
# Install development dependencies
9385
pip install -r requirements-dev.txt
94-
9586
# Run tests
9687
pytest
9788
```
9889

9990
## Security Considerations
100-
10191
- Never commit environment variables or credentials
10292
- Use a database user with minimal required permissions
10393
- Consider implementing query whitelisting for production use
10494
- Monitor and log all database operations
10595

10696
## Security Best Practices
107-
108-
This MCP server requires database access to function. For security:
109-
97+
This MCP implementation requires database access to function. For security:
11098
1. **Create a dedicated MySQL user** with minimal permissions
11199
2. **Never use root credentials** or administrative accounts
112100
3. **Restrict database access** to only necessary operations
@@ -122,11 +110,9 @@ See [MySQL Security Configuration Guide](https://github.com/designcomputer/mysql
122110
⚠️ IMPORTANT: Always follow the principle of least privilege when configuring database access.
123111

124112
## License
125-
126113
MIT License - see LICENSE file for details.
127114

128115
## Contributing
129-
130116
1. Fork the repository
131117
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
132118
3. Commit your changes (`git commit -m 'Add some amazing feature'`)

0 commit comments

Comments
 (0)