Skip to content

Commit 044f259

Browse files
committed
fix: simplify name register
1 parent 2161e02 commit 044f259

13 files changed

+329
-300
lines changed

Diff for: .DS_Store

2 KB
Binary file not shown.

Diff for: .cursor/mcp-example.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"mcpServers": {
3+
"demo-sse": {
4+
"url": "http://127.0.0.1:9092/sse"
5+
},
6+
"demo-stdio": {
7+
"command": "/Users/harvey/Work/dev/FreePeak/Opensource/db-mcp-server/server",
8+
"args": [
9+
"-t",
10+
"stdio",
11+
"-c",
12+
"/Users/harvey/Work/dev/FreePeak/SaaS/cashflow-core/database_config.json"
13+
]
14+
}
15+
}
16+
}

Diff for: .cursor/mcp.json.example

-13
This file was deleted.

Diff for: .env.example

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Server Configuration
22
SERVER_PORT=9090
33
TRANSPORT_MODE=sse
4-
54
# Logging configuration
65
LOG_LEVEL=info
76

Diff for: CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.1.0] - 2025-03-31
9+
10+
### Changed
11+
- **Simplified tool naming convention**: Removed prefix logic while registering tool names
12+
- Tools now use only the original names without any additional prefixes
13+
- Format is now simply `<tooltype>_<dbID>` (e.g., `query_mysql1`)
14+
- Global tools like `list_databases` have no prefix or suffix
15+
- Removed `MCP_SERVER_NAME` environment variable as it's no longer needed
16+
- Removed `MCP_TOOL_PREFIX` environment variable from Dockerfile
17+
- Updated documentation to reflect new naming convention
18+
19+
### Fixed
20+
- Eliminated duplicate tool registration
21+
- Simplified tool name parsing logic
22+
23+
## [1.0.0] - 2025-03-22
24+
25+
### Added
26+
- Initial release of DB MCP Server
27+
- Multi-database support for MySQL and PostgreSQL
28+
- Database-specific tool generation for each connection
29+
- Support for queries, statements, transactions, schema exploration, and performance analysis
30+
- Support for both STDIO and SSE transport modes
31+
- Docker and Docker Compose deployment options

Diff for: Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ RUN mkdir -p /app/data /app/logs
4040
ENV SERVER_PORT=9092
4141
ENV TRANSPORT_MODE=sse
4242
ENV CONFIG_PATH=/app/config.json
43-
ENV MCP_TOOL_PREFIX=mcp_cashflow_db_mcp_server_sse_
4443

4544
# Expose server port
4645
EXPOSE 9092

Diff for: README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -458,4 +458,38 @@ This project is licensed under the MIT License - see the LICENSE file for detail
458458
<img src="https://img.buymeacoffee.com/button-api/?text=Support DB MCP Server&emoji=☕&slug=linhdmn&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"
459459
alt="Buy Me A Coffee"/>
460460
</a>
461-
</p>
461+
</p>
462+
463+
## Tool Naming Convention
464+
465+
Tools are registered with simple, straightforward names based on the tool type and database ID:
466+
467+
```
468+
<tooltype>_<dbID>
469+
```
470+
471+
For example: `query_mysql1`, `schema_postgres1`, or just `list_databases` for the database listing tool.
472+
473+
These simple names make it easier for clients to use the tools directly, without complex prefixes or unnecessary duplication.
474+
475+
## Cursor Integration
476+
477+
### Cursor Configuration
478+
479+
In your Cursor configuration (`~/.cursor/mcp.json`), you should have a configuration like:
480+
481+
```json
482+
{
483+
"mcpServers": {
484+
"db-mcp-server-stdio": {
485+
"command": "/path/to/db-mcp-server/server",
486+
"args": [
487+
"-t",
488+
"stdio",
489+
"-c",
490+
"/path/to/database_config.json"
491+
]
492+
}
493+
}
494+
}
495+
```

Diff for: assets/logo.svg

+51-60
Loading

0 commit comments

Comments
 (0)