-
Notifications
You must be signed in to change notification settings - Fork 46
ci: add eslint #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Contributing to MongoDB MCP Server | ||
|
||
Thank you for your interest in contributing to the MongoDB MCP Server project! This document provides guidelines and instructions for contributing. | ||
|
||
## Project Overview | ||
|
||
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. | ||
|
||
## Development Setup | ||
|
||
### Prerequisites | ||
|
||
- Node.js (v23 or later) | ||
- npm | ||
|
||
### Getting Started | ||
|
||
1. Clone the repository: | ||
|
||
``` | ||
git clone https://github.com/mongodb-labs/mongodb-mcp-server.git | ||
cd mongodb-mcp-server | ||
``` | ||
|
||
2. Install dependencies: | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
3. Add the mcp server to your IDE of choice | ||
```json | ||
{ | ||
"mcpServers": { | ||
"MongoDB": { | ||
"command": "/path/to/mongodb-mcp-server/dist/index.js" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Code Contribution Workflow | ||
|
||
1. Create a new branch for your feature or bugfix: | ||
|
||
``` | ||
git checkout -b feature/your-feature-name | ||
``` | ||
|
||
2. Make your changes, following the code style of the project | ||
|
||
3. Run the inspector and double check your changes: | ||
|
||
``` | ||
npm run inspect | ||
``` | ||
|
||
4. Commit your changes with a descriptive commit message | ||
|
||
## Pull Request Guidelines | ||
|
||
1. Update documentation if necessary | ||
2. Ensure your PR includes only relevant changes | ||
3. Link any related issues in your PR description | ||
4. Keep PRs focused on a single topic | ||
|
||
## Code Standards | ||
|
||
- Use TypeScript for all new code | ||
- Follow the existing code style (indentation, naming conventions, etc.) | ||
- Comment your code when necessary, especially for complex logic | ||
- Use meaningful variable and function names | ||
|
||
## Reporting Issues | ||
|
||
When reporting issues, please include: | ||
|
||
- A clear description of the problem | ||
- Steps to reproduce | ||
- Expected vs. actual behavior | ||
- Version information | ||
- Environment details | ||
|
||
## Adding New Tools | ||
|
||
When adding new tools to the MCP server: | ||
|
||
1. Follow the existing pattern in `server.ts` | ||
2. Define clear parameter schemas using Zod | ||
3. Implement thorough error handling | ||
4. Add proper documentation for the tool | ||
5. Include examples of how to use the tool | ||
|
||
## License | ||
|
||
By contributing to this project, you agree that your contributions will be licensed under the project's license. | ||
|
||
## Questions? | ||
|
||
If you have any questions or need help, please open an issue or reach out to the maintainers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from "eslint/config"; | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import tseslint from "typescript-eslint"; | ||
import eslintConfigPrettier from "eslint-config-prettier/flat"; | ||
|
||
export default defineConfig([ | ||
gagik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ files: ["src/**/*.ts"], plugins: { js }, extends: ["js/recommended"] }, | ||
{ files: ["src/**/*.ts"], languageOptions: { globals: globals.node } }, | ||
tseslint.configs.recommended, | ||
eslintConfigPrettier, | ||
]); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.