Logo Mcpshim

Mcpshim

Tổ chức
mcpshim

Turn remote MCP servers into local command workflows.

Nhà phát hànhmcpshim
Kho mãmcpshim
Ngôn ngữGo
Bản fork
9
Sao
66
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

    Mcpshim 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ở

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


The Problem

Remote MCP servers and HTTP APIs are powerful, but each service has its own auth flow, transport expectations, and invocation patterns. Wiring all of that directly into every script or agent loop creates brittle command workflows.

For LLM agents, there is also context pressure: dumping raw MCP schemas for every connected server can consume prompt budget before useful work begins.

The Solution

mcpshimd centralizes MCP registration and OAuth alongside configured HTTP service bindings, discovery, call execution, and history behind one local socket.

mcpshim exposes every remote MCP tool and configured HTTP operation as a standard CLI command. Flags map to tool parameters and output comes back as structured JSON. No SDKs or libraries are required by the caller.

Why MCPShim

Without MCPShimWith MCPShim
Tool integrationCustom per-service wiringOne daemon + one CLI
Auth handlingPer-script OAuth/header logicCentralized in mcpshimd
Tool invocationProvider-specific conventionsmcpshim call --server --tool ...
HTTP API bindingHand-written client codeTyped or constrained raw tools
Agent context budgetLarge MCP schemas in promptAlias-based local command workflows
Operational historyAd-hoc loggingBuilt-in call history in SQLite

Architecture

ComponentRole
mcpshimdLocal daemon for MCP/HTTP registry, discovery, auth, calls, and IPC
mcpshimCLI client for config, discovery, tool calls, history, and script

All client calls go through a Unix socket and JSON request/response protocol.

Quick Start

1. Install from source

bash
go install github.com/mcpshim/mcpshim/cmd/mcpshimd@latest
go install github.com/mcpshim/mcpshim/cmd/mcpshim@latest

2. Configure

bash
mkdir -p ~/.config/mcpshim
cat > ~/.config/mcpshim/config.yaml <<'YAML'
servers:
  - name: notion
    alias: notion
    transport: http
    url: https://mcp.notion.com/mcp
YAML

3. Start daemon and inspect

bash
mcpshimd
mcpshim status
mcpshim servers
mcpshim tools

Path Defaults

ResourceDefault LocationOverride
Config~/.config/mcpshim/config.yaml--config, $MCPSHIM_CONFIG
Socket$XDG_RUNTIME_DIR/mcpshim.sockmcpshimd --socket ...
Database~/.local/share/mcpshim/mcpshim.dbserver.db_path in YAML config

All paths follow XDG defaults where applicable.

Daemon flags

FlagDescription
--configPath to config YAML
--socketOverride unix socket path
--debugEnable debug logging
--versionPrint version and exit

Core Commands

CommandDescription
mcpshim serversList registered MCP/HTTP services
mcpshim tools [--server name] [--full]List tools for all or one server
mcpshim inspect --server s --tool tShow tool schema/details
mcpshim call --server s --tool t --arg valueExecute a tool call
mcpshim add --name s --url ... [--alias a]Register a new MCP endpoint (opt-in)
mcpshim set auth --server s --header K=VSet auth headers for a server (opt-in)
mcpshim remove --name sRemove a registered server (opt-in)
mcpshim reloadReload daemon configuration
mcpshim validate [--config path]Validate config file
mcpshim login --server s [--manual]Complete OAuth login flow
mcpshim history [--server s] [--tool t] [--limit n]Show persisted call history
mcpshim history --clear [--server s] [--tool t]Clear scoped call history
mcpshim history --clear --allClear all call history
mcpshim script [--install] [--dir ~/.local/bin]Generate/install alias wrappers

Register MCP servers

The config file is the source of truth. Edit it and reload:

bash
$EDITOR ~/.config/mcpshim/config.yaml
mcpshim reload

add, set auth, and remove do the same thing over the socket, and are refused by default. Those actions rewrite the config file, so leaving them enabled makes socket access equivalent to config write access - which matters because anything reaching the socket is already able to call every tool you have registered. Turn them on only when runtime registration is worth that:

yaml
server:
  allow_registry_writes: true
bash
mcpshim add --name notion --alias notion --transport http --url https://example.com/mcp
mcpshim set auth --server notion --header 'Authorization=Bearer ${NOTION_MCP_TOKEN}'
mcpshim reload

Credentials are never readable back through the socket either way: servers reports has_auth as a boolean and never returns header values.

Dynamic flags

Tool flags are converted automatically to MCP arguments:

bash
mcpshim call --server notion --tool search --query "projects" --limit 10 --archived false

Tip: JSON output is automatic when stdout is not a terminal. Put the global --json before the command to force JSON output in a terminal. On call, --json after the tool selector parses JSON-like text fields returned by the remote tool.

