Skip to content

๐Ÿ› ๏ธ HOWTO: Operating DSOM FastMCP Knowledge Server

This operational guide provides step-by-step instructions for running, configuring, and connecting the DSOM FastMCP Knowledge Server (tools/mcp/server.py) via Model Context Protocol (MCP) to AI IDEs such as Cursor, Claude Desktop, and VSCode.


โšก 1. Fast Execution Protocol (Rule 16 uv Mandate)

The MCP server runs natively in Python using uv with PEP 723 inline script dependencies (mcp, fastmcp, pyyaml). Zero global installation required.

Launching the Stdio MCP Server:

uv run tools/mcp/server.py

๐Ÿ”Œ 2. IDE Integration & Configuration Guides

A. Cursor IDE (.cursor/mcp.json or Settings -> MCP):

Add the following JSON configuration to Cursor under Settings > Features > MCP:

{
  "mcpServers": {
    "dsom-palace": {
      "command": "uv",
      "args": [
        "run",
        "tools/mcp/server.py"
      ],
      "cwd": "${workspaceFolder}"
    }
  }
}

B. Claude Desktop (claude_desktop_config.json):

Add the server entry to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "dsom-palace": {
      "command": "uv",
      "args": [
        "run",
        "D:\\Users\\LinuxMalaysia\\Projects\\deep-state-of-mind-for-my-ai\\tools\\mcp\\server.py"
      ]
    }
  }
}

๐Ÿ“Š 3. Exposed MCP Endpoint Matrix (Resources & Tools)

A. MCP Resources (6 Read-Only Protocol URIs)

Resource URI Description / Source File
dsom://brain/state Reads condensed DSOM state (.agents/brain/current_state.dsom).
dsom://brain/task Reads active session task list (.agents/brain/task.md).
dsom://brain/walkthrough Reads session walkthrough anchors (.agents/brain/walkthrough.md).
dsom://governance/agents Reads the 27 Constitutional AI Rules (.agents/AGENTS.md).
dsom://openwiki/skeleton Reads OpenWiki subsystem rankings (openwiki/_skeleton.md).
dsom://openwiki/quickstart Reads OpenWiki master entrypoint (openwiki/quickstart.md).

B. MCP Tools (3 Executable Tools)

Tool Name Parameters Purpose
search_palace query: str Performs bounded text search over docs/*.md (capped at 8,000 chars).
search_openwiki query: str Performs sub-millisecond search over OpenWiki OKF frontmatter metadata (topics:, title:, description:).
fetch_context7_stream tokens: int = 83688 Returns the live Context7 LLM RAG context stream endpoint URL.

๐Ÿงช 4. Troubleshooting & Verification

  1. Verify Python Environment: Ensure uv is installed and accessible on your PATH (uv --version).
  2. Test Server Startup:
    uv run tools/mcp/server.py --help
    
  3. Verify Regression Suite:
    uv run --with pyyaml python -m unittest tests/test_okf_frontmatter_bom_reorder.py tests/test_okf_quoting.py tests/test_seo_sitemaps.py tests/test_docs_symlinks.py
    

๐Ÿ”— 5. References


Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-08-09 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0