Logo Hitl MCP

Hitl MCP

Tổ chức
ZenlixAI

A production-ready, state-persistent MCP server for Human-in-the-Loop (HITL) interaction. Enables AI agents to suspend execution, ask structured questions to users, and resume contextually across sessions — friendly with ACP.

Nhà phát hànhZenlixAI
Kho mãhitl-mcp
Ngôn ngữTypeScript
Bản fork
2
Sao
46
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Hitl MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    46 sao và 2 bản fork từ kho mã được liên kết.

hitl-mcp

Question-only HITL MCP server for agent workflows.

TypeScript MCP License

English | 中文


Table of Contents


Background

In many Agent systems, the Agent eventually reaches a point where it cannot continue autonomously:

  • a human must approve or reject a decision
  • a human must choose one option from several candidates
  • a human must provide missing business input
  • a workflow must pause until manual confirmation arrives

Without a dedicated HITL layer, these workflows are usually implemented with ad hoc prompts, side-channel UIs, or custom callback protocols. That creates three recurring problems:

  1. The Agent and the application do not share a stable model for "pending human input".
  2. Human answers are hard to correlate with the exact Agent run and session that requested them.
  3. Waiting, partial submission, cancellation, and recovery semantics become inconsistent across clients.

hitl-mcp solves this by exposing a narrow, explicit contract for human questions:

  • Agents create questions
  • clients or operator UIs read pending questions
  • humans answer, skip, or cancel them
  • Agents wait on a caller-scoped state machine until work is complete

What hitl-mcp is

hitl-mcp is a question-oriented human-in-the-loop server built on MCP and HTTP.

It provides two access surfaces over the same underlying state:

  • MCP tools for Agents and Agent platforms
  • HTTP APIs for operator consoles, backends, or custom approval UIs

The public abstraction is intentionally small:

  • the public unit is question
  • questions belong to a caller scope
  • answers may be submitted incrementally
  • waiting is modeled as a scope-level operation, not a question-level long poll

The server is designed for workflows where the Agent is the initiator, but a human completes part of the decision loop.


Goals

  • Provide a stable, minimal HITL contract for Agent workflows.
  • Make caller isolation explicit through agent_identity and agent_session_id.
  • Support multiple pending questions in the same caller scope.
  • Support partial progress instead of forcing an all-at-once final submission.
  • Allow MCP and HTTP clients to operate on the same underlying question state.
  • Keep storage pluggable so local development can use memory and production can use Redis.
  • Keep operational behavior observable through health, readiness, metrics, and structured logs.

Non-goals

  • Not a generic workflow engine.
  • Not a UI framework for approval consoles.
  • Not a task queue or event bus.
  • Not a general-purpose form builder.
  • Not a policy engine for access control and reviewer assignment.
  • Not a durable orchestration platform for arbitrary business processes.

hitl-mcp only manages question state, caller scoping, waiting semantics, and answer submission.


Core model

Public unit: question

Externally, the system only exposes question.

A question has:

  • a server-generated question_id
  • a type
  • prompt metadata such as title, description, tags, and extra
  • for single_choice, each option may also declare followup_fields
  • an optional default_answer
  • a status such as pending, answered, skipped, or cancelled

Supported question types:

  • single_choice
  • multi_choice
  • text
  • boolean
  • range

Caller scope

Every operation is scoped by:

  • agent_identity
  • agent_session_id

This scope is the isolation boundary for:

  • creating questions
  • listing pending questions
  • waiting for progress
  • submitting answers
  • cancelling questions

Two Agents can ask identical questions without colliding as long as their caller scopes differ.

Internal groups vs public API

The storage layer may still use grouping internally, but grouping is an implementation detail.

The public API is intentionally question-first:

  • create questions
  • fetch pending questions
  • submit answers by question_id
  • cancel by question_id
  • wait on the scope

Partial submission

Answers do not need to arrive in one batch.

The server accepts incremental progress:

  • answer one question now
  • answer another question later
  • skip optional questions explicitly
  • continue waiting until the scope becomes complete

