# https://mcp.famabook.com

Kết nối OpenAI ChatGPT, Anthropic Claude, Google Gemini Spark (Ultra), Kimi Desktop, v.v.. qua https://mcp.famabook.com

Liên hệ 0903237207 hoặc dùng web-phone miễn phí (ở trang chủ https://bkit.vn góc dưới bên trái) để famabook.com cài đặt cho bạn.


```
{
  "mcpServers": {
    "famabook": {
      "type": "http",
      "url": "https://mcp.famabook.com/mcp",
      "oauth": {
        "clientId": "mcp",
        "callbackPort": 8080,
        "authServerMetadataUrl": "https://auth.bkit.vn/realms/bkit/.well-known/openid-configuration"
      }
    },
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

hoặc tự động phê duyệt thao tác chỉ đọc

```json
{
  "mcpServers": {
    "bkit-accounting": {
      "serverUrl": "https://mcp.famabook.com/sse",
      "headers": {
        "Authorization": "Bearer ${env:FAMABOOK_MCP_TOKEN}",
        "X-Api-Key": "${env:FAMABOOK_MCP_KEY}"
      },
      "oauth2": {
        "issuer": "https://auth.bkit.vn/realms/bkit",
        "authorizationUrl": "https://auth.bkit.vn/realms/bkit/protocol/openid-connect/auth",
        "tokenUrl": "https://auth.bkit.vn/realms/bkit/protocol/openid-connect/token",
        "clientId": "webapp",
        "pkce": true,
        "scopes": [
          "openid",
          "profile",
          "email",
          "mcp:tools"
        ]
      },
      "autoApprove": [
        "search_system_menu",
        "list_entities",
        "get_entity_schema",
        "get_records",
        "get_record_by_id",
        "search_records",
        "count_records",
        "execute_query",
        "view_financial_dashboard",
        "render_accounting_analytics",
        "render_partner_bar_chart",
        "export_entity_to_excel",
        "generate_catalog_excel_template",
        "get_application_downloads",
        "execute_year_end_closing_task"
      ]
    },
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

hoặc

```json
{
  "mcpServers": {
    "famabook": {
      "type": "http",
      "url": "https://mcp.famabook.com/mcp",
      "oauth": {
        "clientId": "mcp",
        "callbackPort": 8080,
        "authServerMetadataUrl": "https://auth.bkit.vn/realms/bkit/.well-known/openid-configuration"
      },
      "autoApprove": [
        "search_system_menu",
        "list_entities",
        "get_entity_schema",
        "get_records",
        "get_record_by_id",
        "search_records",
        "count_records",
        "view_financial_dashboard",
        "render_accounting_analytics",
        "render_partner_bar_chart",
        "export_entity_to_excel",
        "generate_catalog_excel_template",
        "get_application_downloads"
      ]
    },
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}

```

## Thông tin đấu nối với ChatGPT, Claude


Dưới đây là đầy đủ thông tin để bạn khai báo và kết nối **WebMCP / MCP / Custom GPT Actions** trong **ChatGPT** với domain `famabook.com`:

---

### 1. Khai báo Custom GPT Action (OpenAPI Schema) trong ChatGPT

Khi tạo hoặc chỉnh sửa **Custom GPT** (mục *Configure* -> *Actions* -> *Create new action*):

* **Import from URL:**
  ```text
  https://famabook.com/openapi.json
  ```
  *(Hoặc dự phòng: `https://famabook.com/api/openapi.json`)*

* **Authentication (Xác thực):**
    * **Authentication Type**: `Bearer` (hoặc `None` nếu dùng chế độ công khai).
    * **Token**: Truyền Keycloak JWT Token của người dùng.
    * **Custom Headers (nếu cần chỉ định đơn vị/kỳ)**:
        * `X-Tenant-Id`: ``
        * `X-Organization-Id`: ``
        * `X-Fiscal-Year-Id`: ``

---

### 2. Khai báo kết nối MCP Server (Model Context Protocol)

Nếu ChatGPT / Client hỗ trợ kết nối trực tiếp giao thức MCP (SSE / JSON-RPC):

| Mục cấu hình | Giá trị |
| :--- | :--- |
| **Server Name** | `bkit-accounting-mcp` |
| **Transport** | `SSE` hoặc `HTTP Streaming` |
| **Server URL / Endpoint** | `https://famabook.com/mcp` |
| **SSE Stream URL** | `https://famabook.com/mcp/sse` |
| **JSON-RPC Endpoint** | `https://famabook.com/api/mcp` |

---

### 3. Khai báo WebMCP & Agent Discovery (Chuẩn Chrome AI / WebML)

Hệ thống cung cấp các endpoint khám phá tự động (Auto-discovery) theo chuẩn WebMCP:

* **WebMCP Manifest**:
  ```text
  https://famabook.com/.well-known/webmcp.json
  https://famabook.com/api/webmcp/manifest.json
  ```
* **Danh sách Tools (WebMCP)**:
  ```text
  GET https://famabook.com/api/webmcp/tools
  ```
* **Thực thi Tool (WebMCP Execute)**:
  ```text
  POST https://famabook.com/api/webmcp/execute
  ```
* **A2A Agent Card**:
  ```text
  https://famabook.com/.well-known/agent-card.json
  ```

---

### 4. Gợi ý Prompt cấu hình Instructions cho GPT / AI Assistant

Bạn có thể dán đoạn hướng dẫn sau vào mục **Instructions** của GPT:

```text
Bạn là Trợ lý Kế toán Thông minh kết nối với Hệ thống Kế toán BKIT famabook (Tuân thủ Thông tư 99/2025/TT-BTC).
Bạn có thể sử dụng các công cụ MCP / WebMCP có sẵn để:
1. Tra cứu danh mục tài khoản (accounting_account), đối tượng (party), hàng hóa (goods), tài sản (fixed_asset).
2. Tra cứu và lọc chứng từ kế toán, báo cáo tài chính, tổng quan doanh thu, chi phí.
3. Hỗ trợ định khoản kế toán kép (Nợ / Có) chính xác theo luật kế toán Việt Nam.
4. Điều hướng người dùng tới đúng phân hệ màn hình con trong `/dashboard/...`.
```

Trí tuệ nhân tạo có thể mắc sai sót. Kiểm tra lại thông tin và kết quả do Trí tuệ nhân tạo tạo ra.
