Back to Home
nunaszek icon

mcp-streamable-http-server

by nunaszek

Overview

A development template for creating StreamableHttp services, emphasizing flexible authentication, dynamic service registration, customizable middleware, and YAML configuration.

Installation

Run Command
uv run server

Environment Variables

  • HOST
  • PORT
  • SERVER_NAME
  • JSON_RESPONSE
  • LOG_LEVEL
  • APP_VERSION
  • DATABASE_URL

Security Notes

The `AuthorizeMiddleware` has a critical vulnerability: its `_verify_token` method contains a 'TODO: Implement token verification logic' and currently always returns `True`. This means any arbitrary string provided as a token in the 'Authorization' header or 'key' query parameter will be accepted as a valid API key, effectively bypassing actual authentication. If this middleware is active and a token string is present, it allows unauthenticated access to the system. Furthermore, the `SessionService.create_session` will record any such provided string as a new `ApiKey` in the database if it doesn't already exist.

Similar Servers

Stats

Interest Score32
Security Score1
Cost ClassLow
Avg Tokens10
Stars2
Forks1
Last Update2025-12-11

Tags

Streamable HTTPMCP ServerPythonStarletteAuthenticationMiddlewareDynamic ServicesYAML Configuration