jonigl/mcp-server-with-streamable-http-example
3.3
If you are the rightful owner of mcp-server-with-streamable-http-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A simple MCP server with streamable HTTP transport.
Tools
3
Resources
0
Prompts
0
A simple MCP server with streamable HTTP transport Example
This example demonstrates how to create a simple MCP server with streamable HTTP transport, featuring several tools, prompts, and resources.
Run
By default, the server runs on port 8000.
python simple_streamable_http_mcp_server.py
Or with uv:
uv run mcp-server
Custom Port
Change the port (default is 8000):
MCP_SERVER_PORT=9000 python simple_streamable_http_mcp_server.py
Debug Logging
Enable debug logs for tool calls:
MCP_DEBUG=1 python simple_streamable_http_mcp_server.py
Both Together
MCP_SERVER_PORT=9000 MCP_DEBUG=1 python simple_streamable_http_mcp_server.py
Tools
hello_world(name)- Say helloadd_numbers(a, b)- Add two numbersrandom_number(min_val, max_val)- Generate random numberreturn_json_example()- Return example JSONcalculate_bmi(weight, height)- Calculate BMI
Prompts
BMI Calculator- Prompt for BMI calculation
Resources
server://info- Get server info