Skip to content

janwilmake/stateless-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stateless MCP Example

This showcases a stateless MCP server.

Try it out using npx @modelcontextprotocol/inspector

Test it

First run wrangler dev

Then you can test this with a simple HTTP client:

# Test initialization
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

# Test ping
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"ping"}'

# Test tools list
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/list"}'

Resources:

About

Minimal Example of Stateless MCP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published