Ask Sage MCP Servers API
Model Context Protocol server management
Model Context Protocol server management
openapi: 3.0.3
info:
title: Ask Sage Server Admin MCP Servers API
description: 'Ask Sage is an AI-powered platform providing intelligent completions, knowledge management, and workflow automation.
## Base URL
`https://api.asksage.ai`
## Authentication
All endpoints require a valid JWT token passed via the `x-access-tokens` header, unless otherwise noted.
Obtain a token by authenticating through the User API (`/user/get-token-with-api-key`).
## Message Format
The `message` field in API requests can be either:
- A single string prompt: `"What is Ask Sage?"`
- An array of conversation messages: `[{"user": "me", "message": "what is Ask Sage?"}, {"user": "gpt", "message": "Ask Sage is an..."}]`
## Key Features
- **AI Completions** — Query multiple LLM providers with a unified interface
- **Knowledge Training** — Upload documents, files, and data to build custom datasets
- **Tabular Data** — Ingest and query structured data (CSV, XLSX) with natural language
- **Agent Builder** — Create, configure, and execute multi-step AI workflows
- **Plugins** — Extend capabilities with built-in and custom plugins
- **MCP Servers** — Connect to Model Context Protocol servers for tool integration'
version: '2.0'
contact:
name: Ask Sage Support
email: support@asksage.ai
url: https://asksage.ai
servers:
- url: '{baseUrl}/server'
description: Ask Sage Server API
variables:
baseUrl:
default: https://api.asksage.ai
description: API base URL. Use https://api.asksage.ai for production, or your self-hosted instance URL.
security:
- ApiKeyAuth: []
tags:
- name: MCP Servers
description: Model Context Protocol server management
paths:
/add-mcp-server:
post:
summary: Add MCP server
description: Add a new MCP (Model Context Protocol) server for the user
tags:
- MCP Servers
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MCPServer'
responses:
'200':
description: MCP server added successfully
content:
application/json:
schema:
type: object
properties:
response:
type: string
server_id:
type: integer
status:
type: integer
get:
summary: Add MCP server (GET)
description: Add a new MCP (Model Context Protocol) server for the user (GET method supported)
tags:
- MCP Servers
responses:
'200':
description: MCP server added successfully
content:
application/json:
schema:
type: object
properties:
response:
type: string
server_id:
type: integer
status:
type: integer
/update-mcp-server:
put:
summary: Update MCP server
description: Update an existing MCP server configuration
tags:
- MCP Servers
requestBody:
required: true
content:
application/json:
schema:
allOf:
- type: object
required:
- server_id
properties:
server_id:
type: integer
description: ID of the server to update
- $ref: '#/components/schemas/MCPServer'
responses:
'200':
description: MCP server updated successfully
content:
application/json:
schema:
type: object
properties:
response:
type: string
server_id:
type: integer
status:
type: integer
/list-mcp-servers:
get:
summary: List user's MCP servers
description: Get a list of all MCP servers configured for the user
tags:
- MCP Servers
parameters:
- name: include_inactive
in: query
schema:
type: boolean
default: false
description: Include inactive servers in the list
responses:
'200':
description: List of MCP servers
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
count:
type: integer
status:
type: integer
post:
summary: List user's MCP servers (POST)
description: Get a list of all MCP servers configured for the user
tags:
- MCP Servers
requestBody:
content:
application/json:
schema:
type: object
properties:
include_inactive:
type: boolean
default: false
description: Include inactive servers
responses:
'200':
description: List of MCP servers
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
count:
type: integer
status:
type: integer
/list-mcp-whitelisted-servers:
get:
summary: List whitelisted MCP servers
description: Get a list of all whitelisted MCP servers
tags:
- MCP Servers
responses:
'200':
description: List of whitelisted servers
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: string
status:
type: integer
post:
summary: List whitelisted MCP servers (POST)
description: Get a list of all whitelisted MCP servers
tags:
- MCP Servers
responses:
'200':
description: List of whitelisted servers
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: string
status:
type: integer
/list-mcp-tools:
get:
summary: List MCP tools
description: Get a list of all available MCP tools from configured servers
tags:
- MCP Servers
responses:
'200':
description: List of MCP tools
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
count:
type: integer
status:
type: integer
post:
summary: List MCP tools (POST)
description: Get a list of all available MCP tools from configured servers
tags:
- MCP Servers
responses:
'200':
description: List of MCP tools
content:
application/json:
schema:
type: object
properties:
response:
type: array
items:
type: object
count:
type: integer
status:
type: integer
/delete-mcp-server:
delete:
summary: Delete MCP server
description: Soft delete an MCP server by setting it as inactive
tags:
- MCP Servers
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- server_id
properties:
server_id:
type: integer
description: ID of the server to delete
responses:
'200':
description: Server deleted successfully
content:
application/json:
schema:
type: object
properties:
response:
type: string
server_id:
type: integer
status:
type: integer
'404':
description: Server not found or access denied
post:
summary: Delete MCP server (POST)
description: Soft delete an MCP server by setting it as inactive
tags:
- MCP Servers
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- server_id
properties:
server_id:
type: integer
description: ID of the server to delete
responses:
'200':
description: Server deleted successfully
content:
application/json:
schema:
type: object
properties:
response:
type: string
server_id:
type: integer
status:
type: integer
'404':
description: Server not found or access denied
components:
schemas:
MCPServer:
type: object
required:
- server_name
- server_url
properties:
server_name:
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9\s\-_.]+$
description: Name of the MCP server
server_url:
type: string
minLength: 1
maxLength: 2048
description: HTTPS URL of the MCP server
server_type:
type: string
maxLength: 50
pattern: ^[a-zA-Z0-9\-_]+$
description: Type of MCP server
description:
type: string
maxLength: 1000
description: Description of the MCP server
metadata_json:
type: string
description: Additional metadata in JSON format
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-access-tokens
description: JWT authentication token. Obtain a token by calling the User API endpoint `/user/get-token-with-api-key` with your email and API key.