-
Notifications
You must be signed in to change notification settings - Fork 108
chore: remove configFile and state.json #60
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 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3a56da3
chore: remove configFile and state.json
fmenezes 15e9e5b
fix: styles
fmenezes 7d68929
fix: address comments
fmenezes c8f8958
fix: address comments
fmenezes 616a32e
refactor: move apiClient into state
fmenezes 3b3fe79
fix: logs before server
fmenezes 2eae0de
fix: remove unneeded config
fmenezes 594c644
dep: remove @napi-rs/keyring
fmenezes 5b899e3
fix: tests
fmenezes 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,8 +157,6 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow | |
|
||
1. Command-line arguments | ||
2. Environment variables | ||
3. Configuration file | ||
4. Default values | ||
|
||
### Configuration Options | ||
|
||
|
@@ -167,6 +165,12 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow | |
| `apiClientId` | Atlas API client ID for authentication | | ||
| `apiClientSecret` | Atlas API client secret for authentication | | ||
| `connectionString` | MongoDB connection string for direct database connections (optional users may choose to inform it on every tool call) | | ||
| `logPath` | Folder to store logs | | ||
|
||
**Default Log Path:** | ||
|
||
- Windows: `%LOCALAPPDATA%\mongodb\mongodb-mcp\.app-logs` | ||
- macOS/Linux: `~/.mongodb/mongodb-mcp/.app-logs` | ||
|
||
### Atlas API Access | ||
|
||
|
@@ -195,23 +199,6 @@ To use the Atlas API tools, you'll need to create a service account in MongoDB A | |
|
||
### Configuration Methods | ||
|
||
#### Configuration File | ||
|
||
Create a JSON configuration file at one of these locations: | ||
|
||
- Linux/macOS: `/etc/mongodb-mcp.conf` | ||
- Windows: `%LOCALAPPDATA%\mongodb\mongodb-mcp\mongodb-mcp.conf` | ||
|
||
Example configuration file: | ||
|
||
```json | ||
{ | ||
"apiClientId": "your-atlas-client-id", | ||
"apiClientSecret": "your-atlas-client-secret", | ||
"connectionString": "mongodb+srv://username:[email protected]/myDatabase" | ||
} | ||
``` | ||
|
||
#### Environment Variables | ||
|
||
Set environment variables with the prefix `MDB_MCP_` followed by the option name in uppercase with underscores: | ||
|
@@ -223,14 +210,16 @@ export MDB_MCP_API_CLIENT_SECRET="your-atlas-client-secret" | |
|
||
# Set a custom MongoDB connection string | ||
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:[email protected]/myDatabase" | ||
|
||
export MDB_MCP_LOG_PATH="/path/to/logs" | ||
``` | ||
|
||
#### Command-Line Arguments | ||
|
||
Pass configuration options as command-line arguments when starting the server: | ||
|
||
```shell | ||
node dist/index.js --apiClientId="your-atlas-client-id" --apiClientSecret="your-atlas-client-secret" --connectionString="mongodb+srv://username:[email protected]/myDatabase" | ||
node dist/index.js --apiClientId="your-atlas-client-id" --apiClientSecret="your-atlas-client-secret" --connectionString="mongodb+srv://username:[email protected]/myDatabase" --logPath=/path/to/logs | ||
``` | ||
|
||
## 🤝 Contributing | ||
|
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this package dependency if we're not going to use it.