---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/vi/api-reference/mcp/connect

Ứng dụng AI (MCP)

# Kết nối ứng dụng

Thêm Sendcorex vào Claude, Claude Code, Cursor, VS Code hoặc bất kỳ client MCP nào. Dùng URL tài khoản, URL hộp thư, hoặc cả hai.

- Streamable HTTP
- OAuth trong Claude
- API key ở mọi nơi

## URL máy chủ

Tài khoản`https://g.sendcorex.com/mcp/account`

Tên miền, người gửi, mẫu, log, liên hệ, xác thực và gửi email.

Hộp thư`https://g.sendcorex.com/mcp/inbox`

Một hộp thư: đọc, tìm, trả lời, sắp xếp và quy tắc.

Muốn ít công cụ hơn trong ngữ cảnh mô hình? Thêm `?tools=domain,logs` vào URL tài khoản, hoặc `?tools=mail,compose` vào URL hộp thư.

## Claude (claude.ai và ứng dụng desktop)

OAuth

1. 1
Mở Settings → Connectors → Add custom connector.
2. 2
Dán URL tài khoản (hoặc URL hộp thư) và nhấp Add.
3. 3
Nhấp Connect. Cửa sổ Sendcorex mở ra: đăng nhập nếu cần, chọn quyền (hoặc hộp thư) và nhấp Ủy quyền.
4. 4
Quay lại Claude, mở chat mới và hỏi. Claude tự gia hạn quyền truy cập.

Tài khoản

```
https://g.sendcorex.com/mcp/account
```

Hộp thư (mỗi hộp thư một lần)

```
https://g.sendcorex.com/mcp/inbox
```

Thêm lại URL hộp thư cho mỗi hộp thư bạn muốn Claude dùng, và chọn hộp thư khác mỗi lần.

## Claude Code

OAuth hoặc API key

1. 1
Với OAuth: thêm máy chủ, chạy /mcp trong Claude Code và chọn Authenticate.
2. 2
Với API key: truyền nó làm header. Quyền của key quyết định công cụ nào hiện ra.

OAuth

```
claude mcp add --scope user --transport http sendcorex https://g.sendcorex.com/mcp/account
```

API key

```
claude mcp add --scope user --transport http sendcorex https://g.sendcorex.com/mcp/account \
  --header "Authorization: Bearer $SENDCOREX_API_KEY"
```

## Cursor

API key

1. 1
Mở Settings → MCP → Add new MCP server, hoặc sửa ~/.cursor/mcp.json.
2. 2
Dán cấu hình và tải lại.

~/.cursor/mcp.json

```
{
  "mcpServers": {
    "sendcorex": {
      "url": "https://g.sendcorex.com/mcp/account",
      "headers": { "Authorization": "Bearer YOUR_SENDCOREX_API_KEY" }
    }
  }
}
```

## VS Code (GitHub Copilot)

API key

1. 1
Tạo .vscode/mcp.json trong dự án (hoặc chạy MCP: Add Server).
2. 2
VS Code hỏi key lần đầu và lưu an toàn.

.vscode/mcp.json

```
{
  "inputs": [
    { "type": "promptString", "id": "sendcorex-key", "description": "Sendcorex API key", "password": true }
  ],
  "servers": {
    "sendcorex": {
      "type": "http",
      "url": "https://g.sendcorex.com/mcp/account",
      "headers": { "Authorization": "Bearer ${input:sendcorex-key}" }
    }
  }
}
```

## Client MCP khác

OAuth hoặc API key

1. 1
Truyền tải: Streamable HTTP (POST, phản hồi JSON, không phiên).
2. 2
Xác thực: Authorization: Bearer với API key, hoặc OAuth 2.1 với PKCE (phát hiện từ phản hồi 401).
3. 3
Phiên bản giao thức: 2024-11-05, 2025-03-26, 2025-06-18 và 2025-11-25.

## Kiểm tra kết nối

Liệt kê công cụ key của bạn dùng được. Danh sách trống nghĩa là key không có quyền tài khoản nào. [Sửa key](https://app.sendcorex.com/dashboard/developer) hoặc đọc [Xác thực](https://docs.sendcorex.com/vi/api-reference/mcp/authentication) .

curl

```
curl -s https://g.sendcorex.com/mcp/account \
  -H "Authorization: Bearer $SENDCOREX_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```