Answer payloads remain backward compatible:

  • existing callers may continue sending { value }
  • when a selected single_choice option declares followup_fields, callers may send { value, fields }
  • required followup_fields are validated against the selected option

Timeout auto-response

Question groups may also define timeout behavior at creation time.

  • callers may set timeout_seconds
  • if omitted, the server uses HITL_PENDING_DEFAULT_TIMEOUT_SECONDS
  • each question may set default_answer
  • if omitted, the server derives one by question type

Timed-out pending questions are automatically answered with their resolved default answers.

  • in memory mode, this works for single-process deployments via an in-process timeout worker
  • in redis mode, this works across instances via Redis-backed timeout processing

The derived defaults are:

  • single_choice: first option value
  • multi_choice: first option value as a single-element array
  • boolean: true
  • range: range_constraints.min
  • text: "none"

Timeout-generated answers keep the normal answered status and add metadata such as:

  • auto_response_at
  • is_timeout_auto_response

Wait modes

hitl_wait and the equivalent scope-level wait behavior support two modes:

  • terminal_only: return only when the scope has no pending questions left
  • progressive: return after every state change, then let the caller wait again

terminal_only is simpler for linear workflows. progressive is better when the caller needs to react to each intermediate update.

When hitl_wait is called through MCP, it also emits a progress notification every 30 seconds while the wait is still pending.


Quick start

Installation

bash
git clone <your-repo-url>
cd hitl-mcp
npm install

Run in development

bash
npm run dev

Default local bind:

  • HTTP base URL: http://0.0.0.0:3000
  • MCP base URL: http://0.0.0.0:3000/mcp
  • HTTP API prefix: /api/v1

Run with Docker

Build the image:

bash
docker build -t hitl-mcp .

Run with in-memory storage:

bash
docker run --rm -p 3000:3000 \
  -e MCP_URL=http://localhost:3000 \
  hitl-mcp

Run with Redis:

bash
docker run --rm -p 3000:3000 \
  -e MCP_URL=http://localhost:3000 \
  -e HITL_STORAGE=redis \
  -e HITL_REDIS_URL=redis://host.docker.internal:6379 \
  hitl-mcp

Run from source with environment variables

bash
export MCP_URL=http://localhost:3000
npm run dev

Minimal create request

bash
curl -X POST "http://localhost:3000/api/v1/questions" \
  -H "Content-Type: application/json" \
  -H "x-agent-identity: agent/example" \
  -H "x-agent-session-id: session-123" \
  -d '{
    "title": "Outline confirmation",
    "questions": [
      {
        "type": "single_choice",
        "title": "Confirm the current outline",
        "options": [
          { "value": "approved", "label": "Approved" },
          {
            "value": "revise",
            "label": "Revise",
            "followup_fields": [
              {
                "id": "comment",
                "type": "text",
                "label": "Revision comment",
                "required": true,
                "description": "Explain what should change."
              }
            ]
          }
        ]
      }
    ]
  }'

How interaction works

This section describes the intended runtime flow, regardless of whether the caller uses MCP tools or HTTP APIs.

Sequence 1: standard ask -> wait -> answer -> complete

  1. The Agent creates one or more questions in its caller scope.
  2. The Agent immediately calls hitl_wait.
  3. A UI or backend fetches pending questions for the same caller scope.
  4. A human answers one or more pending questions.
  5. The Agent waits on the scope.
  6. When the scope has no pending questions left, wait returns a terminal result.

Sequence 2: partial submission

  1. The Agent creates multiple questions.
  2. The human answers only a subset.
  3. The server persists those answers and keeps the remaining questions pending.
  4. The Agent can keep waiting.
  5. Additional submissions continue until the scope is complete.

Sequence 3: progressive wait

  1. HITL_WAIT_MODE=progressive
  2. The Agent calls hitl_wait.
  3. Any answer, skip, or cancellation in the scope wakes the waiter.
  4. The wait result reports which question_ids changed.
  5. The Agent decides whether to continue waiting or act on the intermediate update.

