mockserver-client weekly downloads statistics
By mock-server (2 listings) · npm · MCP servers
A node client for the MockServer
mockserver-client has 157,425 recorded weekly downloads on npm, a decrease of 0.7% over the past 30 days, ranking #566 of 3,247 tracked listings.
About mockserver-client
mockserver-client-node
Communicate with a MockServer from any node or grunt build
Community
- Roadmap: <a href="https://github.com/orgs/mock-server/projects/1"><img height="20px" src="https://mock-server.com/images/GitHub_Logo-md.png" alt="GitHub Project"></a>
- Feature Requests: <a href="https://github.com/mock-server/mockserver-monorepo/issues"><img height="20px" src="https://mock-server.com/images/GitHub_Logo-md.png" alt="Github Issues"></a>
- Issues / Bugs: <a href="https://github.com/mock-server/mockserver-monorepo/issues"><img height="20px" src="https://mock-server.com/images/GitHub_Logo-md.png" alt="Github Issues"></a>
- Discussions: <a href="https://github.com/mock-server/mockserver-monorepo/discussions"><img height="20px" src="https://mock-server.com/images/GitHub_Logo-md.png" alt="GitHub Discussions"></a>
Getting Started
MockServer allows you to mock any system you integrate with via HTTP or HTTPS (i.e. (REST) services, web sites, etc). Please note that it is a third party project that needs java.
This npm module allows any grunt or node project to easily communicate with a running MockServer instance.
As an addition to this module for communicating with a running MockServer there is a second project that can be used to start and stop a MockServer called mockserver-node.
The MockServer client can be created as follows:
var mockServer = require('mockserver-client'),
mockServerClient = mockServer.mockServerClient // MockServer and proxy client
Note: this assumes you have an instance of MockServer running on port 1080. For more information on how to do so check mockserver-node.
The package includes TypeScript typings. It is a CommonJS module. From CommonJS, or TypeScript compiled to it, import { mockServerClient, llm } from 'mockserver-client' works with or without esModuleInterop. The LLM builders can also be imported on their own: import llm = require('mockserver-client/llm'), import * as llm from 'mockserver-client/llm', or by name, import { llmMock, completion } from 'mockserver-client/llm'; import llm from 'mockserver-client/llm' needs esModuleInterop. That module has no default property.
From an ES module (.mjs, .mts, or a package with "type": "module") named imports work too, import { mockServerClient, llm } from 'mockserver-client', as do import * as and the default import, import mockServer from 'mockserver-client'. A module other than the package itself can be imported with or without its extension: import { llmMock, completion } from 'mockserver-client/llm'.
The package's exports map names every path that can be imported or required: the package itself, each of its modules with and without .js (llm, setupMockServer, mockServerClient, mcpMockBuilder, a2aMockBuilder, index, sendRequest, webSocketClient), the types-only llmTypes and mockServer (for import type), and package.json. Any other path inside the package, such as a .d.ts file or a test file, fails with ERR_PACKAGE_PATH_NOT_EXPORTED. Each path with typings names them under a types condition, so TypeScript finds them under the node16, nodenext and bundler module resolutions.
Setup Expectation
A simple expectation can be set up as follows:
mockServerClient("localhost", 1080)
.mockSimpleResponse('/somePath', { name: 'value' }, 203)
.then(
function(result) {
// do something next
},
function(error) {
// handle error
}
);
A more complex expectation can be set up like this:
mockServerClient("localhost", 1080)
.mockAnyResponse(
{
'httpRequest': {
'method': 'POST',
'path': '/somePath',
'queryStringParameters': [
{
'name': 'test',
'values': [ 'true' ]
}
],
'body': {
'type': "STRING",
'value': 'someBody'
}
},
'httpResponse': {
'statusCode': 200,
'body': JSON.stringify({ name: 'value' }),
'delay': {
'timeUnit': 'MILLISECONDS',
'value': 250
}
},
'times': {
'remainingTimes': 1,
'unlimited': false
}
}
)
.then(
function(result) {
// do something next
},
function(error) {
// handle error
}
);
A header, query-string parameter, path parameter or cookie value can be a plain string, a { not, value } or { schema } object, or a date-time matcher. A date-time matcher has exactly one of before, after or equalToDateTime, which takes now, now with an offset such as now -1 days, or a date-time. Optional fields are actualFormat, truncateExpected, truncateActual, applyTruncationLast, zone and not. TypeScript users can type it as DateTimeMatcher:…
Description from the npm listing.
- mockserver
- mock
- HTTP
- HTTPS
- testing
- proxy
- api
- mcp
- ai
- client
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm MCP servers plugins
All 20 mockserver-client alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/mockserver-client. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.
