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.1 | Personal token | |
|---|---|---|
| For | Claude, ChatGPT and any client that supports remote MCP | Scripts and tools without OAuth |
| Credential | Access token rqat_… (1 hour) and refresh token rqrt_… (30 days, rotating) | rqpat_… |
| Created | Through the consent screen | In Repliq → AI assistants |
| Expires | Access token after 1 hour; the connection lasts while it is refreshed | After 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
Discovery
The client reads the protected-resource and authorization-server metadata (RFC 9728 and RFC 8414). A request without a valid token gets
401with aWWW-Authenticate: Bearer resource_metadata=…header that points to them.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, anhttploopback address, or a native app scheme; never with a fragment, and neverjavascript:,data:orfile:.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.
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).Refresh
Each refresh returns a new pair and retires the old refresh token.
# 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
| Permission | Tools using it |
|---|---|
repliq:read | list_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:draft | save_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:publish | publish_reply, approve_reply, delete_published_reply |
repliq:profile | publish_google_post, update_google_description, set_special_hours |
repliq:requests | send_review_requests |
repliq:readis always included: no other permission works without it.- A client that asks for no scope gets
repliq:readandrepliq: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.
Related documentation
- SecurityThe guarantees the MCP server gives, how tokens are stored, and what to do on your side so an assistant cannot do more than you intend.
- Connect a clientAdd Repliq to Claude, ChatGPT, Cursor, VS Code or Claude Code, or call it from a script, and check that it works.
- Limits and budgetsWhat an AI connection is allowed to do per hour, which tools spend which budget, and how the plan’s quotas fit in.
- TroubleshootingThe problems people hit when connecting an assistant or calling the server, with the cause and the fix.
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