Sequence 4: cancellation

  1. A caller cancels one question or all pending questions in the scope.
  2. The server updates scope state and notifies waiters.
  3. If no pending questions remain, the scope becomes terminal.

Sequence 5: timeout auto-response

  1. The Agent creates questions with explicit or implicit timeout behavior.
  2. In Redis mode, the server schedules the pending group for timeout processing.
  3. If no human response arrives before the deadline, a Redis-backed timeout worker auto-answers remaining pending questions.
  4. The worker publishes a scope update so waiters on any instance can wake up.
  5. hitl_wait returns the completed scope snapshot with timeout metadata on affected questions.

Scope semantics

Wait is always a scope-level operation.

This is deliberate:

  • one Agent run may have multiple pending questions
  • the Agent usually cares whether the workflow can continue
  • scope-level wait avoids fragmented per-question synchronization logic

Operational rule:

  • after every hitl_ask, the next HITL tool call must be hitl_wait
  • do not treat hitl_ask as completion
  • do not substitute hitl_get_pending_questions for the first post-ask wait

MCP tools

hitl-mcp exposes the following MCP tools:

hitl_ask

Creates one or more questions for the current caller scope.

Input shape:

json
{
  "title": "Release decision",
  "description": "Human approval required before deploy",
  "ttl_seconds": 3600,
  "timeout_seconds": 900,
  "questions": [
    {
      "type": "boolean",
      "title": "Approve deployment?",
      "default_answer": { "value": true }
    }
  ]
}

Notes:

  • question_id must not be provided by the caller
  • the server generates question_id
  • one request can create multiple questions
  • explicit default_answer is recommended
  • if default_answer is omitted, the server derives one
  • if timeout_seconds is omitted, the server uses the configured default timeout

hitl_wait

Waits on the current caller scope.

Typical response fields:

  • status
  • is_terminal
  • changed_question_ids
  • pending_questions
  • resolved_questions
  • answered_question_ids
  • skipped_question_ids
  • cancelled_question_ids
  • is_complete

resolved_questions contains the full resolved question objects plus their final status and any stored answer.

When a result was produced by timeout automation, the resolved question may also include:

  • auto_response_at
  • is_timeout_auto_response

When called over MCP, hitl_wait also sends notifications/progress updates every 30 seconds while still waiting.

hitl_get_pending_questions

Returns all pending questions in the current caller scope.

hitl_submit_answers

Submits new answers and optional skips.

Input shape:

json
{
  "answers": {
    "q_01JXYZ...": { "value": true }
  },
  "skipped_question_ids": ["q_01JABC..."],
  "idempotency_key": "idem-1"
}

Notes:

  • answers may contain any subset of pending questions
  • optional questions may be skipped explicitly
  • required questions cannot be skipped
  • submissions accumulate server-side

hitl_cancel_questions

Cancels selected pending questions or all pending questions in the scope.

Input shape:

json
{
  "question_ids": ["q_01JXYZ..."],
  "reason": "no longer needed"
}

Or:

json
{
  "cancel_all": true
}

hitl_get_question

Fetches one question by question_id.


HTTP API

The HTTP control plane is primarily for operator UIs, backend services, and troubleshooting.

Response envelope

All HTTP responses use the same envelope:

json
{
  "request_id": "http-request-id",
  "success": true,
  "data": {},
  "error": null
}

On failure:

json
{
  "request_id": "http-request-id",
  "success": false,
  "data": {},
  "error": {
    "code": "QUESTION_NOT_FOUND",
    "message": "question not found",
    "details": null
  }
}

Headers and identity rules

For question APIs, the server requires a session header on every caller-scoped request:

  • default session header: x-agent-session-id

Identity rules:

  • send x-agent-identity on every caller-scoped request

Operationally:

  • the server reads agent_identity directly from x-agent-identity

GET /api/v1/healthz

Returns liveness status.

GET /api/v1/readyz

Returns readiness status.

This is the correct probe for Redis-backed production deployments.

GET /api/v1/metrics

Returns an in-process metrics snapshot.

POST /api/v1/questions

Creates one or more questions for the current caller scope.

Request body:

