---
title: "MCP 握手"
method: POST
path: "/api/v1/handshake"
tags: ["MCP Protocol"]
---

# MCP 握手

`POST /api/v1/handshake`

## Request

- Base URL: `https://aishield.tools`
- URL: `https://aishield.tools/api/v1/handshake`
- Auth: none required

与 AIShield MCP 服务端进行握手验证。

工具需要提供名称、版本和能力列表，通过握手后可使用 MCP 协议进行后续通信。

## Request body

- HandshakeRequest: MCP 握手请求
  - `tool_name` string, required: 工具名称
  - `tool_version` string: 工具版本
  - `capabilities` string[]: 工具支持的能力列表
  - `endpoint` string: 工具的 MCP 端点 URL

## Response `200`

握手成功

- object
  - `success` boolean
  - `session_id` string
  - `server_info` object

## Other responses

- `400`: 参数缺失或无效
- `500`: 握手失败

---

[API](https://skmtc.dev/aishield/apis/aishield-api.md) · [All operations](https://skmtc.dev/aishield/apis/aishield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aishield/apis/aishield-api/revisions/9a04f4fb94bd?raw)
