mcp-ts-template

v3.0.9
io.github.cyanheads/mcp-ts-template Checked 9 hours ago Published 8 months ago

TypeScript template for building MCP servers with declarative tooling, observability, and auth.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

template_cat_fact Template Cat Fact

Fetches a random cat fact from a public API with an optional maximum length.

ParameterTypeDescription
maxLengthintegerOptional: The maximum character length of the cat fact to retrieve.

template_code_review_sampling Code Review with Sampling

Demonstrates MCP sampling by requesting an LLM to review code snippets. The tool uses the client's LLM to generate a code review summary.

ParameterTypeDescription
code *stringThe code snippet to review.
focusstringThe focus area for the code review.
languagestringProgramming language of the code (e.g., "typescript", "python").
maxTokensintegerMaximum tokens for the LLM response.

template_echo_message Template Echo Message

Echoes a message back with optional formatting and repetition.

ParameterTypeDescription
message *stringThe message to echo back. To trigger a test error, provide 'TRIGGER_ERROR'.
includeTimestampbooleanWhether to include an ISO 8601 timestamp in the response.
modestringHow to format the message ('standard' | 'uppercase' | 'lowercase').
repeatintegerNumber of times to repeat the formatted message.

template_image_test Template Image Test

Fetches a random cat image and returns it base64-encoded with the MIME type. Useful for testing image handling.

ParameterTypeDescription
triggerbooleanA trigger to invoke the tool and fetch a new cat image.

template_madlibs_elicitation Mad Libs Elicitation Game

Plays a game of Mad Libs. If any parts of speech (noun, verb, adjective) are missing, it will use elicitation to ask the user for them.

ParameterTypeDescription
adjectivestringAn adjective for the story.
nounstringA noun for the story.
verbstringA verb (past tense) for the story.

template_data_explorer Template Data Explorer

Generates sample sales data and renders an interactive explorer. Users can sort columns, filter rows, and select entries directly in the UI. Hosts without MCP Apps support receive a text table.

ParameterTypeDescription
rowCountintegerNumber of sample rows to generate (5–100).

template_async_countdown Async Countdown (Task Demo)

Demonstrates the MCP Tasks API with a countdown timer. When the client supports tasks, returns immediately with a task handle for polling. Otherwise, runs synchronously and returns the result directly.

ParameterTypeDescription
seconds *integerNumber of seconds to count down (1-60)
messagestringOptional message to include in the final result
simulateFailurebooleanIf true, simulates a failure at 50% progress (for testing)