effect-stateless-mcp
A stateless MCP server exposing a greet tool, built with Effect.ts and run on Bun.
README
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
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.