Overview of mcp-settings.schema.json
The file at https://raw.githubusercontent.com/modelcontextprotocol/servers/main/schema/mcp-settings.schema.json defines the JSON schema for configuring Model Context Protocol (MCP) servers. This schema is used by applications (such as Claude Desktop, Cursor, and VS Code) to connect to and manage MCP servers, which provide context, tools, and resources to large language models (LLMs) in a standardized way[2][3][8].
Purpose
The schema specifies how to declare and configure MCP servers, including connection details, authentication, and user prompts for sensitive information. It enables users and developers to:
- Register multiple MCP servers in a single configuration file.
- Define how each server is started or connected (e.g., via stdio or HTTP/SSE).
- Securely manage credentials and environment variables.
- Provide user-friendly prompts for required inputs (like API keys)[8].
Key Schema Structure
While the full schema is best viewed directly, here are the main components and their roles, based on documentation and usage in tools like VS Code and Cursor[3][8]:
Top-Level Structure
inputs: An array of input prompts for sensitive or user-specific configuration values (e.g., API keys, tokens).
servers: An object mapping server names to their configuration objects.
Server Configuration
Each server entry typically includes:
| Field | Description | Example Value |
|---|
type | Connection type: "stdio" (local process) or "sse" (HTTP/SSE endpoint) | "stdio", "sse" |
command | Command to launch the server (for stdio type) | "python", "docker" |
args | Arguments for the command | ["server.py", "--port", "3000"] |
env | Environment variables (can reference inputs) | {"API_KEY": "${input:api-key}"} |
envFile | Path to a file with environment variables | "${workspaceFolder}/.env" |
url | URL for SSE servers | "http://localhost:3000" |
headers | HTTP headers for SSE servers | {"API_KEY": "${input:api-key}"} |
Inputs
Inputs allow you to define prompts for user-supplied values, such as:
type: The kind of input (e.g., "promptString")
id: Unique identifier for the input
description: Description shown to the user
password: Boolean, whether to mask the input (for secrets)
Example:
"inputs": [
{
"type": "promptString",
"id": "perplexity-key",
"description": "Perplexity API Key",
"password": true
}
]
Example Configuration
{
"inputs": [
{
"type": "promptString",
"id": "perplexity-key",
"description": "Perplexity API Key",
"password": true
}
],
"servers": {
"Perplexity": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "PERPLEXITY_API_KEY", "mcp/perplexity-ask"],
"env": {
"PERPLEXITY_API_KEY": "${input:perplexity-key}"
}
},
"fetch": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-fetch"]
},
"my-remote-server": {
"type": "sse",
"url": "http://api.contoso.com/sse",
"headers": { "VERSION": "1.2" }
}
}
}
[8]
Usage Context
- Local and Global Configuration: The schema can be used for project-specific settings (e.g.,
.cursor/mcp.json) or global settings (e.g., ~/.cursor/mcp.json)[3].
- Tool Integration: Supported by tools like Claude Desktop, Cursor, and VS Code for connecting to MCP servers and managing tool access[3][8].
- Security: Inputs and environment variables allow secure handling of secrets without hardcoding them in config files[8].
Summary Table
| Section | Purpose |
|---|
inputs | Securely prompt for user credentials or configuration values |
servers | Define one or more MCP servers, including how to connect, authenticate, and configure |
References
- [VS Code MCP server configuration documentation][8]
- [Cursor MCP documentation][3]
- [Model Context Protocol specification][2]
This schema is central to securely and flexibly connecting LLM applications to external data and tools using the Model Context Protocol.