Validates oh-my-posh configuration files and segment snippets against the official schema, returning errors and warnings.
Also known as JanDeDobbeleer/oh-my-posh, validator
- Stars
- 23,757
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 31.8.0
- Last commit
- Nov 13, 2026
- License
- MIT
What is Oh My Posh MCP?
Oh My Posh validates oh-my-posh configuration files and segment snippets against the official schema, returning errors and warnings.
Summary generated from the project's README
About Oh My Posh MCP server
Verifying oh-my-posh configuration files and individual segment snippets against official schemas is what this remote MCP server enables for developers. It functions as an Azure Function that you connect to via an HTTP client setup, allowing you to check your terminal prompt settings without leaving your AI-driven workflow.
The server provides two primary tools: validate_config for checking entire configuration files and validate_segment for testing specific prompt segments. It supports JSON, YAML, and TOML formats, returning detailed feedback including validation errors with JSON paths, warnings about best practices, and deprecations. This helps ensure your shell themes are syntactically correct and follow the latest schema definitions before you apply them to your local environment.
What you can do with it
- 1Check full configuration filesAsk the AI to verify if your entire oh-my-posh theme file is valid and identify any syntax errors.
Written from the project's README. Every use case is checked against a quote from it.
How to install Oh My Posh MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Oh My Posh MCP in Claude Code
$ claude mcp add --transport http validator https://ohmyposh.dev/api/mcpInstall Oh My Posh MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"validator": {
"url": "https://ohmyposh.dev/api/mcp"
}
}
}Install Oh My Posh MCP in VS Code
.vscode/mcp.json
{
"servers": {
"validator": {
"type": "http",
"url": "https://ohmyposh.dev/api/mcp"
}
}
}Install Oh My Posh MCP in VS Code CLI
$ code --add-mcp '{"name":"validator","type":"http","url":"https://ohmyposh.dev/api/mcp"}'Install Oh My Posh MCP in Codex
$ codex mcp add validator --url https://ohmyposh.dev/api/mcpInstall Oh My Posh MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.validator] url = "https://ohmyposh.dev/api/mcp"
Install Oh My Posh MCP in Gemini CLI
$ gemini mcp add -s user --transport http validator https://ohmyposh.dev/api/mcpInstall Oh My Posh MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"validator": {
"url": "https://ohmyposh.dev/api/mcp",
"type": "http"
}
}
}Automated checks
Ran Nov 11, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageNot checked
- Remote endpoint uses HTTPSPass
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHubtitle: 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 requestsGET /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:
{
"mcpServers": {
"oh-my-posh-validator": {
"type": "http",
"url": "https://ohmyposh.dev/api/mcp"
}
}
}
Direct HTTP Requests
Get Server Info
curl https://ohmyposh.dev/api/mcp
List Available Tools
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
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
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 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:
{
"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:
cd website/api
npm install
npm 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):
git tag v9.0.0
git push origin v9.0.0
The workflow will:
- Extract version from the tag (e.g.,
v9.0.0→9.0.0) - Update
server.jsonversion to match - Validate the
server.jsonfile - Authenticate with the MCP Registry using GitHub OIDC
- 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 configurationserver.schema.json- JSON schema for validationvalidate-server.js- Validation script.github/workflows/publish-mcp.yml- GitHub Actions workflow
Validating server.json Locally
cd website/api
npm install
cd mcp
node validate-server.js
Oh My Posh MCP questions
How do I add Oh My Posh MCP to Claude Code?
Run claude mcp add --transport http validator https://ohmyposh.dev/api/mcp in your terminal. Add --scope user to make it available in every project.
How do I add Oh My Posh MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does the Oh My Posh validator MCP server expose?
It exposes two tools: validate_config for full configurations and validate_segment for individual prompt segments.
Which configuration formats can be validated?
The server supports JSON, YAML, and TOML formats.
What does the validation response contain?
It returns a valid flag, arrays of errors and warnings, the detected format, and the parsed configuration.