Oh My Posh Validator

dev.ohmyposh由 ohmyposh.dev 發布官方發布者v31.8.0更新於 Oct 24, 2026

根據官方架構驗證 oh-my-posh 設定和片段程式碼段。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Validate oh-my-posh configurations and segment snippets against the official schema.

已驗證Streamable HTTP可網頁執行檔案與儲存開發者工具

概覽

Oh My Posh Validator 的託管 MCP 服務(ohmyposh.dev),由 ohmyposh.dev 發布;無需登入;Streamable HTTP;2 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

發布者
ohmyposh.dev
端點
ohmyposh.dev
最近檢查

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Oh My Posh Validator,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/dev.ohmyposh%2Fvalidator/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "oh-my-posh-validator": {
      "type": "http",
      "url": "https://ohmyposh.dev/api/mcp"
    }
  }
}

README


title: MCP Validator Function description: 'Azure Function implementing the Model Context Protocol server for validating oh-my-posh configurations'

Overview

This directory contains the Azure Function that implements the Model Context Protocol (MCP) server for validating oh-my-posh configurations.

Endpoints

  • POST /api/mcp - MCP server endpoint that handles validation requests
  • GET /api/mcp - Returns server information and available tools

Supported Tools

validate_config

Validate an oh-my-posh configuration.

  • Supports JSON, YAML, and TOML formats
  • Returns detailed validation errors with JSON paths

validate_segment

Validate a segment snippet (individual prompt segment).

  • Validates against the segment schema definition
  • Useful for testing individual segments before adding them to a full configuration
  • Supports JSON, YAML, and TOML formats

Usage

As an MCP Server

Configure your MCP client to connect to this server:

json
{  "mcpServers": {    "oh-my-posh-validator": {      "type": "http",      "url": "https://ohmyposh.dev/api/mcp"    }  }}

Direct HTTP Requests

Get Server Info
bash
curl https://ohmyposh.dev/api/mcp
List Available Tools
bash
curl -X POST https://ohmyposh.dev/api/mcp \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "tools/list",    "id": 1  }'
Validate a Configuration
bash
curl -X POST https://ohmyposh.dev/api/mcp \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "tools/call",    "params": {      "name": "validate_config",      "arguments": {        "content": "{\"$schema\":\"https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json\",\"blocks\":[]}",        "format": "json"      }    },    "id": 1  }'
Validate a Segment Snippet
bash
curl -X POST https://ohmyposh.dev/api/mcp \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "tools/call",    "params": {      "name": "validate_segment",      "arguments": {        "content": "{\"type\":\"path\",\"style\":\"powerline\",\"foreground\":\"#ffffff\",\"background\":\"#61AFEF\",\"template\":\" {{ .Path }} \"}",        "format": "json"      }    },    "id": 2  }'

Response Format

The validation result includes:

  • valid: Boolean indicating if the configuration is valid
  • errors: Array of validation errors (if any)
  • warnings: Array of warnings (best practices, deprecations)
  • detectedFormat: The detected or specified format
  • parsedConfig: The parsed configuration object (for debugging)

Example response:

json
{  "jsonrpc": "2.0",  "result": {    "content": [      {        "type": "text",        "text": "{          \"valid\": true,          \"errors\": [],          \"warnings\": [            {              \"path\": \"$schema\",              \"message\": \"Consider adding \\\"$schema\\\" property for better editor support.\",              \"type\": \"recommendation\"            }          ],          \"detectedFormat\": \"json\",          \"parsedConfig\": {...}        }"      }    ]  },  "id": 1}

Development

To test locally:

bash
cd website/apinpm installnpm start

Then send requests to http://localhost:7071/api/mcp

Publishing to MCP Registry

This server is published to the MCP Registry using GitHub Actions.

Publishing

Publishing is triggered automatically when you push a version tag (same as oh-my-posh releases):

bash
git tag v9.0.0git push origin v9.0.0

The workflow will:

  1. Extract version from the tag (e.g., v9.0.0 → 9.0.0)
  2. Update server.json version to match
  3. Validate the server.json file
  4. Authenticate with the MCP Registry using GitHub OIDC
  5. Publish the server to the registry

Note: The MCP server version will stay in sync with oh-my-posh versions automatically.

Files

  • server.json - MCP Registry server configuration
  • server.schema.json - JSON schema for validation
  • validate-server.js - Validation script
  • .github/workflows/publish-mcp.yml - GitHub Actions workflow

Validating server.json Locally

bash
cd website/apinpm installcd mcpnode validate-server.js

來源:website/api/mcp/README.md,提交 e6c9eb7

工具

2

validate_config

Validate an oh-my-posh configuration against the schema. Supports JSON, YAML, and TOML formats.

輸入參數formatcontent必填

validate_segment

Validate a segment snippet against the oh-my-posh schema. Useful for validating individual prompt segments before adding them to a configuration.

輸入參數formatcontent必填

版本歷史

2
  1. v31.8.0最新Oct 20, 2026
  2. v29.37.0Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Ohmyposh 整合