Skip to content

Commit 5275369

Browse files
committed
Merge main
2 parents 99c3e54 + a1f101f commit 5275369

File tree

11 files changed

+3910
-118
lines changed

11 files changed

+3910
-118
lines changed

.github/workflows/code_health.yaml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
- uses: actions/setup-node@v4
1818
with:
1919
node-version-file: package.json
20-
- name: install dependencies
20+
cache: "npm"
21+
- name: Install dependencies
2122
run: |
2223
npm ci
2324
- name: build
@@ -37,22 +38,36 @@ jobs:
3738
exit 1
3839
fi
3940
prettier:
40-
name: Prettier Check
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
4444
with:
4545
config: ${{ vars.PERMISSIONS_CONFIG }}
4646
- name: Checkout Repository
4747
uses: actions/checkout@v2
48-
- name: Run Prettier
49-
id: prettier-run
50-
uses: rutajdash/prettier-cli-action@d42c4325a3b344f3bd4be482bc34de521998d557
48+
- uses: actions/setup-node@v4
5149
with:
52-
config_path: ./.prettierrc.yml
53-
- name: Prettier Output
54-
if: ${{ failure() }}
55-
shell: bash
50+
node-version-file: package.json
51+
cache: "npm"
52+
- name: Install dependencies
5653
run: |
57-
echo "The following files are not formatted:"
58-
echo "${{steps.prettier-run.outputs.prettier_output}}"
54+
npm ci
55+
- run: |
56+
npm run check:format
57+
eslint:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
61+
with:
62+
config: ${{ vars.PERMISSIONS_CONFIG }}
63+
- name: Checkout Repository
64+
uses: actions/checkout@v4
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version-file: package.json
68+
cache: "npm"
69+
- name: Install dependencies
70+
run: |
71+
npm ci
72+
- run: |
73+
npm run check:lint

CONTRIBUTING.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Contributing to MongoDB MCP Server
2+
3+
Thank you for your interest in contributing to the MongoDB MCP Server project! This document provides guidelines and instructions for contributing.
4+
5+
## Project Overview
6+
7+
This project implements a Model Context Protocol (MCP) server for MongoDB and MongoDB Atlas, enabling AI assistants to interact with MongoDB Atlas resources through natural language.
8+
9+
## Development Setup
10+
11+
### Prerequisites
12+
13+
- Node.js (v23 or later)
14+
- npm
15+
16+
### Getting Started
17+
18+
1. Clone the repository:
19+
20+
```
21+
git clone https://github.com/mongodb-labs/mongodb-mcp-server.git
22+
cd mongodb-mcp-server
23+
```
24+
25+
2. Install dependencies:
26+
27+
```
28+
npm install
29+
```
30+
31+
3. Add the mcp server to your IDE of choice
32+
```json
33+
{
34+
"mcpServers": {
35+
"MongoDB": {
36+
"command": "/path/to/mongodb-mcp-server/dist/index.js"
37+
}
38+
}
39+
}
40+
```
41+
42+
## Code Contribution Workflow
43+
44+
1. Create a new branch for your feature or bugfix:
45+
46+
```
47+
git checkout -b feature/your-feature-name
48+
```
49+
50+
2. Make your changes, following the code style of the project
51+
52+
3. Run the inspector and double check your changes:
53+
54+
```
55+
npm run inspect
56+
```
57+
58+
4. Commit your changes with a descriptive commit message
59+
60+
## Pull Request Guidelines
61+
62+
1. Update documentation if necessary
63+
2. Ensure your PR includes only relevant changes
64+
3. Link any related issues in your PR description
65+
4. Keep PRs focused on a single topic
66+
67+
## Code Standards
68+
69+
- Use TypeScript for all new code
70+
- Follow the existing code style (indentation, naming conventions, etc.)
71+
- Comment your code when necessary, especially for complex logic
72+
- Use meaningful variable and function names
73+
74+
## Reporting Issues
75+
76+
When reporting issues, please include:
77+
78+
- A clear description of the problem
79+
- Steps to reproduce
80+
- Expected vs. actual behavior
81+
- Version information
82+
- Environment details
83+
84+
## Adding New Tools
85+
86+
When adding new tools to the MCP server:
87+
88+
1. Follow the existing pattern in `server.ts`
89+
2. Define clear parameter schemas using Zod
90+
3. Implement thorough error handling
91+
4. Add proper documentation for the tool
92+
5. Include examples of how to use the tool
93+
94+
## License
95+
96+
By contributing to this project, you agree that your contributions will be licensed under the project's license.
97+
98+
## Questions?
99+
100+
If you have any questions or need help, please open an issue or reach out to the maintainers.

dist/client.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

100644100755
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/server.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)