Add API documentation (#275)

This commit is contained in:
samanhappy
2025-08-14 14:12:15 +08:00
committed by GitHub
parent cbb3b15ba2
commit bdb5b37cf5
29 changed files with 1767 additions and 2868 deletions

View File

@@ -1,33 +1,13 @@
---
title: 'Introduction'
description: 'Example section for showcasing API endpoints'
title: "Introduction"
description: "Welcome to the MCPHub API documentation."
---
<Note>
If you're not looking to build API reference documentation, you can delete
this section by removing the api-reference folder.
</Note>
The MCPHub API provides a comprehensive set of endpoints to manage your MCP servers, groups, users, and more. The API is divided into two main categories:
## Welcome
- **MCP Endpoints**: These are the primary endpoints for interacting with your MCP servers. They provide a unified interface for sending requests to your servers and receiving responses in real-time.
- **Management API**: These endpoints are used for managing the MCPHub instance itself. This includes managing servers, groups, users, and system settings.
There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.
All API endpoints are available under the `/api` path. For example, the endpoint to get all servers is `/api/servers`.
<Card
title="Plant Store Endpoints"
icon="leaf"
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
>
View the OpenAPI specification file
</Card>
## Authentication
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
```json
"security": [
{
"bearerAuth": []
}
]
```
Authentication is required for most Management API endpoints. See the [Authentication](/api-reference/auth) section for more details.