Objects, arrays, and null can be passed as JSON values. MCPShim uses the discovered tool schema to keep string properties as strings:

bash
mcpshim call --server notion --tool search \
  --filter '{"status":"open"}' \
  --ids '[1,2,3]' \
  --cursor null

HTTP Services

Ordinary HTTP APIs can be exposed without implementing an MCP server. A service owns its base URL, credentials, and policy, then publishes typed tools, a constrained raw request tool, or both:

yaml
http_services:
  - name: deployment-api
    alias: deploy
    base_url: https://deploy.example.com/api
    headers:
      Authorization: Bearer ${DEPLOY_API_TOKEN}
    policy:
      redirects: same-origin
      allowed_request_content_types: [application/json]
      max_response_bytes: 2097152
    raw_tool:
      name: request
      methods: [GET, POST, PATCH]
      paths: [/v1/deployments/**]
    tools:
      - name: get_deployment
        request:
          method: GET
          path: /v1/deployments/{deployment_id}
        inputs:
          deployment_id:
            type: string
            required: true
bash
mcpshim call --server deploy --tool get_deployment --deployment_id dep_123
mcpshim call --server deploy --tool request \
  --method PATCH \
  --path /v1/deployments/dep_123 \
  --body '{"desired_state":"running"}'

Typed request bodies, queries, and headers support deeply nested structural templates with $arg, $default, $omit_if_missing, and $format. The raw tool remains limited to configured methods and wildcard paths and cannot override authentication or other protected headers.

See the complete HTTP service guide and configs/http-services.example.yaml.


OAuth Flow

For OAuth-capable MCP servers, you can configure URL-only registration:

bash
mcpshim add --name notion --alias notion --transport http --url https://mcp.notion.com/mcp

When a request receives 401 and no Authorization header is configured, MCPShim checks its SQLite token store. If authorization is still required, the command tells you to run an explicit login instead of starting an interactive browser flow inside the daemon.

You can also pre-authorize:

bash
mcpshim login --server notion
mcpshim login --server notion --manual

--manual supports cross-device auth by printing a URL and accepting pasted callback URL/code.


Call History

Every mcpshim call is recorded by mcpshimd with timestamp, server/tool, args, status, and duration.

bash
mcpshim history
mcpshim history --server notion --limit 20
mcpshim history --server notion --tool search --limit 100
mcpshim history --server notion --clear
mcpshim history --clear --all

History is stored locally in SQLite (call_history table). The daemon retains the newest 1,000 calls by default; set server.history_size in the YAML config to choose another positive limit. Clearing requires at least one filter or an explicit --all.


IPC Protocol

mcpshim communicates with mcpshimd over a Unix socket using JSON messages with an action field.

json
{"action":"status"}
{"action":"servers"}
{"action":"tools","server":"notion"}
{"action":"inspect","server":"notion","tool":"search"}
{"action":"call","server":"notion","tool":"search","args":{"query":"roadmap"}}
{"action":"history","server":"notion","limit":20}
{"action":"clear_history","server":"notion"}
{"action":"clear_history","all":true}
{"action":"add_server","name":"notion","alias":"notion","url":"https://mcp.notion.com/mcp","transport":"http"}
{"action":"set_auth","name":"notion","headers":{"Authorization":"Bearer ..."}}
{"action":"reload"}

Lightweight Aliases

Generate shell functions:

bash
eval "$(mcpshim script)"
notion search --query "projects" --limit 10

If a server name/alias contains shell-incompatible characters (spaces, dashes, punctuation) MCPShim automatically normalizes it to a safe function name (for example, my-server becomes my_server).

Install executable wrappers instead:

bash
mcpshim script --install --dir ~/.local/bin
notion search --query "projects" --limit 10

Deployment

mcpshimd never executes a child process. MCP and configured API traffic uses HTTP or SSE, so the daemon is a credential-holding outbound proxy rather than a local code-execution surface. That makes it well suited to running in its own container with only the socket exposed to the agent.

See docs/deployment.md for the topologies, the trust model of the socket, OAuth in containers, and the operational caveats.


Ecosystem

ProjectRole
zotRun complete coding tasks autonomously from a single brief
PantalkConnect coding agents to the chat platforms people already use
crmkitGive agents a shared CRM and system of record over HTTP or MCP

Dùng MCP Mcpshim 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 Mcpshim, 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 Mcpshim 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 Mcpshim.
  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": {
    "mcpshim": {
      "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 Mcpshim, 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 Mcpshim.
  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 Mcpshim giúp tôi làm việc này không?
Mcpshim
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Mcpshim.

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

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

Mcpshim 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 Mcpshim 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 Mcpshim 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 Mcpshim 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 Mcpshim, 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 Mcpshim với TypingMind?

Mcpshim 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 Mcpshim cung cấp những công cụ nào trong TypingMind?

Mcpshim 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 Mcpshim 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 Mcpshim 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 👇