HasMCP Variables API

The Variables API from HasMCP — 2 operation(s) for variables.

Operations 4

GET /variables List Variables #
POST /variables Create Variable #
PATCH /variables/{id} Update Variable #
DELETE /variables/{id} Delete Variable #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hasmcp:hasmcp-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hasmcp-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HasMCP Manager Variables API
  version: 1.0.0
  description: API for managing HasMCP components like Variables, Providers, MCP Servers, Resources, and Prompts.
security:
- bearerAuth: []
tags:
- name: Variables
paths:
  /variables:
    get:
      summary: List Variables
      operationId: listVariables
      security:
      - oauth2:
        - variable:list
      responses:
        '200':
          description: A list of variables
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVariablesResponse'
      tags:
      - Variables
    post:
      summary: Create Variable
      operationId: createVariable
      security:
      - oauth2:
        - variable:create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVariableRequest'
      responses:
        '201':
          description: Variable created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVariableResponse'
      tags:
      - Variables
  /variables/{id}:
    patch:
      summary: Update Variable
      operationId: updateVariable
      security:
      - oauth2:
        - variable:update
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Variable ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVariableRequest'
      responses:
        '200':
          description: Variable updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateVariableResponse'
      tags:
      - Variables
    delete:
      summary: Delete Variable
      operationId: deleteVariable
      security:
      - oauth2:
        - variable:delete
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Variable ID
      responses:
        '204':
          description: Variable deleted
      tags:
      - Variables
components:
  schemas:
    VariableCreate:
      type: object
      properties:
        type:
          type: string
          description: '0: INVALID, 1: ENV, 2: SECRET'
          example: ENV
        value:
          type: string
          description: The variable's value.
        name:
          type: string
    ListVariablesResponse:
      type: object
      properties:
        variables:
          type: array
          items:
            $ref: '#/components/schemas/Variable'
    UpdateVariableRequest:
      type: object
      properties:
        variable:
          $ref: '#/components/schemas/VariableUpdate'
    CreateVariableRequest:
      type: object
      properties:
        variable:
          $ref: '#/components/schemas/VariableCreate'
    UpdateVariableResponse:
      type: object
      properties:
        variable:
          $ref: '#/components/schemas/Variable'
    Variable:
      type: object
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9]{11}$
          example: kSuB9Gf6aD4
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        type:
          type: string
          description: '0: INVALID, 1: ENV, 2: SECRET'
          example: ENV
        value:
          type: string
          description: The variable's value. Will be '***' if type is SECRET on retrieval.
        name:
          type: string
    CreateVariableResponse:
      type: object
      properties:
        variable:
          $ref: '#/components/schemas/Variable'
    VariableUpdate:
      type: object
      properties:
        value:
          type: string
          description: The variable's value.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Enter 'Bearer' followed by a space and your token (e.g., 'Bearer ${HASMCP_ACCESS_TOKEN}').
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.hasmcp.com/oauth2/auth
          tokenUrl: https://accounts.hasmcp.com/oauth2/token
          scopes:
            gitconnection:list: List Git connections
            gitconnection:delete: Delete Git connection
            variable:list: List variables
            variable:create: Create variable
            variable:update: Update variable
            variable:delete: Delete variable
            provider:list: List providers
            provider:create: Create provider
            provider:read: Get provider
            provider:update: Update provider
            provider:delete: Delete provider
            server:list: List MCP servers
            server:create: Create MCP server
            server:read: Get MCP server
            server:update: Update MCP server
            server:delete: Delete MCP server
            server:create_token: Create MCP server token