json
{
  "title": "Release decision",
  "description": "Human approval required before deploy",
  "ttl_seconds": 3600,
  "timeout_seconds": 900,
  "questions": [
    {
      "type": "single_choice",
      "title": "Confirm the current outline",
      "options": [
        { "value": "approved", "label": "Approved" },
        {
          "value": "revise",
          "label": "Revise",
          "followup_fields": [
            {
              "id": "comment",
              "type": "text",
              "label": "Revision comment",
              "required": true,
              "description": "Explain what should change."
            }
          ]
        }
      ],
      "default_answer": { "value": "approved" }
    },
    {
      "type": "text",
      "title": "Anything to note?",
      "required": false,
      "default_answer": { "value": "none" }
    }
  ]
}

Supported question payloads:

  • single_choice with options
  • single_choice.options[].followup_fields for option-specific text follow-up inputs
  • multi_choice with options
  • text with optional text_constraints
  • boolean
  • range with range_constraints

Additional create-time fields:

  • timeout_seconds: optional positive integer timeout for the group
  • default_answer: optional per-question fallback answer used by Redis timeout auto-response

GET /api/v1/questions/pending

Returns all pending questions for the current caller scope.

POST /api/v1/questions/answers

Submits answered and skipped questions.

Request body:

json
{
  "answers": {
    "q_01JXYZ...": {
      "value": "revise",
      "fields": {
        "comment": "Please add recovery conditions."
      }
    }
  },
  "skipped_question_ids": ["q_01JABC..."],
  "idempotency_key": "idem-1"
}

Behavior:

  • accepts partial progress
  • persists cumulative scope state
  • wakes scope waiters after successful submission
  • continues to accept plain { value } answers when no follow-up fields are required

Typical error codes:

  • QUESTION_NOT_FOUND
  • ANSWER_VALIDATION_FAILED

POST /api/v1/questions/cancel

Cancels pending questions in the current caller scope.

Request body:

json
{
  "question_ids": ["q_01JXYZ..."],
  "reason": "no longer needed"
}

Or:

json
{
  "cancel_all": true
}

GET /api/v1/questions/:question_id

Fetches one question by question_id.

If the question does not exist, the server returns 404 with QUESTION_NOT_FOUND.


Runtime configuration

Configuration sources and precedence

Configuration is loaded in this order:

  1. built-in defaults
  2. config/hitl-mcp.yaml
  3. .env
  4. process environment variables

Later sources override earlier ones.

Environment variables

The following environment variables are currently supported by the codebase.

VariableDefaultPurposeWhen to change
PORT3000Fallback HTTP port. Equivalent to HITL_HTTP_PORT when set.Change when your runtime injects only PORT or when a platform requires a fixed port env.
MCP_URLhttp://0.0.0.0:3000Public base URL used by the MCP server metadata.Change in any non-local deployment so MCP clients receive the reachable external URL.
HITL_SERVER_NAMEhitl-mcpMCP server name metadata.Change when embedding this server under another product identity.
HITL_SERVER_VERSION0.1.0MCP server version metadata.Change when publishing a packaged build with an explicit runtime version.
HITL_HTTP_HOST0.0.0.0HTTP bind host.Change only if you intentionally want loopback-only binding or a different interface.
HITL_HTTP_PORT3000Explicit HTTP port. Overrides the default port.Change in local multi-service setups or production platforms with custom port mapping.
HITL_HTTP_API_PREFIX/api/v1Prefix for HTTP control-plane routes.Change only if you need to mount the API behind a different path segment.
HITL_STORAGEmemoryStorage backend selection: memory or redis.Set to redis for multi-process or durable deployments.
HITL_REDIS_URLredis://127.0.0.1:6379Redis connection URL.Required when HITL_STORAGE=redis outside local defaults.
HITL_REDIS_PREFIXhitlRedis key prefix.Change when multiple environments share one Redis instance.
HITL_TTL_SECONDS604800Default TTL for newly created question sets.Change to align pending-question retention with your business SLA.
HITL_ANSWERED_RETENTION_SECONDS2592000Retention window for answered state.Change when auditability or storage pressure requires a different retention period.
HITL_PENDING_MAX_WAIT_SECONDS0Maximum duration for one wait call. 0 means no timeout limit.Change when you need bounded waits for worker scheduling or request lifecycle control.
HITL_WAIT_MODEterminal_onlyScope wait behavior: terminal_only or progressive.Set to progressive when callers must react to each intermediate update.
HITL_PENDING_DEFAULT_TIMEOUT_SECONDS900Default timeout for newly created pending question groups when timeout_seconds is omitted.Change when human response SLAs differ across environments.
HITL_PENDING_TIMEOUT_POLL_INTERVAL_SECONDS5Polling interval for the Redis timeout worker. Small drift from the exact timeout boundary is acceptable.Change when you want tighter or looser timeout-trigger granularity.
HITL_AGENT_SESSION_HEADERx-agent-session-idHeader name used to read agent_session_id.Change when integrating with an existing gateway or client that uses another session header.
HITL_CREATE_CONFLICT_POLICYerrorCreate conflict policy in config surface.Keep at default. The current code validates and loads it, but it is not currently applied by request handlers.
HITL_LOG_LEVELinfoStructured logging level: debug, info, warn, error.Raise or lower verbosity to match debugging and production noise requirements.
HITL_ENABLE_METRICStrueEnables metrics collection in config.Leave enabled unless you are intentionally minimizing observability overhead.

