Skip to main content
Glama
ghl-mcp-server-v2

ghl-mcp-server-v2

by zackscriven

ghl_oauth_get_access_token

Exchanges OAuth2 credentials, authorization codes, or refresh tokens for a GoHighLevel access token to access CRM resources on behalf of a company or location.

Instructions

OAuth2 token exchange (authorization_code / refresh_token grants). Form-encoded body only: the live docs (2026-08-10, breaking) no longer accept application/json, and the body fields are snake_case (client_id, client_secret, grant_type, code, refresh_token, user_type, redirect_uri). No security scheme on this op (client credentials go in the body). Get Access Token Use Access Tokens to access CRM resources on behalf of an authenticated location/company. Endpoint: POST /oauth/token (Version header: v3; source: v3/oauth-v3.json)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "ghl_oauth_get_access_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body (schema carried verbatim from the official OpenAPI spec).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv2.1.0
    • removedInput schema / properties / body / properties / clientId
      Removed value: -{
      -  "description": "The ID provided by CRM for your integration",
      -  "example": "6578278e879ad2646715ba9c",
      -  "type": "string"
      -}
    • removedInput schema / properties / body / properties / clientSecret
      Removed value: -{
      -  "description": "The client secret provided by CRM for your integration",
      -  "example": "ab12dc0ae1234a7898f9ff06d4f69gh",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / client_id
      Added value: +{
      +  "description": "The ID provided by CRM for your integration",
      +  "example": "6578278e879ad2646715ba9c",
      +  "type": "string"
      +}
    • addedInput schema / properties / body / properties / client_secret
      Added value: +{
      +  "description": "The client secret provided by CRM for your integration",
      +  "example": "ab12dc0ae1234a7898f9ff06d4f69gh",
      +  "type": "string"
      +}
    • removedInput schema / properties / body / properties / grantType
      Removed value: -{
      -  "description": "The OAuth2 grant type — authorization_code, refresh_token, or client_credentials",
      -  "enum": [
      -    "authorization_code",
      -    "refresh_token",
      -    "client_credentials"
      -  ],
      -  "example": "authorization_code",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / grant_type
      Added value: +{
      +  "description": "The OAuth2 grant type — authorization_code, refresh_token, or client_credentials",
      +  "enum": [
      +    "authorization_code",
      +    "refresh_token",
      +    "client_credentials"
      +  ],
      +  "example": "authorization_code",
      +  "type": "string"
      +}
    • removedInput schema / properties / body / properties / redirectUri
      Removed value: -{
      -  "description": "The redirect URI for your application",
      -  "example": "https://myapp.com/oauth/callback/crm",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / redirect_uri
      Added value: +{
      +  "description": "The redirect URI for your application",
      +  "example": "https://myapp.com/oauth/callback/crm",
      +  "type": "string"
      +}
    • removedInput schema / properties / body / properties / refreshToken
      Removed value: -{
      -  "description": "The refresh token used to obtain a new access token (required for refresh_token grant)",
      -  "example": "xy34dc0ae1234a4858f9ff06d4f66ba",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / refresh_token
      Added value: +{
      +  "description": "The refresh token used to obtain a new access token (required for refresh_token grant)",
      +  "example": "xy34dc0ae1234a4858f9ff06d4f66ba",
      +  "type": "string"
      +}
    • removedInput schema / properties / body / properties / userType
      Removed value: -{
      -  "description": "The type of token to be requested",
      -  "enum": [
      -    "Company",
      -    "Location"
      -  ],
      -  "example": "Location",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / user_type
      Added value: +{
      +  "description": "The type of token to be requested",
      +  "enum": [
      +    "Company",
      +    "Location"
      +  ],
      +  "example": "Location",
      +  "type": "string"
      +}
    • changedInput schema / properties / body / required
      Previous value: -[
      -  "clientId",
      -  "clientSecret",
      -  "grantType"
      -]New value: +[
      +  "client_id",
      +  "client_secret",
      +  "grant_type"
      +]
    • addedInput schema / properties / body / title
      Added value: +"GetAccessTokenBodyDto"
  2. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare openWorldHint/readOnlyHint/idempotentHint; the description adds genuinely non-obvious operational context: the body must be form-encoded, the live docs (2026-08-10) broke application/json acceptance, fields are snake_case, and there is no security scheme because credentials travel in the body. It does not mention token lifetime/expiry or that each call mints new credentials, which would have pushed it higher.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical breaking-change and encoding constraints are front-loaded and dense with signal. The trailing 'Get Access Token / Use Access Tokens to access CRM resources...' block is boilerplate across the spec and only partly earns its place, but overall the entry is compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should indicate what comes back (access token, refresh token, expiry) — it only gestures at 'use Access Tokens' generically. For a high-stakes auth tool whose response shape is undocumented elsewhere, this is a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds value the schema does not carry: the encoding must be application/x-www-form-urlencoded rather than JSON, and it enumerates the snake_case field names that must be used. That encoding constraint is exactly the kind of thing an agent would get wrong from the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'OAuth2 token exchange (authorization_code / refresh_token grants)', which tells an agent exactly what the operation does. However, it never distinguishes itself from nearby OAuth siblings such as ghl_oauth_exchange_location_token or ghl_oauth_get_location_access_token, leaving ambiguity about which token endpoint to call.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The grant-type parenthetical implies when each mode applies, and 'client credentials go in the body' hints at the client_credentials path, but there is no explicit statement of when to use this tool versus the other OAuth token tools in the sibling list. Usage must be inferred from the grant enum.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools