No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
gascity-argos d994968a6c
All checks were successful
test / changelog (push) Successful in 4s
test / go (push) Successful in 22s
Add internal/bearer: the bearer check (#7)
2026-11-19 23:00:20 +00:00
.changelog Release 0.1.0 (#4) 2026-11-19 16:45:06 +00:00
.forgejo/workflows Release 0.1.0 (#4) 2026-11-19 16:45:06 +00:00
internal Add internal/bearer: the bearer check (#7) 2026-11-19 23:00:20 +00:00
.gitignore Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
.golangci.yaml Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
CHANGELOG.md Release 0.1.0 (#4) 2026-11-19 16:45:06 +00:00
decide.go Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
decide_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
doc.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
errors.go Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
example_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
go.mod Add internal/bearer: the bearer check (#7) 2026-11-19 23:00:20 +00:00
go.sum Add internal/bearer: the bearer check (#7) 2026-11-19 23:00:20 +00:00
handler.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
handler_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
helpers_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
oncall_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
README.md Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
Taskfile.yaml Release 0.1.0 (#4) 2026-11-19 16:45:06 +00:00
tools.go Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
tools_list_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
version.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00
websearch.go Lint with golangci-lint and modernize, run from a Taskfile (#5) 2026-11-19 16:16:13 +00:00
websearch_test.go Add the handler: web_search and decide behind NewHandler (#3) 2026-11-19 13:54:36 +00:00

perplexity-mcp

The Go module sarak.sh/mikluko/perplexity-mcp. Its root package, perplexitymcp, exports NewHandler, a stateless, unauthenticated MCP handler serving two tools, search and decide, backed by Perplexity's Search and Decisions APIs through the internal/perplexity client.

An embedder mounts the handler under a path on its own mux, in front of whatever authentication it needs:

handler, err := perplexitymcp.NewHandler(perplexitymcp.Options{
	Key: func(ctx context.Context) (string, error) {
		return "replace-with-a-real-key", nil
	},
})
if err != nil {
	panic(err)
}

mux := http.NewServeMux()
mux.Handle("/mcp/", http.StripPrefix("/mcp", handler))

See the package's Example function for this, and Options for what an embedder can set: the key, the Search search_type and the Decisions model, the server's reported name and version, and a per-call hook.

Changelog

A pull request a reader of the module would notice adds a fragment under .changelog/, a Markdown file with the section and note it belongs to, as CHANGELOG.md's [Unreleased] entry would carry it. task changelog checks both against the same rules CI does.

A release is cut by turning [Unreleased] into a versioned, dated entry on main; the push triggers the release workflow, which tags it and files the release once it lands.