- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .changelog | ||
| .forgejo/workflows | ||
| internal | ||
| .gitignore | ||
| .golangci.yaml | ||
| CHANGELOG.md | ||
| decide.go | ||
| decide_test.go | ||
| doc.go | ||
| errors.go | ||
| example_test.go | ||
| go.mod | ||
| go.sum | ||
| handler.go | ||
| handler_test.go | ||
| helpers_test.go | ||
| oncall_test.go | ||
| README.md | ||
| Taskfile.yaml | ||
| tools.go | ||
| tools_list_test.go | ||
| version.go | ||
| websearch.go | ||
| websearch_test.go | ||
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.