mcp-postgresql-ops 3.3.1__tar.gz → 3.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_postgresql_ops-3.3.3/.env.example +44 -0
- mcp_postgresql_ops-3.3.3/.github/CONTRIBUTING.md +275 -0
- mcp_postgresql_ops-3.3.3/.github/FUNDING.yml +3 -0
- mcp_postgresql_ops-3.3.3/.github/ISSUE_TEMPLATE/bug_report.md +83 -0
- mcp_postgresql_ops-3.3.3/.github/ISSUE_TEMPLATE/config.yml +17 -0
- mcp_postgresql_ops-3.3.3/.github/ISSUE_TEMPLATE/documentation.md +59 -0
- mcp_postgresql_ops-3.3.3/.github/ISSUE_TEMPLATE/feature_request.md +77 -0
- mcp_postgresql_ops-3.3.3/.github/ISSUE_TEMPLATE/question.md +24 -0
- mcp_postgresql_ops-3.3.3/.github/copilot-instructions.md +183 -0
- mcp_postgresql_ops-3.3.3/.github/dependabot.yml +58 -0
- mcp_postgresql_ops-3.3.3/.github/pull_request_template.md +91 -0
- mcp_postgresql_ops-3.3.3/.github/workflows/pypi-publish.yml +73 -0
- mcp_postgresql_ops-3.3.3/.github/workflows/test.yml +81 -0
- mcp_postgresql_ops-3.3.3/.gitignore +19 -0
- mcp_postgresql_ops-3.3.3/.gitleaks.toml +11 -0
- mcp_postgresql_ops-3.3.3/.pre-commit-config.yaml +5 -0
- mcp_postgresql_ops-3.3.3/.python-version +1 -0
- mcp_postgresql_ops-3.3.3/Dockerfile.MCP-Server +31 -0
- mcp_postgresql_ops-3.3.3/Dockerfile.MCPO-Proxy +20 -0
- {mcp_postgresql_ops-3.3.1/src/mcp_postgresql_ops.egg-info → mcp_postgresql_ops-3.3.3}/PKG-INFO +2 -2
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/README.md +0 -1
- mcp_postgresql_ops-3.3.3/SECURITY.md +141 -0
- mcp_postgresql_ops-3.3.3/_config.yml +3 -0
- mcp_postgresql_ops-3.3.3/_includes/head-custom-google-analytics.html +8 -0
- mcp_postgresql_ops-3.3.3/build-mcp-server-docker-image.sh +33 -0
- mcp_postgresql_ops-3.3.3/build-mcpo-server-docker-image.sh +33 -0
- mcp_postgresql_ops-3.3.3/docker-compose.custom-db.yml +56 -0
- mcp_postgresql_ops-3.3.3/docker-compose.yml +127 -0
- mcp_postgresql_ops-3.3.3/img/MCP-Workflow-of-Quickstart-Tutorial.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-000.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-001.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-002.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-004.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-005.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-claude-desktop-airflow-connections-html.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-claude-desktop-mermaid-diagram.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-claude-desktop-question-001.png +0 -0
- mcp_postgresql_ops-3.3.3/img/screenshot-swagger-api.png +0 -0
- mcp_postgresql_ops-3.3.3/main.py +6 -0
- mcp_postgresql_ops-3.3.3/mcp-config.json.http +11 -0
- mcp_postgresql_ops-3.3.3/mcp-config.json.stdio +15 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/pyproject.toml +7 -2
- mcp_postgresql_ops-3.3.3/run-mcp-inspector-local.sh +25 -0
- mcp_postgresql_ops-3.3.3/run-mcp-inspector-pypi.sh +20 -0
- mcp_postgresql_ops-3.3.3/scripts/create-test-data.sh +107 -0
- mcp_postgresql_ops-3.3.3/scripts/create-test-data.sql +385 -0
- mcp_postgresql_ops-3.3.3/scripts/enable-pgsql-extensions.sh +9 -0
- mcp_postgresql_ops-3.3.3/scripts/mcp-server-docker-cmd.sh +40 -0
- mcp_postgresql_ops-3.3.3/src/mcp_postgresql_ops/prompt_template.md +574 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3/src/mcp_postgresql_ops.egg-info}/PKG-INFO +2 -2
- mcp_postgresql_ops-3.3.3/src/mcp_postgresql_ops.egg-info/SOURCES.txt +68 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops.egg-info/requires.txt +1 -0
- mcp_postgresql_ops-3.3.3/tests/__init__.py +0 -0
- mcp_postgresql_ops-3.3.3/tests/conftest.py +176 -0
- mcp_postgresql_ops-3.3.3/tests/docker/docker-compose.test.yml +163 -0
- mcp_postgresql_ops-3.3.3/tests/docker/init-test-db.sql +146 -0
- mcp_postgresql_ops-3.3.3/uv.lock +1414 -0
- mcp_postgresql_ops-3.3.1/src/mcp_postgresql_ops.egg-info/SOURCES.txt +0 -17
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/LICENSE +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/MANIFEST.in +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/setup.cfg +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops/__init__.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops/__main__.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops/functions.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops/mcp_main.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops/version_compat.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops.egg-info/dependency_links.txt +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops.egg-info/entry_points.txt +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/src/mcp_postgresql_ops.egg-info/top_level.txt +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/tests/test_tools_integration.py +0 -0
- {mcp_postgresql_ops-3.3.1 → mcp_postgresql_ops-3.3.3}/tests/test_version_compat.py +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Commons
|
|
2
|
+
PYTHONPATH=/app/src
|
|
3
|
+
|
|
4
|
+
# MCP Server Configuration
|
|
5
|
+
# Transport 설정 : streamable-http 모드
|
|
6
|
+
FASTMCP_TYPE=streamable-http
|
|
7
|
+
FASTMCP_HOST=0.0.0.0
|
|
8
|
+
FASTMCP_PORT=8000
|
|
9
|
+
|
|
10
|
+
# 로깅 레벨 설정
|
|
11
|
+
MCP_LOG_LEVEL=INFO
|
|
12
|
+
|
|
13
|
+
# =============================================================================
|
|
14
|
+
# Remote Authentication Settings (for streamable-http mode)
|
|
15
|
+
# =============================================================================
|
|
16
|
+
# Enable Bearer token authentication for streamable-http transport
|
|
17
|
+
# Default: false (if not defined or empty, defaults to false)
|
|
18
|
+
# Values: true/false, 1/0, yes/no, on/off (case insensitive)
|
|
19
|
+
# WARNING: If REMOTE_AUTH_ENABLE=false, the server will accept requests without authentication!
|
|
20
|
+
REMOTE_AUTH_ENABLE=false
|
|
21
|
+
# Secret key for Bearer token authentication (required when REMOTE_AUTH_ENABLE=true)
|
|
22
|
+
# Default: empty string (if not defined, authentication will be disabled even if REMOTE_AUTH_ENABLE=true)
|
|
23
|
+
# Recommendation: Use strong, randomly generated secret keys (32+ characters)
|
|
24
|
+
REMOTE_SECRET_KEY=my-test-secret-key-12345
|
|
25
|
+
|
|
26
|
+
### PostgreSQL Configuration
|
|
27
|
+
PGSQL_VERSION=16
|
|
28
|
+
PGDATA=/data/db ### Don't change...
|
|
29
|
+
POSTGRES_MAX_CONNECTIONS=200
|
|
30
|
+
|
|
31
|
+
#### PostgreSQL Host Configuration:
|
|
32
|
+
#--------------------------------------------
|
|
33
|
+
POSTGRES_HOST=host.docker.internal
|
|
34
|
+
POSTGRES_PORT=15432
|
|
35
|
+
POSTGRES_USER=postgres
|
|
36
|
+
POSTGRES_PASSWORD=changeme!@34
|
|
37
|
+
POSTGRES_DB=ecommerce
|
|
38
|
+
#--------------------------------------------
|
|
39
|
+
|
|
40
|
+
# Docker Env.
|
|
41
|
+
DOCKER_EXTERNAL_PORT_OPENWEBUI=3003
|
|
42
|
+
DOCKER_EXTERNAL_PORT_MCP_SERVER=18003
|
|
43
|
+
DOCKER_EXTERNAL_PORT_MCPO_PROXY=8003
|
|
44
|
+
DOCKER_INTERNAL_PORT_POSTGRESQL=5432
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Contributing to MCP PostgreSQL Operations
|
|
2
|
+
|
|
3
|
+
🎉 Thank you for your interest in contributing to MCP PostgreSQL Operations! Whether you're fixing a bug, adding a new monitoring tool, or improving documentation, your contributions make this project better for everyone.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- PostgreSQL 12+ (for testing)
|
|
10
|
+
- Python 3.12
|
|
11
|
+
- UV package manager
|
|
12
|
+
- Git
|
|
13
|
+
|
|
14
|
+
### Development Setup
|
|
15
|
+
|
|
16
|
+
1. **Fork and clone the repository:**
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/YOUR-USERNAME/MCP-PostgreSQL-Ops.git
|
|
19
|
+
cd MCP-PostgreSQL-Ops
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. **Set up the development environment:**
|
|
23
|
+
```bash
|
|
24
|
+
cp .env.example .env
|
|
25
|
+
# Edit .env with your PostgreSQL connection details
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. **Start the test environment:**
|
|
29
|
+
```bash
|
|
30
|
+
docker-compose up -d
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Test the setup:**
|
|
34
|
+
```bash
|
|
35
|
+
./scripts/run-mcp-inspector-local.sh
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Ways to Contribute
|
|
39
|
+
|
|
40
|
+
### � Using Issue Templates
|
|
41
|
+
|
|
42
|
+
When you click "New Issue" on GitHub, you'll see a template selection page with these options:
|
|
43
|
+
- **🐛 Bug Report** - Report bugs with detailed PostgreSQL environment information
|
|
44
|
+
- **💡 Feature Request** - Suggest new monitoring tools or improvements with PostgreSQL-specific requirements
|
|
45
|
+
- **📚 Documentation** - Report documentation issues or suggest improvements
|
|
46
|
+
- **❓ Question** - Ask general questions about setup, usage, or PostgreSQL compatibility
|
|
47
|
+
|
|
48
|
+
You'll also find quick links to:
|
|
49
|
+
- **🔒 Security Issues** - Report security vulnerabilities privately
|
|
50
|
+
- **💬 GitHub Discussions** - Community discussions and advanced usage strategies
|
|
51
|
+
- **📖 Documentation** - README with setup guides and examples
|
|
52
|
+
- **🧪 MCP Inspector** - Local testing and debugging information
|
|
53
|
+
- **🗂️ Tool Compatibility Matrix** - PostgreSQL version compatibility reference
|
|
54
|
+
|
|
55
|
+
> **💡 Tip**: For security vulnerabilities related to database access or potential SQL injection, always use the Security Advisories feature instead of public issues.
|
|
56
|
+
|
|
57
|
+
### �🐛 Bug Reports
|
|
58
|
+
|
|
59
|
+
**Use the [Bug Report template](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=bug_report.md)** to report issues.
|
|
60
|
+
|
|
61
|
+
The template will guide you to include:
|
|
62
|
+
- PostgreSQL version and environment details
|
|
63
|
+
- Steps to reproduce the issue
|
|
64
|
+
- Expected vs actual behavior
|
|
65
|
+
- Error messages or logs
|
|
66
|
+
- MCP server configuration used
|
|
67
|
+
|
|
68
|
+
### 💡 Feature Requests
|
|
69
|
+
|
|
70
|
+
**Use the [Feature Request template](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=feature_request.md)** to suggest improvements.
|
|
71
|
+
|
|
72
|
+
We welcome suggestions for:
|
|
73
|
+
- New PostgreSQL monitoring tools
|
|
74
|
+
- Additional database analysis features
|
|
75
|
+
- Performance improvements
|
|
76
|
+
- Documentation enhancements
|
|
77
|
+
|
|
78
|
+
The template will help you provide:
|
|
79
|
+
- The use case or problem you're trying to solve
|
|
80
|
+
- Your proposed solution
|
|
81
|
+
- PostgreSQL-specific requirements
|
|
82
|
+
- Expected output format and usage examples
|
|
83
|
+
|
|
84
|
+
### 🔧 Code Contributions
|
|
85
|
+
|
|
86
|
+
#### Adding New MCP Tools
|
|
87
|
+
|
|
88
|
+
The codebase is designed to be developer-friendly. To add a new monitoring tool:
|
|
89
|
+
|
|
90
|
+
1. **Add your function to `src/mcp_postgresql_ops/mcp_main.py`:**
|
|
91
|
+
```python
|
|
92
|
+
@mcp.tool()
|
|
93
|
+
def get_your_new_tool(
|
|
94
|
+
parameter1: str = "default_value",
|
|
95
|
+
parameter2: int = 10
|
|
96
|
+
) -> list[dict]:
|
|
97
|
+
"""
|
|
98
|
+
Brief description of what this tool does.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
parameter1: Description of parameter1
|
|
102
|
+
parameter2: Description of parameter2
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
List of dictionaries with monitoring data
|
|
106
|
+
"""
|
|
107
|
+
# Your implementation here
|
|
108
|
+
pass
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
2. **Follow these patterns:**
|
|
112
|
+
- Use descriptive function names starting with `get_`
|
|
113
|
+
- Include comprehensive docstrings
|
|
114
|
+
- Handle PostgreSQL version compatibility
|
|
115
|
+
- Return structured data (list of dictionaries)
|
|
116
|
+
- Use read-only queries only
|
|
117
|
+
|
|
118
|
+
3. **Test across PostgreSQL versions:**
|
|
119
|
+
- Test with PostgreSQL 12, 15, 16, 17 if possible
|
|
120
|
+
- Ensure graceful degradation for version-specific features
|
|
121
|
+
- Update the Tool Compatibility Matrix in README
|
|
122
|
+
|
|
123
|
+
#### Code Style Guidelines
|
|
124
|
+
|
|
125
|
+
- **Python**: Follow PEP 8 standards
|
|
126
|
+
- **SQL**: Use uppercase for SQL keywords, lowercase for identifiers
|
|
127
|
+
- **Comments**: Explain complex logic and PostgreSQL-specific behavior
|
|
128
|
+
- **Error handling**: Provide meaningful error messages
|
|
129
|
+
- **Version compatibility**: Always consider PostgreSQL version differences
|
|
130
|
+
|
|
131
|
+
#### Testing Your Changes
|
|
132
|
+
|
|
133
|
+
1. **Manual testing:**
|
|
134
|
+
```bash
|
|
135
|
+
# Test with local development
|
|
136
|
+
python -m src.mcp_postgresql_ops.mcp_main --log-level DEBUG
|
|
137
|
+
|
|
138
|
+
# Test with MCP Inspector
|
|
139
|
+
./scripts/run-mcp-inspector-local.sh
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
2. **Version compatibility testing:**
|
|
143
|
+
- Test against different PostgreSQL versions
|
|
144
|
+
- Verify tool behavior with and without extensions
|
|
145
|
+
- Check error handling for unsupported features
|
|
146
|
+
|
|
147
|
+
### 📚 Documentation
|
|
148
|
+
|
|
149
|
+
**Use the [Documentation Issue template](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=documentation.md)** to report documentation problems.
|
|
150
|
+
|
|
151
|
+
Help improve our documentation by:
|
|
152
|
+
- Fixing typos or unclear explanations
|
|
153
|
+
- Adding usage examples
|
|
154
|
+
- Improving tool descriptions
|
|
155
|
+
- Updating compatibility information
|
|
156
|
+
|
|
157
|
+
## PostgreSQL-Specific Guidelines
|
|
158
|
+
|
|
159
|
+
### Version Compatibility
|
|
160
|
+
|
|
161
|
+
- **Support PostgreSQL 12-17**
|
|
162
|
+
- Use version detection: `get_postgresql_version()`
|
|
163
|
+
- Handle version-specific features gracefully
|
|
164
|
+
- Update compatibility matrix when adding features
|
|
165
|
+
|
|
166
|
+
### Query Guidelines
|
|
167
|
+
|
|
168
|
+
- **Read-only operations only** - no data modification
|
|
169
|
+
- Use system catalogs and statistics views
|
|
170
|
+
- Handle missing extensions gracefully
|
|
171
|
+
- Optimize for performance on production systems
|
|
172
|
+
- Mask sensitive information in outputs
|
|
173
|
+
|
|
174
|
+
### Extension Handling
|
|
175
|
+
|
|
176
|
+
- Most tools should work without extensions
|
|
177
|
+
- For `pg_stat_statements` dependent features, check availability first
|
|
178
|
+
- Provide fallback behavior when extensions are missing
|
|
179
|
+
- Document extension requirements clearly
|
|
180
|
+
|
|
181
|
+
## Submitting Changes
|
|
182
|
+
|
|
183
|
+
### Pull Request Process
|
|
184
|
+
|
|
185
|
+
1. **Create a feature branch:**
|
|
186
|
+
```bash
|
|
187
|
+
git checkout -b feature/your-feature-name
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
2. **Make your changes:**
|
|
191
|
+
- Follow the coding guidelines
|
|
192
|
+
- Add or update tests if applicable
|
|
193
|
+
- Update documentation as needed
|
|
194
|
+
|
|
195
|
+
3. **Test thoroughly:**
|
|
196
|
+
- Test with multiple PostgreSQL versions
|
|
197
|
+
- Verify backward compatibility
|
|
198
|
+
- Check error handling
|
|
199
|
+
|
|
200
|
+
4. **Commit with clear messages:**
|
|
201
|
+
```bash
|
|
202
|
+
git commit -m "Add tool for monitoring connection pooling
|
|
203
|
+
|
|
204
|
+
- New get_connection_pool_stats function
|
|
205
|
+
- Compatible with PostgreSQL 12-17
|
|
206
|
+
- Handles missing pg_stat_statements gracefully"
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
5. **Push and create PR:**
|
|
210
|
+
```bash
|
|
211
|
+
git push origin feature/your-feature-name
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Then create a Pull Request using our [PR template](https://github.com/call518/MCP-PostgreSQL-Ops/compare) which will guide you through the submission process.
|
|
215
|
+
|
|
216
|
+
### Pull Request Guidelines
|
|
217
|
+
|
|
218
|
+
Our **Pull Request template** will help you provide:
|
|
219
|
+
- **Clear title and description**
|
|
220
|
+
- **PostgreSQL compatibility information**
|
|
221
|
+
- **Testing details and environment info**
|
|
222
|
+
- **Documentation updates checklist**
|
|
223
|
+
- **Security considerations**
|
|
224
|
+
|
|
225
|
+
The template ensures all necessary information is included for efficient review.
|
|
226
|
+
|
|
227
|
+
## Community Guidelines
|
|
228
|
+
|
|
229
|
+
### Code of Conduct
|
|
230
|
+
|
|
231
|
+
- Be respectful and inclusive
|
|
232
|
+
- Welcome newcomers and questions
|
|
233
|
+
- Focus on constructive feedback
|
|
234
|
+
- Help others learn PostgreSQL monitoring concepts
|
|
235
|
+
|
|
236
|
+
### Getting Help
|
|
237
|
+
|
|
238
|
+
- **🐛 [Bug Reports](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=bug_report.md)**: For bugs and technical issues
|
|
239
|
+
- **💡 [Feature Requests](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=feature_request.md)**: For new features and enhancements
|
|
240
|
+
- **📚 [Documentation Issues](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=documentation.md)**: For documentation problems
|
|
241
|
+
- **❓ [Questions](https://github.com/call518/MCP-PostgreSQL-Ops/issues/new?template=question.md)**: For general questions and support
|
|
242
|
+
- **💬 [Discussions](https://github.com/call518/MCP-PostgreSQL-Ops/discussions)**: For broader discussions and community interaction
|
|
243
|
+
|
|
244
|
+
## Recognition
|
|
245
|
+
|
|
246
|
+
Contributors are recognized in:
|
|
247
|
+
- Project documentation
|
|
248
|
+
- Release notes
|
|
249
|
+
- Special thanks for significant contributions
|
|
250
|
+
|
|
251
|
+
## PostgreSQL Expertise Levels
|
|
252
|
+
|
|
253
|
+
Don't worry if you're not a PostgreSQL expert! Contributions are welcome at all levels:
|
|
254
|
+
- **Beginners**: Documentation, testing, simple bug fixes
|
|
255
|
+
- **Intermediate**: New monitoring tools, compatibility improvements
|
|
256
|
+
- **Advanced**: Complex performance analysis features, version-specific optimizations
|
|
257
|
+
|
|
258
|
+
## Development Tips
|
|
259
|
+
|
|
260
|
+
### Understanding the Codebase
|
|
261
|
+
|
|
262
|
+
- **`mcp_main.py`**: Main MCP server implementation
|
|
263
|
+
- **`functions.py`**: Database utility functions
|
|
264
|
+
- **`version_compat.py`**: PostgreSQL version compatibility helpers
|
|
265
|
+
- **`scripts/`**: Development and testing utilities
|
|
266
|
+
|
|
267
|
+
### PostgreSQL Testing Resources
|
|
268
|
+
|
|
269
|
+
- Use the included test data (`scripts/create-test-data.sql`)
|
|
270
|
+
- Test with different user permissions (superuser vs regular user)
|
|
271
|
+
- Verify behavior on RDS/Aurora environments when possible
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
Thank you for contributing to MCP PostgreSQL Operations! Your efforts help make PostgreSQL monitoring more accessible to everyone. 🚀
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug to help us improve MCP PostgreSQL Operations
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
<!-- A clear and concise description of what the bug is -->
|
|
11
|
+
|
|
12
|
+
## Steps to Reproduce
|
|
13
|
+
1.
|
|
14
|
+
2.
|
|
15
|
+
3.
|
|
16
|
+
4.
|
|
17
|
+
|
|
18
|
+
## Expected Behavior
|
|
19
|
+
<!-- What you expected to happen -->
|
|
20
|
+
|
|
21
|
+
## Actual Behavior
|
|
22
|
+
<!-- What actually happened -->
|
|
23
|
+
|
|
24
|
+
## Environment Details
|
|
25
|
+
### PostgreSQL Environment
|
|
26
|
+
- **PostgreSQL Version**:
|
|
27
|
+
- **Extensions Installed**:
|
|
28
|
+
- [ ] pg_stat_statements
|
|
29
|
+
- [ ] pg_stat_monitor
|
|
30
|
+
- [ ] Other: ___
|
|
31
|
+
- **Environment Type**:
|
|
32
|
+
- [ ] Self-managed PostgreSQL
|
|
33
|
+
- [ ] Docker container
|
|
34
|
+
- [ ] AWS RDS
|
|
35
|
+
- [ ] AWS Aurora
|
|
36
|
+
- [ ] Google Cloud SQL
|
|
37
|
+
- [ ] Azure Database
|
|
38
|
+
- [ ] Other: ___
|
|
39
|
+
- **User Permissions**:
|
|
40
|
+
- [ ] Superuser
|
|
41
|
+
- [ ] Regular user with pg_read_all_stats
|
|
42
|
+
- [ ] Regular user without special permissions
|
|
43
|
+
- [ ] Other: ___
|
|
44
|
+
|
|
45
|
+
### MCP Server Environment
|
|
46
|
+
- **Installation Method**:
|
|
47
|
+
- [ ] PyPI (uvx)
|
|
48
|
+
- [ ] Local source
|
|
49
|
+
- [ ] Docker
|
|
50
|
+
- **Python Version**:
|
|
51
|
+
- **MCP Server Version**:
|
|
52
|
+
- **Client Used**:
|
|
53
|
+
- [ ] Claude Desktop
|
|
54
|
+
- [ ] Open WebUI
|
|
55
|
+
- [ ] MCP Inspector
|
|
56
|
+
- [ ] Other: ___
|
|
57
|
+
|
|
58
|
+
## Error Messages
|
|
59
|
+
<!-- Include full error messages, stack traces, or logs -->
|
|
60
|
+
```
|
|
61
|
+
[Paste error messages here]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Configuration
|
|
65
|
+
<!-- Share relevant configuration (remove sensitive information) -->
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"env": {
|
|
69
|
+
"POSTGRES_HOST": "localhost",
|
|
70
|
+
"POSTGRES_PORT": "5432",
|
|
71
|
+
"POSTGRES_DB": "your_db"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Additional Context
|
|
77
|
+
<!-- Add any other context about the problem here -->
|
|
78
|
+
- Does this affect all tools or specific ones?
|
|
79
|
+
- When did this start happening?
|
|
80
|
+
- Any recent changes to your environment?
|
|
81
|
+
|
|
82
|
+
## Screenshots
|
|
83
|
+
<!-- If applicable, add screenshots to help explain your problem -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: 🔒 Security Issues
|
|
4
|
+
url: https://github.com/call518/MCP-PostgreSQL-Ops/security/advisories/new
|
|
5
|
+
about: Please report security vulnerabilities privately through GitHub Security Advisories
|
|
6
|
+
- name: 💬 GitHub Discussions
|
|
7
|
+
url: https://github.com/call518/MCP-PostgreSQL-Ops/discussions
|
|
8
|
+
about: Ask questions, share usage examples, and discuss PostgreSQL monitoring strategies with the community
|
|
9
|
+
- name: 📖 Documentation & Setup Guide
|
|
10
|
+
url: https://github.com/call518/MCP-PostgreSQL-Ops#readme
|
|
11
|
+
about: Check the README for installation instructions, compatibility matrix, and comprehensive usage examples
|
|
12
|
+
- name: 🧪 MCP Inspector Testing
|
|
13
|
+
url: https://github.com/call518/MCP-PostgreSQL-Ops#-quickstart-5-minutes
|
|
14
|
+
about: Use MCP Inspector for local testing and debugging of PostgreSQL monitoring tools
|
|
15
|
+
- name: 🗂️ Tool Compatibility Matrix
|
|
16
|
+
url: https://github.com/call518/MCP-PostgreSQL-Ops#tool-compatibility-matrix
|
|
17
|
+
about: Check PostgreSQL version compatibility and extension requirements for specific monitoring tools
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Documentation Issue
|
|
3
|
+
about: Report issues with documentation or suggest documentation improvements
|
|
4
|
+
title: '[DOCS] '
|
|
5
|
+
labels: documentation
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Documentation Issue Type
|
|
10
|
+
<!-- Mark the relevant option with an "x" -->
|
|
11
|
+
- [ ] 📝 Typo or grammatical error
|
|
12
|
+
- [ ] 📚 Missing documentation
|
|
13
|
+
- [ ] 🔗 Broken or incorrect links
|
|
14
|
+
- [ ] 🧩 Unclear or confusing explanation
|
|
15
|
+
- [ ] 📋 Missing examples
|
|
16
|
+
- [ ] 🔄 Outdated information
|
|
17
|
+
- [ ] 🏗️ Structural improvement needed
|
|
18
|
+
- [ ] 🌐 Translation issue
|
|
19
|
+
|
|
20
|
+
## Location
|
|
21
|
+
<!-- Where is the documentation issue located? -->
|
|
22
|
+
- **File**: (e.g., README.md, CONTRIBUTING.md, etc.)
|
|
23
|
+
- **Section**: (e.g., "Features", "Installation", etc.)
|
|
24
|
+
- **Line numbers**: (if applicable)
|
|
25
|
+
- **URL**: (if applicable)
|
|
26
|
+
|
|
27
|
+
## Current Content
|
|
28
|
+
<!-- Quote the current text that needs to be changed -->
|
|
29
|
+
```
|
|
30
|
+
[Current text here]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Suggested Improvement
|
|
34
|
+
<!-- Provide your suggestion for improvement -->
|
|
35
|
+
```
|
|
36
|
+
[Suggested text here]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Additional Context
|
|
40
|
+
<!-- Explain why this change would be helpful -->
|
|
41
|
+
|
|
42
|
+
## Documentation Category
|
|
43
|
+
<!-- What type of documentation is this about? -->
|
|
44
|
+
- [ ] Installation/Setup
|
|
45
|
+
- [ ] Configuration
|
|
46
|
+
- [ ] Usage examples
|
|
47
|
+
- [ ] Tool descriptions
|
|
48
|
+
- [ ] PostgreSQL compatibility
|
|
49
|
+
- [ ] Troubleshooting
|
|
50
|
+
- [ ] Contributing guidelines
|
|
51
|
+
- [ ] API/Tool reference
|
|
52
|
+
- [ ] Architecture/Design
|
|
53
|
+
- [ ] Other: ___
|
|
54
|
+
|
|
55
|
+
## Priority
|
|
56
|
+
- [ ] Critical - blocks users from using the tool
|
|
57
|
+
- [ ] High - causes significant confusion
|
|
58
|
+
- [ ] Medium - minor improvement
|
|
59
|
+
- [ ] Low - cosmetic issue
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new monitoring tool or improvement for MCP PostgreSQL Operations
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Feature Description
|
|
10
|
+
<!-- A clear and concise description of the feature you'd like to see -->
|
|
11
|
+
|
|
12
|
+
## Use Case / Problem
|
|
13
|
+
<!-- What problem would this feature solve? What's your use case? -->
|
|
14
|
+
|
|
15
|
+
## Proposed Solution
|
|
16
|
+
<!-- Describe the solution you'd like to see implemented -->
|
|
17
|
+
|
|
18
|
+
## PostgreSQL Specific Requirements
|
|
19
|
+
### Version Compatibility
|
|
20
|
+
- [ ] Should work on PostgreSQL 12+
|
|
21
|
+
- [ ] PostgreSQL version specific feature (specify versions): ___
|
|
22
|
+
- [ ] Requires specific PostgreSQL extensions: ___
|
|
23
|
+
|
|
24
|
+
### System Views/Tables Needed
|
|
25
|
+
<!-- List the PostgreSQL system views or tables this feature would use -->
|
|
26
|
+
- [ ] pg_stat_activity
|
|
27
|
+
- [ ] pg_stat_statements
|
|
28
|
+
- [ ] pg_stat_monitor
|
|
29
|
+
- [ ] information_schema.*
|
|
30
|
+
- [ ] pg_stat_database
|
|
31
|
+
- [ ] Other: ___
|
|
32
|
+
|
|
33
|
+
### Extension Dependencies
|
|
34
|
+
- [ ] No extensions required
|
|
35
|
+
- [ ] Requires pg_stat_statements
|
|
36
|
+
- [ ] Requires pg_stat_monitor
|
|
37
|
+
- [ ] Requires other extensions: ___
|
|
38
|
+
|
|
39
|
+
## Tool Category
|
|
40
|
+
<!-- What type of monitoring tool would this be? -->
|
|
41
|
+
- [ ] Performance monitoring
|
|
42
|
+
- [ ] Query analysis
|
|
43
|
+
- [ ] Schema/structure analysis
|
|
44
|
+
- [ ] Maintenance operations (VACUUM, etc.)
|
|
45
|
+
- [ ] Connection/session monitoring
|
|
46
|
+
- [ ] Replication monitoring
|
|
47
|
+
- [ ] Storage/capacity analysis
|
|
48
|
+
- [ ] Security/permissions analysis
|
|
49
|
+
- [ ] Other: ___
|
|
50
|
+
|
|
51
|
+
## Expected Output Format
|
|
52
|
+
<!-- Describe what kind of data this tool should return -->
|
|
53
|
+
```
|
|
54
|
+
Example of expected output structure
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Natural Language Queries
|
|
58
|
+
<!-- Provide examples of how users would ask for this information -->
|
|
59
|
+
- "Show me..."
|
|
60
|
+
- "Analyze..."
|
|
61
|
+
- "Find..."
|
|
62
|
+
|
|
63
|
+
## Alternative Solutions
|
|
64
|
+
<!-- Are there existing tools or workarounds you've considered? -->
|
|
65
|
+
|
|
66
|
+
## Implementation Ideas
|
|
67
|
+
<!-- If you have ideas about how this could be implemented, share them -->
|
|
68
|
+
|
|
69
|
+
## Priority
|
|
70
|
+
<!-- How important is this feature to you? -->
|
|
71
|
+
- [ ] Critical - blocking current work
|
|
72
|
+
- [ ] High - would significantly improve workflow
|
|
73
|
+
- [ ] Medium - nice to have
|
|
74
|
+
- [ ] Low - minor improvement
|
|
75
|
+
|
|
76
|
+
## Additional Context
|
|
77
|
+
<!-- Add any other context, screenshots, or examples about the feature request -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Question
|
|
3
|
+
about: Ask a question about using MCP PostgreSQL Operations
|
|
4
|
+
title: '[QUESTION] '
|
|
5
|
+
labels: question
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Question
|
|
10
|
+
<!-- Ask your question clearly and concisely -->
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
<!-- Provide context about what you're trying to accomplish -->
|
|
14
|
+
|
|
15
|
+
## Environment (if relevant)
|
|
16
|
+
- **PostgreSQL Version**:
|
|
17
|
+
- **MCP Installation**: [ ] PyPI [ ] Local source [ ] Docker
|
|
18
|
+
- **Client**: [ ] Claude Desktop [ ] Open WebUI [ ] Other: ___
|
|
19
|
+
|
|
20
|
+
## What You've Tried
|
|
21
|
+
<!-- Describe what you've already attempted -->
|
|
22
|
+
|
|
23
|
+
## Additional Information
|
|
24
|
+
<!-- Any other details that might help us answer your question -->
|