Merge pull request #4 from brave-experiments/sampson-repo-prep
- sets up src/dist directories - configures tsc for project - updates paths for dockerfile - updates outdated deps - creates gitignore
This commit is contained in:
7 files changed
+1560
-34
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
/node_modules
|
||||||
|
/dist
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
FROM node:22.12-alpine AS builder
|
FROM node:22.12-alpine AS builder
|
||||||
|
|
||||||
# Must be entire project because `prepare` script is run during `npm install` and requires all files.
|
# Must be entire project because `prepare` script is run during `npm install` and requires all files.
|
||||||
COPY src/brave-search /app
|
COPY src/ /app/src
|
||||||
COPY tsconfig.json /tsconfig.json
|
COPY tsconfig.json /tsconfig.json
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -45,14 +45,7 @@ Add this to your `claude_desktop_config.json`:
|
|||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"brave-search": {
|
"brave-search": {
|
||||||
"command": "docker",
|
"command": "docker",
|
||||||
"args": [
|
"args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"],
|
||||||
"run",
|
|
||||||
"-i",
|
|
||||||
"--rm",
|
|
||||||
"-e",
|
|
||||||
"BRAVE_API_KEY",
|
|
||||||
"mcp/brave-search"
|
|
||||||
],
|
|
||||||
"env": {
|
"env": {
|
||||||
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
|
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
|
||||||
}
|
}
|
||||||
@@ -68,10 +61,7 @@ Add this to your `claude_desktop_config.json`:
|
|||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"brave-search": {
|
"brave-search": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": [
|
"args": ["-y", "@brave/brave-search-mcp-server"],
|
||||||
"-y",
|
|
||||||
"@modelcontextprotocol/server-brave-search"
|
|
||||||
],
|
|
||||||
"env": {
|
"env": {
|
||||||
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
|
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
|
||||||
}
|
}
|
||||||
@@ -84,9 +74,11 @@ Add this to your `claude_desktop_config.json`:
|
|||||||
|
|
||||||
For quick installation, use the one-click installation buttons below...
|
For quick installation, use the one-click installation buttons below...
|
||||||
|
|
||||||
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-brave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-brave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D&quality=insiders)
|
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40brave%2Fbrave-search-mcp-server%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D)
|
||||||
|
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40brave%2Fbrave-search-mcp-server%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D&quality=insiders)
|
||||||
|
|
||||||
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22BRAVE_API_KEY%22%2C%22mcp%2Fbrave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22BRAVE_API_KEY%22%2C%22mcp%2Fbrave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D&quality=insiders)
|
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22BRAVE_API_KEY%22%2C%22mcp%2Fbrave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D)
|
||||||
|
[](https://insiders.vscode.dev/redirect/mcp/install?name=brave&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%7D%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22-e%22%2C%22BRAVE_API_KEY%22%2C%22mcp%2Fbrave-search%22%5D%2C%22env%22%3A%7B%22BRAVE_API_KEY%22%3A%22%24%7Binput%3Abrave_api_key%7D%22%7D%7D&quality=insiders)
|
||||||
|
|
||||||
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
|
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
|
||||||
|
|
||||||
@@ -110,14 +102,7 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
|
|||||||
"servers": {
|
"servers": {
|
||||||
"brave-search": {
|
"brave-search": {
|
||||||
"command": "docker",
|
"command": "docker",
|
||||||
"args": [
|
"args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"],
|
||||||
"run",
|
|
||||||
"-i",
|
|
||||||
"--rm",
|
|
||||||
"-e",
|
|
||||||
"BRAVE_API_KEY",
|
|
||||||
"mcp/brave-search"
|
|
||||||
],
|
|
||||||
"env": {
|
"env": {
|
||||||
"BRAVE_API_KEY": "${input:brave_api_key}"
|
"BRAVE_API_KEY": "${input:brave_api_key}"
|
||||||
}
|
}
|
||||||
@@ -143,7 +128,7 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
|
|||||||
"servers": {
|
"servers": {
|
||||||
"brave-search": {
|
"brave-search": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
|
"args": ["-y", "@brave/brave-search-mcp-server"],
|
||||||
"env": {
|
"env": {
|
||||||
"BRAVE_API_KEY": "${input:brave_api_key}"
|
"BRAVE_API_KEY": "${input:brave_api_key}"
|
||||||
}
|
}
|
||||||
@@ -158,7 +143,25 @@ Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace
|
|||||||
Docker build:
|
Docker build:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .
|
docker build -t mcp/brave-search:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Clone this repo to your machine, then add a reference to your `claude_desktop_config.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"brave-search-dev": {
|
||||||
|
"command": "node",
|
||||||
|
"args": ["C:\\GitHub\\brave-search-mcp-server\\dist\\index.js"],
|
||||||
|
"env": {
|
||||||
|
"BRAVE_API_KEY": "BSA…xWI"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
Generated
+1515
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -19,11 +19,11 @@
|
|||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "1.0.1"
|
"@modelcontextprotocol/sdk": "^1.12.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22",
|
"@types/node": "^24.0.3",
|
||||||
"shx": "^0.3.4",
|
"shx": "^0.4.0",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|||||||
import {
|
import {
|
||||||
CallToolRequestSchema,
|
CallToolRequestSchema,
|
||||||
ListToolsRequestSchema,
|
ListToolsRequestSchema,
|
||||||
Tool,
|
type Tool,
|
||||||
} from "@modelcontextprotocol/sdk/types.js";
|
} from "@modelcontextprotocol/sdk/types.js";
|
||||||
|
|
||||||
const WEB_SEARCH_TOOL: Tool = {
|
const WEB_SEARCH_TOOL: Tool = {
|
||||||
+11
-5
@@ -1,10 +1,16 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "."
|
"rootDir": "src",
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "Node16",
|
||||||
|
"moduleResolution": "Node16",
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src/**/*"],
|
||||||
"./**/*.ts"
|
"exclude": ["node_modules"]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user