---
title: "Handle MCP JSON-RPC request"
method: POST
path: "/mcp"
tags: ["MCP"]
---

# Handle MCP JSON-RPC request

`POST /mcp`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/mcp`
- Auth: HTTP bearer

Streamable HTTP transport for the Model Context Protocol.
Requires `Content-Type: application/json`. Returns `Mcp-Session-Id`
header for session management. Sessions expire after 30 minutes of inactivity.

## Response `200`

JSON-RPC response

## Other responses

- `400`: Invalid Content-Type
- `404`: Unknown session ID

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
