619 Commits
Author SHA1 Message Date
Daniel SamsonandClaude Haiku 4.5 09f1056303 fix: use COPY instead of downloading from GitHub to include local changes
Build and Push Docker Image / build (push) Successful in 46s
The Dockerfile was downloading from GitHub instead of using the local
repository source, which meant our config.ts fixes weren't being included.
Changed to COPY to build with the Gitea repository source.

Also corrected EXPOSE from 3000 to 8080 (the actual port).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 19:03:47 +01:00
Daniel Samson 58118ee576 chore: add workflow_dispatch trigger to allow manual runs
Build and Push Docker Image / build (push) Successful in 15s
2026-10-19 19:01:32 +01:00
Daniel Samson ad29d5ba19 fix: remove external action dependency from workflow
Build and Push Docker Image / build (push) Successful in 7s
2026-10-19 19:00:13 +01:00
Daniel SamsonandClaude Haiku 4.5 b24f89e78d fix: simplify Gitea Actions workflow for Docker build
Build and Push Docker Image / build (push) Successful in 55s
Use native Docker commands instead of GitHub Actions docker/* actions
which may not be available in Gitea Actions environment.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 18:59:56 +01:00
Daniel SamsonandClaude Haiku 4.5 01aebf9e02 fix: bind HTTP server to 0.0.0.0 instead of 127.0.0.1 for external access
Build and Push Docker Image / build (push) Successful in 21s
The MCP server was only listening on localhost (127.0.0.1), making it
unreachable from the Kubernetes service. Changed default host binding to
0.0.0.0 to accept traffic from all interfaces, allowing ingress routing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 18:54:08 +01:00
Daniel Samson 678c84ebd3 fix: ensure dev dependencies available during build before pruning
Build and Push Docker Image / build (push) Successful in 55s
2026-10-19 18:33:13 +01:00
Daniel Samson 917106eab5 fix: use correct npm script (npm run serve:http)
Build and Push Docker Image / build (push) Successful in 21s
2026-10-19 18:30:10 +01:00
Daniel Samson e45fb9121a ci: simplify push condition (always push on main branch)
Build and Push Docker Image / build (push) Successful in 21s
2026-10-19 18:18:01 +01:00
Daniel Samson 941e77bfa0 fix: use curl/tar instead of git for downloading source (fixes exit code 127)
Build and Push Docker Image / build (push) Successful in 55s
2026-10-19 18:13:48 +01:00
Daniel Samson a72cde84c7 fix: improve Dockerfile with better git clone handling and build steps
Build and Push Docker Image / build (push) Successful in 57s
2026-10-19 18:12:06 +01:00
Daniel Samson af3c9082bc ci: rename secret to CI_TOKEN (GITEA_ prefix not allowed)
Build and Push Docker Image / build (push) Failing after 26s
2026-10-19 18:10:59 +01:00
Daniel Samson b994bae485 ci: use ci@samson.media for Gitea registry authentication
Build and Push Docker Image / build (push) Failing after 10s
2026-10-19 18:07:32 +01:00
Daniel Samson 095b2fabb8 ci: use ci-user for Gitea registry authentication
Build and Push Docker Image / build (push) Failing after 11s
2026-10-19 18:04:15 +01:00
Daniel Samson 573c13a467 chore: add Dockerfile and CI/CD workflow for Docker image builds
Build and Push Docker Image / build (push) Failing after 10s
2026-10-19 18:02:49 +01:00
dependabot[bot] e4866a959a chore(deps): bump fast-uri from 3.1.7 to 3.1.8 (#357)
CI / test (push) Successful in 33s
2026-10-05 15:49:20 -05:00
dependabot[bot] 862bd3c366 chore(deps): bump ip-address from 10.5.0 to 10.7.2 (#355)
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.5.0 to 10.7.2.
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](https://github.com/beaugunderson/ip-address/compare/v10.5.0...v10.7.2)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.7.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-05 15:12:44 -05:00
Sampson a75d7eff34 fix(docker): bump pinned openssl to 3.5.8-r0 2026-09-17 07:57:58 -07:00
github-actions[bot] 8bcb302657 ci: update build assets (v2.1.4) 2026-09-17 14:47:09 +00:00
Sampson 50cb919200 chore: remove dead code and fix HTTP port-conflict startup (#351)
* chore: remove dead code and fix HTTP port-conflict startup

- drop unused helpers, constants, schemas, and duplicated types
- exit non-zero when the HTTP port is already in use
- add stdio and port-conflict tests
- clean dist on build, add serve:http, fix inspector:http for Inspector v2

* test: harden port-conflict test; drop unreachable listen guard

- pin the child's host so BRAVE_MCP_HOST cannot bypass the conflict
- bound the exit wait and reject spawn errors
- remove the address() guard; 'listening' does not fire on a failed bind
2026-09-17 07:45:23 -07:00
Esteban Suárez 2cf96460c1 docs: add fx to installation instructions (#339)
fx is an open source coding agent from Vercel Labs. It reads MCP server
definitions from the `mcp` key in ~/.fx/mcp.json.

Verified against the live API with @brave/brave-search-mcp-server@2.1.3
over stdio.
2026-09-10 11:46:16 -05:00
dependabot[bot] 530795f34f chore(deps): bump hono from 4.13.1 to 4.13.7 (#349)
Bumps [hono](https://github.com/honojs/hono) from 4.13.1 to 4.13.7.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.13.1...v4.13.7)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.13.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-10 08:35:56 -05:00
SreeCharan Desu 4f7e4ea654 docs: stop telling agents image search has an offset (#348)
count's schema said to combine with offset for pagination, but the
image api has no offset at all — you just raise count (max 200). agents
were inventing a param that never existed.
2026-09-09 18:14:55 -05:00
Sampson fca821db68 chore: bump fast-uri and qs for npm audit findings (#343)
Update nested fast-uri to 3.1.7 and qs to 6.16.0 to pick up the patched releases.

Supersedes #341
Supersedes #342
2026-09-07 12:56:01 -05:00
github-actions[bot] 2d15f633f7 ci: update build assets (v2.1.3) 2026-08-20 16:09:22 +00:00
Sampson 65c8f2c27d chore: remove noop/deprecated args 2026-08-20 10:54:22 -05:00
github-actions[bot] 4506c66495 ci: update build assets (v2.1.2) 2026-08-20 15:51:20 +00:00
Sampson 30486c8926 chore: npm pgk fix 2026-08-20 10:49:54 -05:00
github-actions[bot] 3e65f3f0b7 ci: update build assets (v2.1.1) 2026-08-20 15:44:16 +00:00
Sampson e8b62148ad fix: advertise tool schemas as JSON Schema 2020-12 (#335)
* refactor(tools): pass Zod schemas to registerTool instead of raw shapes

registerTool accepts either a ZodObject or a raw shape, and passing the
schema itself keeps each tool definition closer to how its schema is
declared. The advertised JSON Schema is unchanged either way.

* fix(server): advertise tool schemas as JSON Schema 2020-12

The SDK converts our Zod schemas on every tools/list with a hardcoded
draft-07 target: mcp.js calls toJsonSchemaCompat() without a `target`, and
mapMiniTarget(undefined) falls back to 'draft-7'. No registerTool option
overrides it, so every schema we advertised declared draft-07.

Clients that validate against 2020-12 reject those definitions outright,
which takes down the whole tool list rather than a single tool. Separately,
brave_place_search's coordinates tuple emitted draft-07's array-form
`items`, which is invalid under 2020-12 where positional validation moved
to `prefixItems`.

SEP-1613 §5 requires servers to generate 2020-12 by default, so re-emit the
schemas on the tools/list response. Each correction is conditional, so this
decays to a no-op once the SDK emits 2020-12 itself.

Refs: https://github.com/modelcontextprotocol/typescript-sdk/issues/2084

* test(server): assert advertised schemas are valid JSON Schema 2020-12

Compile every tool's inputSchema and outputSchema from a real tools/list
response with a 2020-12 validator. This runs against the wire format rather
than our Zod definitions because the SDK performs the conversion itself: the
Zod schemas can be correct while the advertised JSON Schema is not.

Compiling resolves whichever dialect a schema declares, so a single check
covers both failure modes - a draft-07 declaration, and keywords that are
invalid under 2020-12. The SDK's own default client validator is Ajv
draft-07 with schema validation disabled, so it accepts output that 2020-12
clients reject; add ajv as a devDependency to check the dialect explicitly.
2026-08-20 10:41:28 -05:00
Sampson 937e85a61f test: consolidate MCP client/fetch-stub setup into useTestClient helper (#333) 2026-08-11 15:13:10 -05:00
Sampson ad288a4ef9 ci: restrict workflow token to read-only contents permission 2026-08-11 13:24:52 -05:00
Sampson f126dab4c7 chore: bump transitive deps for security fixes (npm audit fix) 2026-08-11 13:24:52 -05:00
Sampson 0d90bfc0b4 chore: ignore /scratch directory 2026-08-11 13:24:52 -05:00
Sampson dcd370b2a0 test: assert structuredContent and cover tool error paths 2026-08-11 13:24:52 -05:00
Sampson 71e05d1258 fix: handle absent current-day hours and multi-interval days in local search 2026-08-11 13:24:52 -05:00
Sampson 896ac6acd3 test: add MCP call tests for each search tool 2026-08-11 13:24:52 -05:00
Sampson 38d703263d test: add in-memory MCP client/server test harness 2026-08-11 13:24:52 -05:00
Sampson 32ffbd68a0 ci: run format check, build, and tests on push and PR
npm test previously only ran locally; nothing gated a broken build or
a regression (e.g. from an SDK bump) before merge.
2026-08-11 13:24:52 -05:00
Sampson 930f6b3af4 fix audit concerns 2026-07-27 13:04:10 -05:00
dependabot[bot] 8f0e4a2874 Bump @hono/node-server and @modelcontextprotocol/sdk (#325)
Bumps [@hono/node-server](https://github.com/honojs/node-server) to 2.0.12 and updates ancestor dependency [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk). These dependencies need to be updated together.


Updates `@hono/node-server` from 1.19.13 to 2.0.12
- [Release notes](https://github.com/honojs/node-server/releases)
- [Commits](https://github.com/honojs/node-server/compare/v1.19.13...v2.0.12)

Updates `@modelcontextprotocol/sdk` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/v1.29.0...1.30.0)

---
updated-dependencies:
- dependency-name: "@hono/node-server"
  dependency-version: 2.0.12
  dependency-type: indirect
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.30.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 13:02:11 -05:00
dependabot[bot] 81965e6541 Bump hono from 4.12.26 to 4.12.31 (#320)
Bumps [hono](https://github.com/honojs/hono) from 4.12.26 to 4.12.31.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.26...v4.12.31)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.31
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 12:59:28 -05:00
dependabot[bot] e79e853421 Bump fast-uri from 3.1.2 to 3.1.4 (#323)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 12:58:53 -05:00
github-actions[bot] 76106c83f9 ci: update build assets (v2.1.0) 2026-07-18 19:29:50 +00:00
Sampson 576bd312d7 feat(http): hardens rebinding defenses (#317) 2026-07-18 14:18:54 -05:00
Sampson fd28e3e7b3 feat(config): support reading Brave API key from a file (#313)
* feat: support reading Brave API key from a file
* chore: add secret file template and gitignore local keys
* docs: document optional Docker Compose secrets workflow
* fix: trim whitespace API keys and exclude secrets from Docker build
* docs: clarify container paths for BRAVE_API_KEY_FILE
* test: cover API key file config and expand Docker build context ignores
* test: isolate getOptions tests from local env vars
* docs: clarify optional use of BRAVE_API_KEY_FILE
* docs: document BRAVE_API_KEY_FILE in AWS Marketplace catalog template
2026-06-24 13:53:51 -05:00
Sampson e3f77ced06 fix: http port validation (#312)
* fix: validate and parse HTTP port as integer

Commander leaves --port as a string, so invalid values like abc previously
passed numeric range checks. Parse ports strictly before starting HTTP transport.

* test: add parsePort unit tests and npm test script

Introduce node:test coverage for HTTP port parsing edge cases using the
existing tsx dev dependency.

* docs: correct README port default and image search description

Align BRAVE_MCP_PORT default with runtime behavior (8080) and remove the
outdated v1.x base64 image search note.
2026-06-24 07:58:51 -05:00
Mihai PLESA feeab77f13 Merge pull request #311 from brave/dependabot/npm_and_yarn/hono-4.12.26
Bump hono from 4.12.23 to 4.12.26
2026-06-20 20:13:14 +01:00
dependabot[bot] 5af1146982 Bump hono from 4.12.23 to 4.12.26
Bumps [hono](https://github.com/honojs/hono) from 4.12.23 to 4.12.26.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.26)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.26
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-20 03:20:04 +00:00
github-actions[bot] 759b9a880d ci: update build assets (v2.0.85) 2026-06-15 10:25:57 +00:00
Mihai PLESA 8bfe0cec02 bump openssl 2026-06-15 11:24:46 +01:00