MCP Stateful Example
@stevemadere
关于 MCP Stateful Example
A simple stateful mcp server example. Clone and modify to make any stateful mcp server.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-stateful-example": {
"command": "python",
"args": [
"test_initialize.py"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Stateful Example?
A minimal, fully MCP‑compliant server and client setup for exploring and validating session‑based tool invocation workflows using the Model Context Protocol.
How to use MCP Stateful Example?
Clone the repository, install Node.js dependencies with npm install and Python dependencies for integration tests with pip install -r test/integration/requirements.txt. Create a .env.test file with PORT=3088, then start the development server with npm run dev.
Key features of MCP Stateful Example
- Implements a minimal MCP server with session handling
- Includes
imagineandisLessThantest tools - Python‑based integration tests for validating server behavior
- Built‑in
/healthendpoint for monitoring server status
Use cases of MCP Stateful Example
- Learning how session state works in MCP tool invocations
- Testing and validating MCP client‑server communication
- Prototyping stateful tool workflows before building production servers
FAQ from MCP Stateful Example
What tools are available?
Two tools: imagine picks a random number between specified bounds and stores it in the session; isLessThan checks if a number is less than the previously imagined number in the current session.
What are the prerequisites?
Node.js 18+, Python 3.8+ for integration tests, and npm or yarn.
How do I run integration tests?
Use npm run itest from the project root, or run a specific test by navigating to test/integration and executing python test_initialize.py.
What environment variables are used?
PORT (default: 3000) for the server port, and NODE_ENV for the environment mode (e.g., 'development' or 'production').
Does the server have a health check?
Yes, a GET /health endpoint returns server status.
其他 分类下的更多 MCP 服务器
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Codelf
unbugA search tool helps dev to solve the naming things problem.
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
评论