- Unit testing
- Integration testing
- Quick prototyping
- Temporary sessions
Configuration
Usage
Option 1: Default Usage
The globalsessions proxy uses the In-Memory backend by default if no other storage environment variables are configured.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🎉 v2.0.0 is out! Please note that the API may contain breaking changes. See the migration guide and changelog for details.
Use the in-memory storage backend for fast, ephemeral MCP session storage in unit tests, integration tests, and local prototypes (lost on restart).
# Explicit selection (optional)
MCP_TS_STORAGE_TYPE=memory
# No additional configuration needed
sessions proxy uses the In-Memory backend by default if no other storage environment variables are configured.
import { sessions } from '@mcp-ts/sdk/server';
await sessions.create({
sessionId: 'test-123',
userId: 'test-user',
serverUrl: 'https://test.example.com',
callbackUrl: 'https://test.com/callback',
transportType: 'sse',
status: 'active',
createdAt: Date.now(),
});
import { MemoryStorageBackend } from '@mcp-ts/sdk/server';
const memoryBackend = new MemoryStorageBackend();
await memoryBackend.create({
sessionId: 'test-123',
userId: 'test-user',
serverUrl: 'https://test.example.com',
callbackUrl: 'https://test.com/callback',
transportType: 'sse',
status: 'active',
createdAt: Date.now(),
});
Was this page helpful?
