{
  "openapi": "3.1.0",
  "info": {
    "title": "gcontext",
    "version": "0.12.0",
    "description": "gcontext is an MCP server that serves a folder of plain text files as your agent's persistent state. Install it with `uv tool install gcontext-ai`, then run `gcontext up` to start the server.",
    "license": {
      "name": "MIT",
      "url": "https://github.com/bleak-ai/gcontext/blob/main/LICENSE"
    },
    "contact": {
      "name": "Bleak AI",
      "url": "https://gcontext.ai"
    }
  },
  "externalDocs": {
    "description": "Documentation",
    "url": "https://gcontext.ai"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:4242",
      "description": "Local gcontext server (default port)"
    }
  ],
  "paths": {
    "/mcp": {
      "description": "MCP (Model Context Protocol) endpoint. Connect any MCP client to this URL.",
      "post": {
        "operationId": "mcpEndpoint",
        "summary": "MCP transport endpoint",
        "description": "Accepts MCP JSON-RPC requests over HTTP. Use this URL when adding gcontext as an MCP server in Claude Code, Cursor, Codex, or any MCP-compatible client.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "MCP JSON-RPC request following the Model Context Protocol specification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MCP JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Tool": {
        "type": "string",
        "enum": [
          "read_file",
          "write_file",
          "list_dir",
          "grep",
          "run_script",
          "run_adhoc_script",
          "agent"
        ],
        "description": "MCP tools exposed by a gcontext server"
      }
    }
  }
}