YAML example

yaml
http:
  host: 0.0.0.0
  port: 3000
  apiPrefix: /api/v1
storage:
  kind: redis
redis:
  url: redis://127.0.0.1:6379
  keyPrefix: hitl
ttl:
  defaultSeconds: 604800
  answeredRetentionSeconds: 2592000
pending:
  maxWaitSeconds: 0
  waitMode: terminal_only
  defaultTimeoutSeconds: 900
  timeoutPollIntervalSeconds: 5
agentIdentity:
  sessionHeader: x-agent-session-id
  createConflictPolicy: error
observability:
  logLevel: info
  enableMetrics: true

Configuration recommendations

Local development

  • HITL_STORAGE=memory
  • send x-agent-identity from your client or test harness
  • keep HITL_WAIT_MODE=terminal_only
  • timeout auto-response is available in single-process memory mode

Shared dev or staging

  • HITL_STORAGE=redis
  • set a real MCP_URL
  • use a distinct HITL_REDIS_PREFIX
  • review HITL_PENDING_DEFAULT_TIMEOUT_SECONDS
  • ensure upstream callers always provide x-agent-identity

Production

  • HITL_STORAGE=redis
  • set MCP_URL to the externally reachable URL
  • wire readiness to /api/v1/readyz
  • review TTL and retention values explicitly
  • review timeout and polling values explicitly
  • ensure upstream callers always provide x-agent-identity

How it works internally

Scope state machine

hitl-mcp maintains question progress at the caller-scope level.

Each state-changing operation updates a scope snapshot containing:

  • pending questions
  • resolved questions with full question payloads and answers when available
  • answered question IDs
  • skipped question IDs
  • cancelled question IDs
  • changed question IDs
  • completion status

This snapshot is the source of truth for wait results.

Waiter notification model

The server keeps an in-process waiter registry keyed by caller scope.

When answers or cancellations arrive:

  1. storage is updated
  2. a fresh scope snapshot is computed
  3. the waiter for that scope is notified
  4. hitl_wait resolves according to the configured wait mode

In Redis mode, timeout auto-response also produces waiter notifications. The timeout worker publishes scope updates through Redis pub/sub so a waiter blocked on one instance can still wake up when another instance performs the auto-response.

In memory mode, timeout auto-response produces waiter notifications through the same in-process Waiter used for answer and cancellation events.

Storage selection

Two storage modes exist:

  • memory: simple, process-local, good for tests and local development
  • redis: durable across processes and suitable for real deployments

Both modes enable timeout auto-response, but with different scope:

  • memory: single-process timeout worker and direct waiter notifications
  • redis: cross-instance timeout scheduling and distributed wakeups

