Skip to main content
Glama
forthy

effect-stateless-mcp

by forthy

effect-stateless-mcp

A stateless MCP server (Model Context Protocol, spec 2026-07-28) that exposes a greet tool. Built and tested with Effect.ts v4 and run on Bun.

The server is fully stateless: a fresh McpServer instance is created per HTTP request, so no session state is retained between calls (no initialize handshake, no Mcp-Session-Id).

Requirements

  • Bun (v1.3.14+)

  • Node types are provided by Bun; no separate Node install needed

Related MCP server: Bun Fun MCP Server

Install

bun install

Run

bun run src/index.ts

By default the server listens on http://localhost:3000/mcp. Override the port with the PORT environment variable (read via Effect's Config):

PORT=8787 bun run src/index.ts

Calling the greet tool

Send a JSON-RPC tools/call request to the /mcp endpoint:

curl -s -X POST http://localhost:3000/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": { "name": "greet", "arguments": { "name": "Ada", "style": "formal" } }
  }'

The greet tool accepts:

Field

Type

Required

Description

name

string

yes

Name to greet (trimmed, 1–100 chars)

style

"formal" | "casual"

no

Greeting style (defaults to casual)

Test

Tests use vitest with @effect/vitest:

bun run test

Type-check

bunx tsc --noEmit

Project structure

File

Responsibility

src/greeting.ts

Domain logic — makeGreeting and the typed GreetingError.

src/server.ts

Stateless MCP handler — registers the greet tool via createMcpHandler.

src/index.ts

Entry point — starts Bun.serve on the configured port via BunRuntime.runMain.

License

See repository for details.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    A simple example MCP server built with Bun that provides basic utility tools including current time retrieval, message echoing, and number addition. Serves as a template for building MCP servers with Bun runtime.
    106
    MIT
  • -
    license
    C
    quality
    -
    maintenance
    A simple boilerplate MCP server that provides a basic greeting tool for demonstration purposes. Serves as a starting template for developers to quickly create and deploy custom MCP servers.
    1
    11
  • F
    license
    -
    quality
    B
    maintenance
    A generic template for developing MCP servers with basic examples including echo tool, server info resource, and greeting prompt. Provides a starting point for building custom MCP servers with Bun.
    13

View all related MCP servers

Related MCP Connectors

  • MCP (Model Context Protocol) server for Appwrite

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • An MCP server for Arcjet - the runtime security platform that ships with your AI code.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/forthy/effect-stateless-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server