---
title: "创建当前用户的 MCP Upstream"
method: POST
path: "/api/v1/users/mcp/upstreams"
tags: ["【用户】MCP 配置"]
---

# 创建当前用户的 MCP Upstream

`POST /api/v1/users/mcp/upstreams`

为当前登录用户创建自定义 MCP Upstream

## Request body

- DomainCreateUserMCPUpstreamReq
  - `description` string
  - `enabled` boolean
  - `headers` DomainMCPHeader[]
    - `name` string
    - `value` string
  - `name` string
  - `slug` string
  - `url` string

## Response `200`

成功

- object
  - `code` integer
  - `data` DomainMCPUpstream
    - `created_at` integer
    - `description` string
    - `enabled` boolean
    - `headers` DomainMCPHeader[]
      - `name` string
      - `value` string
    - `health_checked_at` integer
    - `health_status` string
    - `id` string
    - `last_synced_at` integer
    - `name` string
    - `scope` 'user' | 'platform' | 'team'
    - `slug` string
    - `sync_status` string
    - `tools` DomainMCPTool[]
      - `created_at` integer
      - `description` string
      - `enabled` boolean
      - `id` string
      - `input_schema` object
      - `name` string
      - `namespaced_name` string
      - `price` integer
      - `scope` 'user' | 'platform' | 'team'
    - `type` string
    - `url` string
    - `user` DomainUser
      - `avatar_url` string
      - `email` string
      - `has_password` boolean
      - `id` string
      - `identities` DomainUserIdentity[]
        - `avatar_url` string
        - `email` string
        - `id` string
        - `identity_id` string
        - `platform` 'baizhi' | 'google' | 'github' | 'gitlab' | 'gitea' | 'gitee' | 'oidc'
        - `username` string
      - `is_blocked` boolean
      - `name` string
      - `role` 'individual' | 'enterprise' | 'subaccount' | 'admin' | 'gittask'
      - `status` 'active' | 'inactive' | 'banded'
      - `team` DomainTeam
        - `id` string
        - `name` string
      - `token` string
      - `wechat_mp_bound` boolean
  - `message` string

## Other responses

- `400` — 请求参数错误
- `401` — 未授权
- `500` — 服务器内部错误

---

[API](https://skmtc.net/chaitin/apis/untitled-api.md) · [All operations](https://skmtc.net/chaitin/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chaitin/untitled-api/versions/5a5929cb17f2/schema)
