Skip to main content
Glama

Ticket mock MCP

A minimal remote MCP server for Node.js 24 and TypeScript. It exposes one tool over Streamable HTTP:

  • get_list_tickets

Every ticket has a detail field containing exactly 2,048 UTF-8 bytes. The full ticket object is slightly larger because it also includes metadata.

Install and run

npm install
npm run build
npm start

The public endpoint is https://test-mcp.codehub.io/mcp. The container listens on every host interface at port 3000, and requests are accepted with any incoming Host header. OAuth metadata always uses the canonical public hostname.

Point a remote-capable MCP host at the URL:

{
  "mcpServers": {
    "ticket-mock": {
      "url": "https://test-mcp.codehub.io/mcp"
    }
  }
}

Related MCP server: PDF MCP Server

OAuth and DCR

The MCP endpoint requires an OAuth bearer token. It publishes protected-resource and authorization-server metadata, supports RFC 7591 Dynamic Client Registration, and uses authorization code flow with S256 PKCE.

Test login:

  • Username: hoa

  • Password: 123456

Registrations, authorization codes, and tokens are held in memory and reset whenever the process restarts. This fixed login is only for isolated testing.

Token expiry

Access tokens last one hour by default. Override it with MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS, which sets both the stored expiry and the expires_in field of the token response:

MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS=60 npm start

The value must be a positive whole number of seconds; anything else fails at startup rather than issuing tokens that cannot be used. Refresh tokens are fixed at 24 hours.

Variable

Default

Purpose

HOST

0.0.0.0

Listen address

PORT

3000

Listen port

MCP_PUBLIC_URL

http://localhost:$PORT

Canonical public origin used in OAuth metadata

MCP_OAUTH_CLIENT_STORE_PATH

(unset — clients are in memory)

Where DCR client registrations persist

MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS

3600

Access token lifetime in seconds

OAuth requires HTTPS for non-localhost clients. Terminate TLS for test-mcp.codehub.io at a reverse proxy and forward requests to port 3000:

docker compose up --build -d

Then configure the MCP client with https://test-mcp.codehub.io/mcp. An OAuth-capable client will discover the metadata, register itself through DCR, and open the login page automatically.

Tool payload

Both fields are optional:

{
  "number_of_tickets": 25,
  "delay_ms": 500
}

Field

Default

Accepted range

number_of_tickets

10

0 to 10000

delay_ms

0

0 to 300000

An empty payload uses both defaults:

{}

Verify

npm run check

Docker

Build and start the remote server:

docker compose up --build -d

The MCP URL is:

https://test-mcp.codehub.io/mcp

Stop it with:

docker compose down

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A demonstration MCP server that runs over HTTP with streamable transport, providing a simple greeting tool for testing MCP client-server communication. Built with FastMCP framework for educational purposes in learning MCP server development.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that exposes PDF files as resources, page by page, over Streamable HTTP.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Read-only MCP server for the HIT ticket management system that lists queues, searches/fetches ticket details, and lists ticket templates.
    4
    11 npm
    1
    MIT