---
title: state | CodeWeaver Docs
description: API reference for codeweaver.server.mcp.state
url: "https://docs.knitli.com/api/server/mcp/state"
type: static
generatedAt: "2026-04-17T17:21:09.870Z"
---

# state
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/mcp/state.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F&text=state)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F&text=state)[Share on Bluesky](https://bsky.app/intent/compose?text=state%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F&title=state)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F&t=state)[Share on Email](mailto:?subject=state&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F)[Share on WhatsApp](https://wa.me/?text=state%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fstate%2F&text=state)
# `codeweaver.server.mcp.state`
[Section titled “codeweaver.server.mcp.state”](#codeweaverservermcpstate)
Defines the MCP server state object for HTTP deployments.

## Class: `CwMcpHttpState`
[Section titled “Class: CwMcpHttpState”](#class-cwmcphttpstate)
State object for MCP HTTP server deployments.

### Method: `from_app`
[Section titled “Method: from_app”](#method-from_app)

**

```
from_app()
```

Create state from app setup with the app and optional kwargs.

### Method: `human_start_time`
[Section titled “Method: human_start_time”](#method-human_start_time)

**

```
human_start_time()
```

Get the server start time in a human-readable format.

### Method: `human_uptime`
[Section titled “Method: human_uptime”](#method-human_uptime)

**

```
human_uptime()
```

Get the uptime of the server in a human-readable format.

### Method: `uptime_seconds`
[Section titled “Method: uptime_seconds”](#method-uptime_seconds)

**

```
uptime_seconds()
```

Get the uptime of the server in seconds.