validate_config
Validate an oh-my-posh configuration against the schema. Supports JSON, YAML, and TOML formats.
formatcontent必填
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.
Oh My Posh Validator 的托管 MCP 服务(ohmyposh.dev),由 ohmyposh.dev 发布;无需登录;Streamable HTTP;2 个工具。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/dev.ohmyposh%2Fvalidator/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"oh-my-posh-validator": {
"type": "http",
"url": "https://ohmyposh.dev/api/mcp"
}
}
}This directory contains the Azure Function that implements the Model Context Protocol (MCP) server for validating oh-my-posh configurations.
POST /api/mcp - MCP server endpoint that handles validation requestsGET /api/mcp - Returns server information and available toolsValidate an oh-my-posh configuration.
Validate a segment snippet (individual prompt segment).
Configure your MCP client to connect to this server:
The validation result includes:
valid: Boolean indicating if the configuration is validerrors: Array of validation errors (if any)warnings: Array of warnings (best practices, deprecations)detectedFormat: The detected or specified formatparsedConfig: The parsed configuration object (for debugging)Example response:
To test locally:
Then send requests to http://localhost:7071/api/mcp
This server is published to the MCP Registry using GitHub Actions.
Publishing is triggered automatically when you push a version tag (same as oh-my-posh releases):
The workflow will:
v9.0.0 → 9.0.0)server.json version to matchserver.json fileNote: The MCP server version will stay in sync with oh-my-posh versions automatically.
server.json - MCP Registry server configurationserver.schema.json - JSON schema for validationvalidate-server.js - Validation script.github/workflows/publish-mcp.yml - GitHub Actions workflow来源:website/api/mcp/README.md,提交 e6c9eb7
Validate an oh-my-posh configuration against the schema. Supports JSON, YAML, and TOML formats.
formatcontent必填Validate a segment snippet against the oh-my-posh schema. Useful for validating individual prompt segments before adding them to a configuration.
formatcontent必填已满足适用检查项的 100%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
{ "mcpServers": { "oh-my-posh-validator": { "type": "http", "url": "https://ohmyposh.dev/api/mcp" } }}curl https://ohmyposh.dev/api/mcpcurl -X POST https://ohmyposh.dev/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/list", "id": 1 }'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 }'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 }'{ "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}cd website/apinpm installnpm startgit tag v9.0.0git push origin v9.0.0cd website/apinpm installcd mcpnode validate-server.js