Redis mode additionally uses:

  • a Redis sorted set for due-time scheduling
  • short-lived distributed locks to avoid double-processing in multi-instance deployments
  • Redis pub/sub to notify waiters across instances

If Redis is selected but unavailable during runtime initialization, the server falls back to in-memory storage and logs a warning.

That fallback is useful in local development, but production environments should treat it as a misconfiguration signal.

Identity handling

For HTTP question APIs:

  • session identity comes from HITL_AGENT_SESSION_HEADER
  • caller identity comes from x-agent-identity

For MCP tool calls:

  • the server injects caller scope into MCP tool state from request context
  • the tool layer reads agent_identity and agent_session_id from that injected state

Architecture

The runtime has five main layers.

1. Config layer

Loads and validates configuration from defaults, YAML, .env, and runtime environment variables.

2. Server layer

Builds the MCP server and the HTTP app, attaches middleware, and registers routes and tools.

3. Service layer

HitlService defines the operational behavior for:

  • create
  • list pending
  • wait
  • submit answers
  • cancel
  • fetch question

This is the main application boundary.

4. Storage layer

Provides repository implementations for:

  • in-memory development and tests
  • Redis-backed persistence

The Redis implementation also owns timeout scheduling, distributed lock acquisition, and timeout-driven default-answer persistence.

5. Observability layer

Provides:

  • structured logs
  • request IDs
  • readiness checks
  • metrics snapshots

Request flow summary

For HTTP:

  1. caller context middleware resolves identity and session
  2. route handler validates input and calls HitlService
  3. repository updates state
  4. response is wrapped in the standard envelope

For MCP:

  1. MCP request context is inspected
  2. caller scope is injected into tool state
  3. tool handler delegates to HitlService
  4. tool output reflects the latest scope state

Operations

Health and readiness

  • Liveness: GET /api/v1/healthz
  • Readiness: GET /api/v1/readyz
  • Metrics: GET /api/v1/metrics

Use readiness, not liveness, to guard Redis-backed production traffic.

Logging

The server emits structured request and error logs.

Set HITL_LOG_LEVEL=debug when troubleshooting request flow or repository behavior.

Metrics

Metrics are exposed as a JSON snapshot through /api/v1/metrics.

The current implementation tracks operational signals such as wait duration and pending counts.

Common deployment checks

Before declaring a deployment healthy, verify:

  1. MCP_URL matches the externally reachable URL.
  2. The exposed HTTP port matches your runtime or ingress mapping.
  3. HITL_STORAGE=redis is paired with a reachable Redis instance.
  4. Upstream callers send x-agent-identity and the configured session header.
  5. /api/v1/healthz, /api/v1/readyz, and /api/v1/metrics all respond as expected.

Project structure

text
.
├── config/                     # YAML configuration examples
├── docs/
│   ├── api/                    # MCP tool and HTTP API reference docs
│   └── runbooks/               # Operational runbooks
├── src/
│   ├── config/                 # Config schema, defaults, loaders
│   ├── core/                   # HitlService application logic
│   ├── domain/                 # Domain types, schemas, validators
│   ├── http/                   # Hono routes, middleware, response helpers
│   ├── mcp/                    # MCP tool registration and caller-scope helpers
│   ├── observability/          # Logging and metrics
│   ├── state/                  # Waiter and state-machine helpers
│   └── storage/                # In-memory and Redis repositories
├── tests/                      # Unit and integration coverage
├── Dockerfile                  # Production-oriented container build
└── index.ts                    # Runtime entrypoint

Related docs

Dùng MCP Hitl MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Hitl MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Hitl MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Hitl MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "hitl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Hitl MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Hitl MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Hitl MCP giúp tôi làm việc này không?
Hitl MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Hitl MCP.

Câu hỏi thường gặp

Máy chủ MCP Hitl MCP dùng để làm gì?

Hitl MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Hitl MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Hitl MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Hitl MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Hitl MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Hitl MCP với TypingMind?

Hitl MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Hitl MCP cung cấp những công cụ nào trong TypingMind?

Hitl MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Hitl MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Hitl MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