Skip to content

Comments

Draft/data layer sessions#20

Open
evalstate wants to merge 7 commits intomodelcontextprotocol:mainfrom
evalstate:draft/data-layer-sessions
Open

Draft/data layer sessions#20
evalstate wants to merge 7 commits intomodelcontextprotocol:mainfrom
evalstate:draft/data-layer-sessions

Conversation

@evalstate
Copy link
Member

Very early draft, will demo and tidy-up for feedback/development.

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Lightweight discussion starter for application-level sessions in MCP.

Includes:
- Capability advertisement shape (experimental.session)
- session/create, session/list, session/delete JSON-RPC methods
- Cookie echo pattern via _meta["mcp/session"]
- Revocation and error handling shapes
- Selective enforcement discussion
- Transport-layer vs data-layer comparison
- Open questions to guide working group discussion

Companion JSONC file with raw API shapes for quick reference.

Based on experimentation with fast-agent and the sessions track brief.
- Align title strings ('Code Review Session' in both files)
- Reorder: create → list → delete (natural CRUD lifecycle)
- Renumber JSON-RPC ids to match new order
- Add .gitignore for local tooling artifacts
- session/list: add cursor/nextCursor pagination (matches tools/list,
  resources/list, prompts/list pattern from PaginatedRequestParams /
  PaginatedResult)
- session/create: return session object in result body AND cookie in
  _meta (result body for inspection, _meta for echo cycle — consistent
  with Result having additionalProperties: {})
- Add 'Session Cookie: Placement' design discussion — named property
  (like progressToken) vs. convention key (mcp/session) in _meta bag,
  with trade-off table
- Add 'Revocation via null' design note — null in _meta is schema-valid
  but novel; document alternatives (omit key, dedicated method)
- Add Schema Compatibility Notes section documenting review against
  draft schema (DRAFT-2026-v1)
- Expand open questions to 10 (add cookie placement + revocation signal)
- Add companion file cross-reference
- Align .jsonc with all .md changes
Lightweight discussion starter for application-level sessions in MCP.

Phase 1 scope:
- session/create
- session/resume
- session/delete
- cookie echo/revocation via _meta["mcp/session"]

Phase 2 (deferred):
- session/list
- session/recover

Includes use cases, implementation-informed considerations, and open questions
for working-group discussion, plus a companion JSONC quick-reference of wire
shapes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant