SkillAgentSearch skills...

theauth-go

Self-hosted Go authentication library. Embeds in net/http, chi, Gin, Echo or Fiber. OAuth 2.1 authorization server, MCP authorization (RFC 9728), passkeys, SAML, SCIM, TOTP, magic links, DPoP. SQLite, Postgres or MySQL. MIT, no hosted service.

Install / Use

claude mcp add glincker -- npx -y github:glincker/theauth-go

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

77/100

Supported Platforms

Claude Code
Claude Desktop

Our assessment of theauth-go

theauth-go scores 77/100 on our quality scale, 543rd of 592 Data & Analytics skills we index.

Its MCP Server is 6.4 KB long, split into 6 sections with 1 code example: a thorough specification that gives an agent plenty to work with.

It has 10 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
29/30
Structure
15/20
Description
15/15
Adoption
4/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 3 days ago, so theauth-go is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

theauth-go compared with similar skills

All 4 of these similar skills score higher than theauth-go; compare them before choosing.

SkillScoreStarsUpdatedFormat
theauth-go (this skill)by glincker77103d agoMCP Server
claude-memby thedotmack100113.0ktodayCLAUDE.md
Agent-Reachby Panniantong100108.9ktodayCLAUDE.md
headroomby headroomlabs-ai10078.9ktodayCLAUDE.md
CowAgentby zhayujie10047.8ktodayCLAUDE.md

Frequently asked questions

How do I install theauth-go?
Run claude mcp add glincker -- npx -y github:glincker/theauth-go. The install tabs above show the steps for each supported agent.
Which AI agents does theauth-go work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is theauth-go safe to use?
It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is theauth-go still maintained?
The repository was last updated 3 days ago, so theauth-go is actively maintained.

theauth-go

OAuth 2.1 and sign-in for Go MCP servers and agents. It mounts into your own net/http server, your users and tokens stay in your own database, and there is no hosted service. MIT licensed.

Building an MCP server in Go means implementing OAuth 2.1, protected resource metadata (RFC 9728), PKCE and token validation yourself. This library does that part, so your server accepts tokens from MCP clients and you keep control of identity.

Checked against a real client. The official modelcontextprotocol/go-sdk client (v1.8.0) completes the full flow against it in integration/mcp-interop: discovery, dynamic client registration, PKCE S256, token exchange and an authenticated tool call. Login and consent are simulated in that test, so it proves the protocol path, not a production deployment.

Who it is for: Go developers building MCP servers, agent backends or internal tools who want to own their auth instead of renting it.

What you get

  • Sign-in with passwords, magic links, social login, passkeys and TOTP, with sessions stored in your database.
  • An OAuth 2.1 authorization server and an mcpresource module that guards MCP tools by scope.
  • SQLite, Postgres or MySQL storage, plus SAML and SCIM when you need them (see the status table for what is stable).
  • Signed releases with an SBOM you can verify.

The official Go MCP SDK client authenticating against a theauth-go authorization server: discovery, dynamic registration, PKCE, token exchange and a tool call

Every line above is a real request. Run it yourself with cd integration/mcp-interop && GOWORK=off go run ./cmd/demo. Login and consent are simulated in this demo.

Go Reference CI Release License: MIT

Quickstart

A server with sign-up, sign-in, magic links, sessions and one protected route, stored in one SQLite file. Install with go get github.com/glincker/theauth-go/v2 and go get github.com/glincker/theauth-go/storage/sqlite (both modules need Go 1.26).

package main

import (
	"context"
	"database/sql"
	"log"
	"net/http"

	"github.com/glincker/theauth-go/v2"
	sqlitestore "github.com/glincker/theauth-go/storage/sqlite"
	_ "modernc.org/sqlite"
)

func main() {
	ctx := context.Background()
	db, err := sql.Open("sqlite", "file:app.db?_pragma=foreign_keys(1)&_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)&_txlock=immediate")
	if err != nil {
		log.Fatal(err)
	}
	if err := sqlitestore.Migrate(ctx, db); err != nil {
		log.Fatal(err)
	}
	store, err := sqlitestore.New(db)
	if err != nil {
		log.Fatal(err)
	}

	a, err := theauth.New(theauth.Config{CoreStorage: store, BaseURL: "http://localhost:8080"})
	if err != nil {
		log.Fatal(err)
	}
	defer a.Close()

	mux := http.NewServeMux()
	mux.Handle("/auth/", a.Handler()) // sign-up, sign-in, magic link, sessions
	mux.Handle("GET /me", a.RequireAuth()(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		user, _ := theauth.UserFromContext(r.Context())
		w.Write([]byte("hello " + user.Email))
	})))
	log.Fatal(http.ListenAndServe(":8080", mux))
}

a.Handler() is a plain http.Handler, so no http.StripPrefix is needed. With chi, call a.Mount(r) instead. More setups are in examples and the docs.

Why this exists

I needed a Go OAuth 2.1 authorization server for MCP clients and agents that runs inside my own process: RFC 9728 protected resource metadata, Client ID Metadata Documents (CIMD) and DPoP. The same module also handles ordinary sign-in (passwords, magic links, passkeys, social login), so people and agents share one database. It is young: the first commit is dated 2026-06-20. When not to use it lists where fosite, zitadel/oidc, goth, authboss, Keycloak or Ory fit better.

Status

Stable means SemVer applies. Beta means the API is covered by SemVer but I know of behavior gaps. Experimental means it may change in a minor release, or the stability policy does not cover it yet.

| Area | Status | Basis | |---|---|---| | Sign-in, sessions, social login, passkeys, TOTP | Stable | Root package, listed stable | | Authorization server core: code with PKCE, refresh, client credentials, token exchange, discovery, dynamic registration | Stable | v2.0 commitment in the policy | | MCP resource server (mcpresource) and RFC 9728 metadata | Stable | Listed stable package | | DPoP, CIMD, PAR, JAR, CIBA, RAR, ID-JAG | Experimental | Not in the policy; CIMD options listed experimental | | Agent identity and delegation | Experimental | Listed experimental | | SAML SSO, SCIM, organizations, RBAC | Beta | API listed stable; no published IdP interop matrix | | Memory storage, audit sinks | Stable | Listed stable | | Postgres and MySQL storage | Beta | Roadmap: shared contract suite still fails on constraint edge cases | | SQLite storage, clientauth, policy, Gin, Echo and Fiber adapters | Experimental | First three listed experimental; adapters not in the policy |

Levelrail, another product I build, imports it (pinned at v2.12.0). I have no independent audit or OpenID certification to point to. Other facts you can check yourself are in docs/PROOF.md.

AI assistance

Parts of this code were written with AI assistance. I review it, and it is covered by tests (361 test files, count it with the commands in PROOF.md) and the threat model. Codecov reported about 46 percent line coverage on 2026-10-31, so treat the tests as a floor. Report vulnerabilities privately through the security policy.

Docs

Install and verify releases | Features | Agent quickstart | Storage | FAQ and migrating | Examples | Changelog | About | Discussions

Related Skills

View on GitHub
GitHub Stars10
CategoryData
Updated3d ago
Forks2

Languages

Go

Trust signals

97/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 info
theauth-go — MCP Server: Install & Safety Check | SkillAgent