SchemaStoreMcpServer
No description available
Ask AI about SchemaStoreMcpServer
Powered by Claude Β· Grounded in docs
I know everything about SchemaStoreMcpServer. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
SchemaStore MCP Server
An MCP (Model Context Protocol) server for SchemaStore.org β search, browse, and retrieve JSON schemas from the SchemaStore catalog.
Built with .NET 10 and the official MCP C# SDK.
Quick Start β Use the Hosted Server
The SchemaStore MCP Server is publicly hosted at **https://mcp.schemastore.org**. No local setup required.
Visual Studio
Add a .mcp.json file to your solution root (or add it via Copilot Chat β Select Tools β +):
{
"inputs": [],
"servers": {
"SchemaStore": {
"url": "https://mcp.schemastore.org/",
"type": "http",
"headers": {}
}
}
}
Visual Studio Code
Create .vscode/mcp.json in your workspace (or use Command Palette β MCP: Add Server):
{
"servers": {
"SchemaStore": {
"url": "https://mcp.schemastore.org/",
"type": "http"
}
}
}
Any MCP Client
Point your client at https://mcp.schemastore.org/ using HTTP transport.
Tools
| Tool | Description |
|---|---|
searchSchemas | Search the catalog by name, description, or file pattern. Returns results ranked by relevance. |
getSchema | Get the full JSON Schema document by name (case-insensitive partial match). |
listSchemas | List all schemas with pagination (default: 50 per page). |
Running the Server
cd src/SchemaStoreMcpServer
dotnet run
The server starts on http://localhost:5189 by default (see Properties/launchSettings.json).
- MCP endpoint:
POST /(Streamable HTTP transport) - Legacy SSE:
GET /sse+POST /message - Health check:
GET /health
Adding the MCP Server to Your Editor
Visual Studio (Solution-scoped)
Add a .mcp.json file to your solution root:
{
"inputs": [],
"servers": {
"SchemaStoreMcpServer": {
"url": "http://localhost:5189/",
"type": "http",
"headers": {}
}
}
}
Or use the UI: GitHub Copilot Chat β Select Tools (wrench icon) β + β set Type to http and URL to http://localhost:5189/.
Visual Studio Code
Create .vscode/mcp.json in your workspace:
{
"servers": {
"SchemaStoreMcpServer": {
"url": "http://localhost:5189/",
"type": "http"
}
}
}
Or use the Command Palette: MCP: Add Server β HTTP β http://localhost:5189/ β give it a name.
Any MCP Client (stdio transport alternative)
If you prefer stdio transport (no need to keep a server running), point your client at:
{
"servers": {
"SchemaStoreMcpServer": {
"type": "stdio",
"command": "dotnet",
"args": ["run", "--project", "path/to/src/SchemaStoreMcpServer/SchemaStoreMcpServer.csproj"]
}
}
}
Note: The stdio transport requires adding
.WithStdioServerTransport()toProgram.csinstead of.WithHttpTransport().
Testing with GitHub Copilot
- Start the server (
dotnet run) - Open GitHub Copilot Chat in Agent mode
- Click the Select Tools icon β you should see the three schema tools listed
- Try a prompt like: "Search SchemaStore for Docker-related schemas"
Testing with .http Files
See the test/mcp-session.http file for manual HTTP testing in Visual Studio.
Workflow:
- Run the server
- Execute the
initializePOST request - Copy the
Mcp-Session-Idfrom the response headers - Paste it into
@sessionId = ... - Execute the tool call requests
Architecture
src/SchemaStoreMcpServer/
βββ Program.cs # DI, MCP server, health checks, HTTP transport
βββ Models/
β βββ SchemaCatalogEntry.cs # DTOs (name, description, fileMatch, url)
βββ Services/
β βββ ISchemaCatalogService.cs # Interface
β βββ SchemaCatalogService.cs # Singleton: fetch, search, lookup, pagination
βββ BackgroundServices/
β βββ CatalogRefreshService.cs # Refreshes catalog every 30 minutes
βββ Tools/
βββ SchemaTools.cs # MCP tool definitions
- The schema catalog is fetched from
https://www.schemastore.org/api/json/catalog.jsonat startup and refreshed every 30 minutes. - Search uses multi-term scoring across name (Γ10), description (Γ5), and fileMatch (Γ3).
- Thread-safe catalog refresh via volatile reference swap.
