Skip to content

Commit 0becdaa

Browse files
authored
chore: remove configFile and state.json (#60)
1 parent 23d1631 commit 0becdaa

21 files changed

+138
-422
lines changed

README.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
157157

158158
1. Command-line arguments
159159
2. Environment variables
160-
3. Configuration file
161-
4. Default values
162160

163161
### Configuration Options
164162

@@ -167,6 +165,12 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
167165
| `apiClientId` | Atlas API client ID for authentication |
168166
| `apiClientSecret` | Atlas API client secret for authentication |
169167
| `connectionString` | MongoDB connection string for direct database connections (optional users may choose to inform it on every tool call) |
168+
| `logPath` | Folder to store logs |
169+
170+
**Default Log Path:**
171+
172+
- Windows: `%LOCALAPPDATA%\mongodb\mongodb-mcp\.app-logs`
173+
- macOS/Linux: `~/.mongodb/mongodb-mcp/.app-logs`
170174

171175
### Atlas API Access
172176

@@ -195,23 +199,6 @@ To use the Atlas API tools, you'll need to create a service account in MongoDB A
195199

196200
### Configuration Methods
197201

198-
#### Configuration File
199-
200-
Create a JSON configuration file at one of these locations:
201-
202-
- Linux/macOS: `/etc/mongodb-mcp.conf`
203-
- Windows: `%LOCALAPPDATA%\mongodb\mongodb-mcp\mongodb-mcp.conf`
204-
205-
Example configuration file:
206-
207-
```json
208-
{
209-
"apiClientId": "your-atlas-client-id",
210-
"apiClientSecret": "your-atlas-client-secret",
211-
"connectionString": "mongodb+srv://username:[email protected]/myDatabase"
212-
}
213-
```
214-
215202
#### Environment Variables
216203

217204
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"
223210

224211
# Set a custom MongoDB connection string
225212
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:[email protected]/myDatabase"
213+
214+
export MDB_MCP_LOG_PATH="/path/to/logs"
226215
```
227216

228217
#### Command-Line Arguments
229218

230219
Pass configuration options as command-line arguments when starting the server:
231220

232221
```shell
233-
node dist/index.js --apiClientId="your-atlas-client-id" --apiClientSecret="your-atlas-client-secret" --connectionString="mongodb+srv://username:[email protected]/myDatabase"
222+
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
234223
```
235224

236225
## 🤝 Contributing

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"dependencies": {
6161
"@mongodb-js/devtools-connect": "^3.7.2",
6262
"@mongosh/service-provider-node-driver": "^3.6.0",
63-
"@napi-rs/keyring": "^1.1.6",
6463
"@types/express": "^5.0.1",
6564
"bson": "^6.10.3",
6665
"mongodb": "^6.15.0",

0 commit comments

Comments
 (0)