Commit Graph

19 Commits

Author SHA1 Message Date
Adam Holt e6a24f0f5c Test that explicit AuthorizationServer settings take precedence.
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
2026-02-23 18:32:55 +01:00
Adam Holt 5c06b12943 Default to a api.github.com host 2026-02-23 18:24:40 +01:00
Adam Holt cdcb674940 Fix default scheme, add test for http GHES 2026-02-23 18:23:24 +01:00
Adam Holt f5a4da1bbd Linter fixes and ctx no longer needed 2026-02-23 18:20:55 +01:00
Adam Holt 4989da610f Resolve the URL at request time.
If we do this at start time, we won't know which GHEC tenant we're on.
2026-02-23 18:15:26 +01:00
Adam Holt b81964bc5b Add GHEC test 2026-02-23 17:47:19 +01:00
Adam Holt 03b0a84959 cfg.Host should be the non-api prefixed host 2026-02-23 17:42:22 +01:00
Adam Holt d0b1986a02 Generate authorization server urls during API resolution.
Then we can pass this into the OAuth implementation.
2026-02-23 17:30:31 +01:00
tommaso-moro c38802ac80 rename to --exclude-tools 2026-02-18 17:13:41 +01:00
tommaso-moro 9c8f96f6bf add header support in http entry point 2026-02-18 17:13:41 +01:00
Adam Holt 08231a2aeb Add support for custom middleware in the correct order. (#2026)
* Add support for custom middleware in the correct order.

* Switch this up to be more clear on what it's doing
2026-02-18 14:43:59 +01:00
Adam Holt efe9d40b58 Token scopes context (#1997)
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
* Move scope storage into its own context key, separately from token info.

This allows us to provide scopes seperately in the remote server, where
we have scopes before we do the auth.

* Skip token extraction if token info already exists in context.

This is to avoid redundant token extraction in remote setup where token info may have already been extracted earlier in the request lifecycle.

* Check for existing scopes in context before fetching from GitHub API in scope challenge middleware

* Return error type for unknown tools in inventory builder and handle it in HTTP handler
2026-02-16 14:10:28 +01:00
Oleksandr Redko 505d5dc33a refactor: modernize code with modernize and intrange 2026-02-12 12:58:49 +01:00
copilot-swe-agent[bot] bbc675abe9 Make schema cache an opinionated default for HTTP handlers
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-02-11 11:32:07 +01:00
copilot-swe-agent[bot] ed30a1dee8 Co-locate WithSchemaCache with other With functions
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
2026-02-11 11:32:07 +01:00
Sam Morrow ff00c689b0 Add shared SchemaCache for streamable-http server
Create a shared mcp.SchemaCache in RunHTTPServer and pass it through
to each per-request MCP Server via ServerOptions. This avoids repeated
JSON schema reflection and resolution when a new Server is created for
every request in stateless mode, matching the pattern used by the
remote server.
2026-02-11 11:32:07 +01:00
Matt Holloway bc02fd7354 fix test 2026-02-10 12:55:24 +01:00
Matt Holloway 858966005f fix ff hangover from old code 2026-02-10 12:55:24 +01:00
Adam Holt aa302209b0 Add Streamable HTTP mode (#1849)
Adds new `http` command supporting Streamable HTTP support, OAuth Metadata handler and Scope filtering.

Co-authored-by: kerobbi <kerobbi@github.com>
Co-authored-by: Matt Holloway <mattdholloway@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 15:33:41 +01:00