Skip to main content
Skip to the article

MCP server

Authentication and permissions

How a client proves who it acts for: OAuth 2.1 with PKCE and dynamic registration, or a personal token, and how each permission is granted, narrowed and revoked.

3 min readUpdated on

Two ways to authenticate

OAuth 2.1Personal token
ForClaude, ChatGPT and any client that supports remote MCPScripts and tools without OAuth
CredentialAccess token rqat_… (1 hour) and refresh token rqrt_… (30 days, rotating)rqpat_…
CreatedThrough the consent screenIn Repliq → AI assistants
ExpiresAccess token after 1 hour; the connection lasts while it is refreshedAfter 30, 90, 180, 365 days (you choose)
Limit—10 active per account
Shown—Once, when created

Send either as Authorization: Bearer <token> to https://repliqds.com/api/mcp. A Repliq session token (the one your browser uses) is never accepted here, and an assistant token never authenticates the rest of Repliq.

OAuth 2.1 flow

  1. Discovery

    The client reads the protected-resource and authorization-server metadata (RFC 9728 and RFC 8414). A request without a valid token gets 401 with a WWW-Authenticate: Bearer resource_metadata=… header that points to them.

  2. Dynamic registration (RFC 7591)

    The client registers once as a public client (token_endpoint_auth_method: none, no secret). Between 1 and 5 redirect URIs: HTTPS, an http loopback address, or a native app scheme; never with a fragment, and never javascript:, data: or file:.

  3. Authorization with PKCE

    The person is sent to Repliq, signs in (two-step verification applies) and sees the client’s name, where it returns to, whether it is a known assistant and the requested permissions. PKCE with `S256` is required.

  4. Token exchange

    The authorization code is valid for 5 minutes and works once. The client exchanges it, with its code_verifier, for an access token (1 hour) and a refresh token (30 days).

  5. Refresh

    Each refresh returns a new pair and retires the old refresh token.

OAuth flow
# 1. Discover the endpoints
curl -s https://repliqds.com/.well-known/oauth-protected-resource/api/mcp
curl -s https://repliqds.com/.well-known/oauth-authorization-server

# 2. Register a public client (once)
curl -s -X POST https://repliqds.com/api/mcp/oauth/register \
  -H "Content-Type: application/json" \
  -d '{"client_name":"My agent","redirect_uris":["http://127.0.0.1:8976/callback"]}'

# 3. Send the person to the authorization endpoint with PKCE (S256):
#    https://repliqds.com/oauth/authorize?response_type=code&client_id=rqc_…
#      &redirect_uri=…&code_challenge=…&code_challenge_method=S256
#      &scope=repliq:read%20repliq:draft&state=…

# 4. Exchange the code (valid 5 minutes, single use)
curl -s -X POST https://repliqds.com/api/mcp/oauth/token \
  -d grant_type=authorization_code -d client_id=rqc_… \
  -d code=rqac_… -d redirect_uri=… -d code_verifier=…

Permissions

PermissionTools using it
repliq:readlist_locations, list_reviews, get_review, get_reputation_summary, get_action_items, get_location_insights, compare_locations, get_benchmark, list_competitors, get_google_profile_performance, get_search_keywords, get_google_profile_health, list_google_posts, list_upcoming_holidays, list_review_requests, get_review_request_stats, list_reply_templates, get_reviewer_history
repliq:draftsave_reply_draft, generate_reply_draft, ask_reviews, summarize_reviews, check_review_authenticity, suggest_google_post, save_reply_template, reject_review, rewrite_reply, translate_review, search_competitors, add_competitor, remove_competitor, get_competitor_themes
repliq:publishpublish_reply, approve_reply, delete_published_reply
repliq:profilepublish_google_post, update_google_description, set_special_hours
repliq:requestssend_review_requests
  • repliq:read is always included: no other permission works without it.
  • A client that asks for no scope gets repliq:read and repliq:draft. An unknown scope is rejected (invalid_scope).
  • On the consent screen the person can reduce the permissions, never widen them.
  • Existing connections keep exactly the permissions they were granted.

Personal tokens

Create one in Repliq → AI assistants: a label (up to 100 characters), the permissions (read is required) and a lifetime. The token is shown once; only its SHA-256 digest is stored. You can have up to 10 active tokens, and revoke each one at any time.

Revocation

  • You: disconnect the connection in Repliq → AI assistants. Active tokens stop working within seconds (the check is cached for at most 15 seconds).
  • The client: POST /api/mcp/oauth/revoke (RFC 7009).
  • Automatically: changing or resetting your password disconnects every assistant. Reusing an authorization code or a refresh token revokes the whole connection.
  • Workspace membership: it is re-read on every call, so removing someone from a workspace removes it from their assistant at once.

Lifetimes, rules and endpoints checked against the OAuth server, the MCP configuration and ADR-0006.

Was this page helpful?

Can’t find what you need?

Check the frequently asked questions or write to us and we will help.

Frequently asked questions