Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@msfeldstein/mcp-test-servers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MCP Test Servers
This package provides a collection of simple MCP (Model Context Protocol) servers for testing and demonstration purposes.
Available Servers
Ping Server
A simple server that provides a single tool called "ping" which returns "pong".
To run:
# Using npm script
npm run ping
# Using npx (after npm link)
npx mcp-test-servers ping
# Using npx (after publishing)
npx @msfeldstein/mcp-test-servers pingResource Server
A server that provides a simple text resource with the content "Hello, world".
To run:
# Using npm script
npm run resource
# Using npx (after npm link)
npx mcp-test-servers resource
# Using npx (after publishing)
npx @msfeldstein/mcp-test-servers resourceThe resource server exposes:
- Resource URI:
test://hello.txt - MIME Type:
text/plain - Content: "Hello, world"
Combined Server
A server that combines both the ping tool and the text resource functionality.
To run:
# Using npm script
npm run combined
# Using npx (after npm link)
npx mcp-test-servers combined
# Using npx (after publishing)
npx @msfeldstein/mcp-test-servers combinedThe combined server provides:
- The "ping" tool that returns "pong"
- A text resource at
test://hello.txtcontaining "Hello, world"
Broken Tool Server
A server that starts successfully but has a tool that crashes when called. Useful for testing error handling in tool execution.
To run:
# Using npm script
npm run broken-tool
# Using npx (after npm link)
npx mcp-test-servers broken-tool
# Using npx (after publishing)
npx @msfeldstein/mcp-test-servers broken-toolThe broken-tool server provides:
- A "crash" tool that throws an error when called
- Error message: "This tool is intentionally broken!"
Crash On Startup Server
A server that crashes immediately during initialization. Useful for testing server startup error handling.
To run:
# Using npm script
npm run crash-on-startup
# Using npx (after npm link)
npx mcp-test-servers crash-on-startup
# Using npx (after publishing)
npx @msfeldstein/mcp-test-servers crash-on-startupThe crash-on-startup server:
- Throws an error before MCP server initialization
- Error message: "Server crashed during startup!"
Environment Check Server
A server that demonstrates environment variable validation. The server will only start if the SHOULD_RUN environment variable is set to "true".
To run:
# Using npm script with environment variable
SHOULD_RUN=true npm run env-check
# Using npx (after npm link)
SHOULD_RUN=true npx mcp-test-servers env-check
# Using npx (after publishing)
SHOULD_RUN=true npx @msfeldstein/mcp-test-servers env-checkThe env-check server provides:
- A "status" tool that confirms the server is running
- Crashes on startup if SHOULD_RUN is not set to "true"
- Error message: "SHOULD_RUN environment variable must be set to 'true' to start this server"
Development
To work on this project locally:
- Clone the repository
- Install dependencies:
npm install - Link the package:
npm link - Run any server using the commands above
Publishing
To publish this package:
Make sure you're logged in to npm with the correct account:
npm loginPublish the package:
npm publish
Note: This package is published under the @msfeldstein namespace and is configured for public access.
License
ISC