Skip to main content
Glama
Teltaq MCP HTTP server starter

Teltaq MCP HTTP server starter

by teltaq

Teltaq MCP HTTP server starter

CI

A small MCP server over Streamable HTTP that you can connect to Teltaq and call from any chat. It shows the part of MCP that makes tools interactive, elicitation: a tool asks the user a question in the middle of a call, Teltaq shows a card, the user answers, and the tool carries on.

Tool

What it does

echo(text)

A plain tool with no elicitation

book_table(restaurant)

Asks for booking details in a form (date, party size 1–12, seating, optional notes), then for a yes / no confirmation. Answers differently for accept, decline and cancel

link_account(service)

URL-mode elicitation: Teltaq shows a link for the user to open, then Done or Decline

Built on the official MCP Python SDK. Press Use this template to start your own server from it.

What you need

  • A Teltaq account on the Pro or Team plan (MCP servers).

  • Python 3.10 or later and uv, or Docker.

  • A public HTTPS address for the server. Teltaq runs in the cloud, so it can't reach localhost on your machine: deploy the container, or open a tunnel while you try it (for example cloudflared tunnel --url http://localhost:8765 or ngrok http 8765).

Related MCP server: MCP Server Python

Run it

git clone https://github.com/teltaq/teltaq-mcp-http-server
cd teltaq-mcp-http-server
uv sync
export MCP_TOKEN=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
uv run python server.py           # http://127.0.0.1:8765/mcp

With Docker:

docker build -t teltaq-mcp-http-server .
docker run -p 8765:8765 -e MCP_TOKEN=... -e MCP_ALLOWED_HOSTS=mcp.example.com teltaq-mcp-http-server

Variable

Purpose

MCP_TOKEN

When set, every request needs Authorization: Bearer <MCP_TOKEN>; others get 401. Set it whenever the server is reachable from the internet

MCP_ALLOWED_HOSTS

Comma-separated Host names to accept when listening on 0.0.0.0 (the SDK's DNS-rebinding guard). Without it the guard is off on public interfaces

PORT

Port to listen on (default 8765; most hosting platforms set it)

Connect it to Teltaq

  1. In Teltaq open Settings → External MCP Servers → Add Server.

  2. Endpoint: your public address followed by /mcp, for example https://mcp.example.com/mcp.

  3. Headers: Authorization: Bearer <your MCP_TOKEN>. Teltaq stores it encrypted; never put it in the URL.

  4. Test connection lists the three tools. Save, then switch the server on for a chat (tools menu under the message box).

Try it

  • "Echo hello": a normal tool result.

  • "Book a table at Luna": a form appears under the tool call. Submit shows the confirmation step; Decline and Cancel each return their own result. An invalid answer (party size 20) is refused inline and the form stays open.

  • "Link my GitHub account": a link card. Open it, then press Done.

  • Press Stop while a form is waiting: the server sees the call cancelled, and the next message works as normal.

Make it yours

  • Add a tool with @server.tool() on an async def. Its docstring and type hints become the description and input schema the model sees.

  • Ask the user for structured input with Resolve(...) + Elicit(message, Model), where Model is a flat Pydantic model (MCP forms take strings, numbers, booleans and enums only).

  • Send the user to a page (sign-in, payment, consent) with URL mode, as link_account does.

  • Keep secrets in environment variables, never in tool results.

  • Replace the static token with OAuth when several people connect with their own accounts; Teltaq supports OAuth 2.0 for MCP servers too.

Tests

uv run pytest       # tools through the SDK's in-memory client, and the token check
uv run ruff check .

Learn more

Licence

MIT. See LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Lifts local stdio MCP servers into remote Streamable HTTP endpoints for cloud-hosted AI clients, with bearer-token auth and tool policy filtering.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables interactive communication with AI assistants by exposing custom tools through the Model Context Protocol, deployable on Render with optional bearer-token authentication.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables developers to expose product operations as model-callable tools over stdio or Streamable HTTP with bearer-token auth, per-client rate limits, host allow-listing, structured call logging, and a swappable backend for secure, testable deployments.
      3
      MIT