# Announcing MCP Authentication: secure your MCP servers with PropelAuth

We are thrilled to announce that we now officially support Go! If you want to skip right to it, you can check out our [getting started guides](https://docs.propelauth.com/getting-started/quickstart-fe?ref=propelauth.mymidnight.blog) or the [reference documentation](https://docs.propelauth.com/reference/backend-apis/go?ref=propelauth.mymidnight.blog) for our Go library.

As with all of our libraries, there are a few major features that we provide:

## Straightforward Authentication

When you receive an authenticated request from the frontend, your first question is probably… who is this?

```go
user, err := client.GetUser(r.Header.Get("Authorization"))
if err != nil {
    w.WriteHeader(401)
    return
}
// I now have fields like user.Email or user.UserID
```

This function makes no external requests; it just validates the authorization header and returns the user. You can read more about how to send authenticated requests from the frontend [here](https://docs.propelauth.com/getting-started/quickstart-requests?ref=propelauth.mymidnight.blog).

## Authorization and Multi-Tenancy

PropelAuth was designed with B2B / Multi-tenant products in mind. We have first-class support for [organizations](https://docs.propelauth.com/overview/organizations?ref=propelauth.mymidnight.blog) and provide self-serve UIs so your users can create organizations, invite their coworkers, manage [roles and permissions](https://docs.propelauth.com/overview/roles?ref=propelauth.mymidnight.blog), [setup SAML connections](https://docs.propelauth.com/overview/saml?ref=propelauth.mymidnight.blog), and more.

On the backend, you can quickly check that the user has the **Admin** role within their organization:

```go
// Get the org id from the request - this could be a path param, header, query param
orgId := getOrgIdFromRequest(r)
orgMemberInfo, err := user.GetOrgMemberInfo(orgId)
if err != nil {
    w.WriteHeader(403)
    return
}

// Check the user's role within the organization
if !orgMemberInfo.IsRole("Admin") {
    w.WriteHeader(403)
    return
}
```

This can all be easily wrapped up into a middleware function so all you have to do is write:

```go
func fetchBillingInformation(w http.ResponseWriter, req *http.Request) {
    orgMemberInfo := req.Context().Value("org").(*models.OrgMemberInfoFromToken)
    fetchBillingInfoForOrg(orgMemberInfo.OrgID)
}

// ...

http.Handle("/api/billing", requireAdminInOrg(client, fetchBillingInformation))
```

## APIs for Auth

The library also includes a number of utility functions that you can use to programmatically manage your users.

One common example is our API to [Allow organizations to set up SAML connections](https://docs.propelauth.com/reference/backend-apis/go?ref=propelauth.mymidnight.blog#allow-organization-to-set-up-saml-connection). If you are using Stripe to manage your subscriptions, you can set up a webhook when someone upgrades their plan and then automatically give them access to configure a SAML connection.

There’s a lot more to see, so check out the [reference docs](https://docs.propelauth.com/reference/backend-apis/go?ref=propelauth.mymidnight.blog) for all the different APIs you can use.

## Summary

We wanted to thank everyone who emailed us asking about Go support (and those of you who built your own unofficial libraries in the meantime 🙂).

We can’t wait to see what you all build!
