
MCPClientMock
io.github.Akkshay10由 GitHub 帳號 Akkshay10 發布v1.0.2更新於 Oct 24, 2026
MCP server for James Bloom MockServer - create expectations, verify requests, and manage mock state
概覽
針對 James Bloom MockServer 的 MCP 伺服器,讓助理建立模擬 HTTP 期望、驗證收到的請求,並清除或重設模擬狀態。
- 可以做什麼
- 建立模擬 HTTP 期望,可設定請求比對條件(方法、路徑、查詢參數、標頭、內容)與回應(狀態碼、標頭、內容、延遲、次數、有效期限)
- 驗證 MockServer 是否收到符合條件的請求,可指定至少、至多或精確次數
- 依比對條件篩選並取得已記錄的請求
- 依條件清除或全部清除期望與已記錄請求,並可整體重設 MockServer
- 查看 MockServer 的連線狀態與設定
- 適用情境
- 適合在後端尚未就緒時開發或測試 HTTP 介面,或讓助理針對某個 MockServer 執行個體建立並檢查模擬端點,用於前端與整合測試。
- 執行需求
- 需要 Node.js 18 以上版本,透過 npx 或全域 npm 安裝執行。另需一個執行中的 MockServer 執行個體,以環境變數 MOCKSERVER_HOST(預設 localhost)與 MOCKSERVER_PORT(預設 1080)指定。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCPClientMock,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mockserver-mcp
An MCP (Model Context Protocol) server for interacting with James Bloom's MockServer. This enables AI assistants to create mock HTTP expectations, verify requests, clear state, and manage MockServer instances programmatically.
Prerequisites
You need a running MockServer instance:
Installation
Using npx (recommended)
Global installation
Configuration
Environment Variables
MCP Client Configuration
Add to your MCP client configuration file (e.g., Claude Desktop, Kiro, Cursor):
For shared team MockServer, change MOCKSERVER_HOST to your server's address.
Available Tools
mockserver_create_expectation
Create a mock HTTP expectation on MockServer.
Parameters:
httpRequest(required): Request matching criteriamethod: HTTP method (GET, POST, PUT, DELETE, etc.)path: URL path to matchqueryStringParameters: Query parameters to matchheaders: Headers to matchbody: Body matcher withtype(STRING, JSON, REGEX, XPATH, JSON_PATH) andvalue
httpResponse: Response configurationstatusCode: HTTP status codeheaders: Response headersbody: Response body (string or object)delay: Response delay withtimeUnitandvalue
times: How many times to match (remainingTimes,unlimited)timeToLive: Expectation lifetime (timeUnit,timeToLive)
Example:
mockserver_verify
Verify that requests matching criteria were received by MockServer.
Parameters:
httpRequest(required): Request matching criteria (same as create_expectation)times: Expected request countatLeast: Minimum number of requestsatMost: Maximum number of requestsexactly: Exact number of requests
Example:
mockserver_clear
Clear expectations and recorded requests from MockServer.
Parameters:
httpRequest(optional): Request matcher to clear specific expectations. If not provided, clears all.
Example:
mockserver_reset
Perform a full reset of MockServer, clearing all expectations and recorded requests.
Parameters: None
mockserver_retrieve_requests
Retrieve recorded requests from MockServer.
Parameters:
httpRequest(optional): Request matcher to filter recorded requests
Example:
mockserver_status
Get MockServer connection status and configuration.
Parameters: None
Why Mocking?
API mocking enables early testing — start building and testing your frontend or integrations before the backend is ready. No more waiting. Ship faster.
Requirements
- Node.js >= 18.0.0
- A running MockServer instance
Links
- npm: https://www.npmjs.com/package/mockserver-mcp
- GitHub: https://github.com/Akkshay10/MCPClientMock
- MCP Registry: https://registry.modelcontextprotocol.io
License
MIT
來源:README.md,提交 d4bf387
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分