A simple Model Context Protocol (MCP) server that provides various tools to test edge cases with MCP clients. Useful for testing error handling in MCP clients.
- fail: Always returns an error (useful for testing error handling)
- delay: Delays response for a specified duration (useful for testing timeouts)
- succeed: Always succeeds (useful for verifying basic connectivity)
- get_image: Returns an MCP logo image in a specified format (useful for testing image/binary content)
- add_tool: Dynamically adds a new tool at runtime to session.
- remove_tool: Dynamically removes a tool at runtime from session.
- get_image: Returns an MCP logo in various image formats (png, gif, jpeg, webp, avif).
- log_message: Sends a log message via MCP logging notifications over RPC.
- Built with the official Model Context Protocol Rust SDK
- Communicates over stdio (default) or HTTP (Streamable HTTP) for versatile integration
cargo install --git https://github.com/dastrobu/mcp-test-serverOr build from source:
git clone https://github.com/dastrobu/mcp-test-server
cd mcp-test-server
cargo build --releaseRun the server using stdio (default):
mcp-test-server
# or
mcp-test-server --transport stdioRun the server using HTTP (Streamable HTTP):
mcp-test-server --transport http --port 3000The server follows the Model Context Protocol specification.
- fail: Always returns an error with the message "This tool always fails intentionally for testing purposes"
- delay: Takes
duration_seconds(integer) and sleeps for that amount of time before returning success. - succeed: Returns a success message immediately.
- get_image: Returns an MCP logo image in the specified format. Takes
type(one ofpng,gif,jpeg,webp,avif), and optionallyaudience(array ofuserand/orassistant) andpriority(float from 0.0 to 1.0) for annotations. - add_tool: Adds a dynamic tool. Takes
name(string) andinput_json_schema(object). - remove_tool: Removes a dynamic tool. Takes
name(string). - get_image: Returns an MCP logo image. Takes
type(enum: png, gif, jpeg, webp, avif) and optionalaudienceandpriority. - log_message: Sends a log message. Takes
level(enum: debug, info, notice, warning, error, critical, alert, emergency),message(string), and optionallogger(string).