Skip to content

[server] Add Authorization Bearer support for MCP clients#154

Open
demarant wants to merge 3 commits intoNateBJones-Projects:mainfrom
demarant:feature/bearer-auth-mcp
Open

[server] Add Authorization Bearer support for MCP clients#154
demarant wants to merge 3 commits intoNateBJones-Projects:mainfrom
demarant:feature/bearer-auth-mcp

Conversation

@demarant
Copy link
Copy Markdown
Contributor

@demarant demarant commented Apr 4, 2026

Contribution Type

  • Recipe (/recipes)
  • Schema (/schemas)
  • Dashboard (/dashboards)
  • Integration (/integrations)
  • Skill (/skills)
  • Repo improvement (docs, CI, templates)

What does this do?

Adds standard HTTP Authorization: Bearer authentication support to the Open Brain MCP server. Enables Perplexity Pro and other MCP clients that only support standard auth headers to connect directly without needing a proxy. Maintains backward compatibility with the existing x-brain-key header and ?key= query parameter.

Fixes

Testing

  • Tested on Perplexity web and mobile app
  • Successfully retrieved and stored thoughts via MCP tools

Requirements

  • Working Open Brain setup with deployed MCP server
  • Perplexity Pro or other MCP client requiring standard Bearer auth
  • No additional external services or tools required

Checklist

  • I've read CONTRIBUTING.md
  • This is a core server change, not a new contribution with README — no additional documentation required
  • My metadata.json has all required fields — N/A (server code change, not a contribution folder)
  • If my contribution depends on a skill or primitive, I declared it in metadata.json and linked it in the README — N/A
  • I tested this on my own Open Brain instance — Tested on Perplexity web and mobile app
  • No credentials, API keys, or secrets are included

Note: This is a core infrastructure change (server code), not a new recipe/integration. The PR includes:

  • server/index.ts — Core MCP server with Bearer auth
  • integrations/kubernetes-deployment/index.ts — Self-hosted variant
  • extensions/_template/AGENT_SPEC.md — Updated canonical template

demarant added 3 commits April 3, 2026 15:33
- Use created_at instead of id for cursor pagination
- Fixes error when thoughts table has UUID primary key
- Tested on real Open Brain DB with 1815 rows backfilled
- Accept Authorization: Bearer <key> as primary auth method
- Keep x-brain-key and ?key= as backward-compatible fallbacks
- Enables Perplexity and other standard MCP clients to connect without proxy
- Fixes NateBJones-Projects#73
@github-actions github-actions bot added integration Contribution: MCP extension or capture source recipe Contribution: step-by-step recipe labels Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration Contribution: MCP extension or capture source recipe Contribution: step-by-step recipe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant