Connecting AI agents (MCP)
The public API is also a remote MCP server, so any compatible agent client can use it as a set of tools. Every REST operation becomes one tool, derived from the same OpenAPI document this site publishes.
Option 1: sign in with OAuth
Paste the endpoint URL into the client and it discovers the authorization server and opens a consent screen in your browser. Clients with a stable metadata-document identity use it directly; other compatible clients dynamically register as a fallback. You approve the requested scopes once, and the grant can be revoked under Settings → API & MCP. OAuth is the only option for hosted assistants with no bearer-token field.
Option 2: send an API key
Create a key in your account settings, grant it only the scopes the agent needs, and have the client send it as an Authorization bearer header. The secret is shown once at creation. Command-line and editor clients support this; it needs no browser round trip, which makes it convenient for scripts and CI.
Per-client setup
MCP endpoint
https://nextjs-saas-template.lubomirgeorgiev.com/mcpStreamable HTTP. Most clients only need this URL.
The client opens a browser window and you approve the requested scopes once. Nothing to copy, and you can revoke it later from the connected apps list under Settings → API & MCP.
Run this command.
claude mcp add --transport http saas-template https://nextjs-saas-template.lubomirgeorgiev.com/mcp
# then run /mcp inside Claude Code and authenticate in the browserPaste this URL into the client's connector settings.
https://nextjs-saas-template.lubomirgeorgiev.com/mcpPaste this URL into the client's connector settings.
https://nextjs-saas-template.lubomirgeorgiev.com/mcpRun this command.
codex mcp add saas-template --url https://nextjs-saas-template.lubomirgeorgiev.com/mcp
codex mcp login saas-templateAdd this to ~/.cursor/mcp.json.
{
"mcpServers": {
"saas-template": {
"url": "https://nextjs-saas-template.lubomirgeorgiev.com/mcp"
}
}
}Add this to .vscode/mcp.json.
{
"servers": {
"saas-template": {
"type": "http",
"url": "https://nextjs-saas-template.lubomirgeorgiev.com/mcp"
}
}
}Add this to ~/.gemini/config/mcp_config.json.
{
"mcpServers": {
"saas-template": {
"serverUrl": "https://nextjs-saas-template.lubomirgeorgiev.com/mcp"
}
}
}Run this command.
grok mcp add --transport http saas-template https://nextjs-saas-template.lubomirgeorgiev.com/mcp
# OAuth runs on first use; approve in the browser, or press i on the server in /mcpsAdd this to ~/.config/opencode/opencode.json.
{
"mcp": {
"saas-template": {
"type": "remote",
"url": "https://nextjs-saas-template.lubomirgeorgiev.com/mcp",
"enabled": true
}
}
}Which tools an agent sees
Tool listings are filtered by the credential: an operation whose scope the key or grant does not hold is never advertised, so an agent cannot even attempt it. Team permissions are checked again on every call, so revoking someone's membership removes their agent's access too. Failed calls come back with the API's stable error code rather than translated prose, which is what lets a model react to a missing scope or a rate limit.