mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
Update schema path (#1595)
This commit is contained in:
parent
6c51dad870
commit
b34519c356
22 changed files with 654 additions and 138 deletions
|
|
@ -33,7 +33,7 @@ FastMCP provides JSON schemas for IDE autocomplete and validation. Add the schem
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -42,8 +42,8 @@ FastMCP provides JSON schemas for IDE autocomplete and validation. Add the schem
|
||||||
```
|
```
|
||||||
|
|
||||||
Two schema URLs are available:
|
Two schema URLs are available:
|
||||||
- **Version-specific**: `https://gofastmcp.com/schemas/fastmcp_config/v1.json`
|
- **Version-specific**: `https://gofastmcp.com/public/schemas/fastmcp.json/v1.json`
|
||||||
- **Latest version**: `https://gofastmcp.com/schemas/fastmcp_config/latest.json`
|
- **Latest version**: `https://gofastmcp.com/public/schemas/fastmcp.json/latest.json`
|
||||||
|
|
||||||
Modern IDEs like VS Code will automatically provide autocomplete suggestions, validation, and inline documentation when the schema is specified.
|
Modern IDEs like VS Code will automatically provide autocomplete suggestions, validation, and inline documentation when the schema is specified.
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ The `fastmcp.json` file has three main sections, each controlling a different as
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -261,7 +261,7 @@ A minimal configuration for a simple server:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -276,7 +276,7 @@ A configuration optimized for local development:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "src/server.py:app",
|
"entrypoint": "src/server.py:app",
|
||||||
"environment": {
|
"environment": {
|
||||||
"python": "3.12",
|
"python": "3.12",
|
||||||
|
|
@ -302,7 +302,7 @@ A production-ready configuration with full dependency management:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "app/main.py",
|
"file": "app/main.py",
|
||||||
"object": "mcp_server"
|
"object": "mcp_server"
|
||||||
|
|
@ -335,7 +335,7 @@ Configuration for a data analysis server with scientific packages:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "analysis_server.py",
|
"file": "analysis_server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -367,7 +367,7 @@ You can maintain multiple configuration files for different environments:
|
||||||
**dev.fastmcp.json**:
|
**dev.fastmcp.json**:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -382,7 +382,7 @@ You can maintain multiple configuration files for different environments:
|
||||||
**prod.fastmcp.json**:
|
**prod.fastmcp.json**:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
@ -515,7 +515,7 @@ uv run --with pandas --with requests \
|
||||||
**Equivalent fastmcp.json**:
|
**Equivalent fastmcp.json**:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ Alternatively, you can use a `fastmcp.json` configuration file (recommended):
|
||||||
|
|
||||||
```json fastmcp.json
|
```json fastmcp.json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ Alternatively, you can use a `fastmcp.json` configuration file (recommended):
|
||||||
|
|
||||||
```json fastmcp.json
|
```json fastmcp.json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ Alternatively, you can use a `fastmcp.json` configuration file (recommended):
|
||||||
|
|
||||||
```json fastmcp.json
|
```json fastmcp.json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ You can also use a `fastmcp.json` configuration file (recommended):
|
||||||
|
|
||||||
```json fastmcp.json
|
```json fastmcp.json
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
|
|
|
||||||
296
docs/public/schemas/fastmcp-json/latest.json
Normal file
296
docs/public/schemas/fastmcp-json/latest.json
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
{
|
||||||
|
"$defs": {
|
||||||
|
"DeploymentConfig": {
|
||||||
|
"description": "Configuration for server deployment and runtime settings.",
|
||||||
|
"properties": {
|
||||||
|
"transport": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"enum": ["stdio", "http", "sse"],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Transport protocol to use",
|
||||||
|
"title": "Transport"
|
||||||
|
},
|
||||||
|
"host": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Host to bind to when using HTTP transport",
|
||||||
|
"examples": ["127.0.0.1", "0.0.0.0", "localhost"],
|
||||||
|
"title": "Host"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Port to bind to when using HTTP transport",
|
||||||
|
"examples": [8000, 3000, 5000],
|
||||||
|
"title": "Port"
|
||||||
|
},
|
||||||
|
"path": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "URL path for the server endpoint",
|
||||||
|
"examples": ["/mcp/", "/api/mcp/", "/sse/"],
|
||||||
|
"title": "Path"
|
||||||
|
},
|
||||||
|
"log_level": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Log level for the server",
|
||||||
|
"title": "Log Level"
|
||||||
|
},
|
||||||
|
"cwd": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Working directory for the server process",
|
||||||
|
"examples": [".", "./src", "/app"],
|
||||||
|
"title": "Cwd"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Environment variables to set when running the server",
|
||||||
|
"examples": [
|
||||||
|
{
|
||||||
|
"API_KEY": "secret",
|
||||||
|
"DEBUG": "true"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Env"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Arguments to pass to the server (after --)",
|
||||||
|
"examples": [["--config", "config.json", "--debug"]],
|
||||||
|
"title": "Args"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "DeploymentConfig",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"EntrypointConfig": {
|
||||||
|
"description": "Configuration for server entrypoint when using object format.",
|
||||||
|
"properties": {
|
||||||
|
"file": {
|
||||||
|
"description": "Path to Python file containing the server",
|
||||||
|
"examples": ["server.py", "src/server.py", "app/main.py"],
|
||||||
|
"title": "File",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Name of the server object in the file (defaults to searching for mcp/server/app)",
|
||||||
|
"examples": ["app", "mcp", "server"],
|
||||||
|
"title": "Object"
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Git repository URL",
|
||||||
|
"examples": ["https://github.com/user/repo"],
|
||||||
|
"title": "Repo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["file"],
|
||||||
|
"title": "EntrypointConfig",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"EnvironmentConfig": {
|
||||||
|
"description": "Configuration for Python environment setup.",
|
||||||
|
"properties": {
|
||||||
|
"python": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Python version constraint",
|
||||||
|
"examples": ["3.10", "3.11", "3.12"],
|
||||||
|
"title": "Python"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Python packages to install with PEP 508 specifiers",
|
||||||
|
"examples": [["fastmcp>=2.0,<3", "httpx", "pandas>=2.0"]],
|
||||||
|
"title": "Dependencies"
|
||||||
|
},
|
||||||
|
"requirements": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Path to requirements.txt file",
|
||||||
|
"examples": ["requirements.txt", "../requirements/prod.txt"],
|
||||||
|
"title": "Requirements"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Path to project directory containing pyproject.toml",
|
||||||
|
"examples": [".", "../my-project"],
|
||||||
|
"title": "Project"
|
||||||
|
},
|
||||||
|
"editable": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Directory to install in editable mode",
|
||||||
|
"examples": [".", "../my-package"],
|
||||||
|
"title": "Editable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "EnvironmentConfig",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Configuration file for FastMCP servers",
|
||||||
|
"properties": {
|
||||||
|
"$schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
|
"description": "JSON schema for IDE support and validation",
|
||||||
|
"title": "$Schema"
|
||||||
|
},
|
||||||
|
"entrypoint": {
|
||||||
|
"$ref": "#/$defs/EntrypointConfig",
|
||||||
|
"description": "Server entrypoint as a string (file or file:object) or object with file/object/repo",
|
||||||
|
"examples": [
|
||||||
|
"server.py",
|
||||||
|
"server.py:app",
|
||||||
|
{
|
||||||
|
"file": "src/server.py",
|
||||||
|
"object": "app"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"$ref": "#/$defs/EnvironmentConfig",
|
||||||
|
"description": "Python environment setup configuration"
|
||||||
|
},
|
||||||
|
"deployment": {
|
||||||
|
"$ref": "#/$defs/DeploymentConfig",
|
||||||
|
"description": "Server deployment and runtime settings"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["entrypoint"],
|
||||||
|
"title": "FastMCP Configuration",
|
||||||
|
"type": "object",
|
||||||
|
"$id": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json"
|
||||||
|
}
|
||||||
296
docs/public/schemas/fastmcp-json/v1.json
Normal file
296
docs/public/schemas/fastmcp-json/v1.json
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
{
|
||||||
|
"$defs": {
|
||||||
|
"DeploymentConfig": {
|
||||||
|
"description": "Configuration for server deployment and runtime settings.",
|
||||||
|
"properties": {
|
||||||
|
"transport": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"enum": ["stdio", "http", "sse"],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Transport protocol to use",
|
||||||
|
"title": "Transport"
|
||||||
|
},
|
||||||
|
"host": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Host to bind to when using HTTP transport",
|
||||||
|
"examples": ["127.0.0.1", "0.0.0.0", "localhost"],
|
||||||
|
"title": "Host"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Port to bind to when using HTTP transport",
|
||||||
|
"examples": [8000, 3000, 5000],
|
||||||
|
"title": "Port"
|
||||||
|
},
|
||||||
|
"path": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "URL path for the server endpoint",
|
||||||
|
"examples": ["/mcp/", "/api/mcp/", "/sse/"],
|
||||||
|
"title": "Path"
|
||||||
|
},
|
||||||
|
"log_level": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Log level for the server",
|
||||||
|
"title": "Log Level"
|
||||||
|
},
|
||||||
|
"cwd": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Working directory for the server process",
|
||||||
|
"examples": [".", "./src", "/app"],
|
||||||
|
"title": "Cwd"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Environment variables to set when running the server",
|
||||||
|
"examples": [
|
||||||
|
{
|
||||||
|
"API_KEY": "secret",
|
||||||
|
"DEBUG": "true"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Env"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Arguments to pass to the server (after --)",
|
||||||
|
"examples": [["--config", "config.json", "--debug"]],
|
||||||
|
"title": "Args"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "DeploymentConfig",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"EntrypointConfig": {
|
||||||
|
"description": "Configuration for server entrypoint when using object format.",
|
||||||
|
"properties": {
|
||||||
|
"file": {
|
||||||
|
"description": "Path to Python file containing the server",
|
||||||
|
"examples": ["server.py", "src/server.py", "app/main.py"],
|
||||||
|
"title": "File",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"object": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Name of the server object in the file (defaults to searching for mcp/server/app)",
|
||||||
|
"examples": ["app", "mcp", "server"],
|
||||||
|
"title": "Object"
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Git repository URL",
|
||||||
|
"examples": ["https://github.com/user/repo"],
|
||||||
|
"title": "Repo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["file"],
|
||||||
|
"title": "EntrypointConfig",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"EnvironmentConfig": {
|
||||||
|
"description": "Configuration for Python environment setup.",
|
||||||
|
"properties": {
|
||||||
|
"python": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Python version constraint",
|
||||||
|
"examples": ["3.10", "3.11", "3.12"],
|
||||||
|
"title": "Python"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Python packages to install with PEP 508 specifiers",
|
||||||
|
"examples": [["fastmcp>=2.0,<3", "httpx", "pandas>=2.0"]],
|
||||||
|
"title": "Dependencies"
|
||||||
|
},
|
||||||
|
"requirements": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Path to requirements.txt file",
|
||||||
|
"examples": ["requirements.txt", "../requirements/prod.txt"],
|
||||||
|
"title": "Requirements"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Path to project directory containing pyproject.toml",
|
||||||
|
"examples": [".", "../my-project"],
|
||||||
|
"title": "Project"
|
||||||
|
},
|
||||||
|
"editable": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": null,
|
||||||
|
"description": "Directory to install in editable mode",
|
||||||
|
"examples": [".", "../my-package"],
|
||||||
|
"title": "Editable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "EnvironmentConfig",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Configuration file for FastMCP servers",
|
||||||
|
"properties": {
|
||||||
|
"$schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
|
"description": "JSON schema for IDE support and validation",
|
||||||
|
"title": "$Schema"
|
||||||
|
},
|
||||||
|
"entrypoint": {
|
||||||
|
"$ref": "#/$defs/EntrypointConfig",
|
||||||
|
"description": "Server entrypoint as a string (file or file:object) or object with file/object/repo",
|
||||||
|
"examples": [
|
||||||
|
"server.py",
|
||||||
|
"server.py:app",
|
||||||
|
{
|
||||||
|
"file": "src/server.py",
|
||||||
|
"object": "app"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"$ref": "#/$defs/EnvironmentConfig",
|
||||||
|
"description": "Python environment setup configuration"
|
||||||
|
},
|
||||||
|
"deployment": {
|
||||||
|
"$ref": "#/$defs/DeploymentConfig",
|
||||||
|
"description": "Server deployment and runtime settings"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["entrypoint"],
|
||||||
|
"title": "FastMCP Configuration",
|
||||||
|
"type": "object",
|
||||||
|
"$id": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json"
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "src/atproto_mcp/server.py",
|
"entrypoint": "src/atproto_mcp/server.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"atproto_mcp@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/atproto_mcp"
|
"atproto_mcp@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/atproto_mcp"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "src/server.py:app",
|
"entrypoint": "src/server.py:app",
|
||||||
"environment": {
|
"environment": {
|
||||||
"python": "3.12",
|
"python": "3.12",
|
||||||
|
|
@ -17,4 +17,4 @@
|
||||||
"FEATURE_FLAGS": "${FEATURE_FLAGS}"
|
"FEATURE_FLAGS": "${FEATURE_FLAGS}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {
|
"entrypoint": {
|
||||||
"file": "server.py",
|
"file": "server.py",
|
||||||
"object": "mcp"
|
"object": "mcp"
|
||||||
},
|
},
|
||||||
"environment": {
|
"environment": {
|
||||||
"python": "3.12",
|
"python": "3.12",
|
||||||
"dependencies": [
|
"dependencies": ["requests>=2.31.0", "httpx"],
|
||||||
"requests>=2.31.0",
|
|
||||||
"httpx"
|
|
||||||
],
|
|
||||||
"requirements": null,
|
"requirements": null,
|
||||||
"project": null,
|
"project": null,
|
||||||
"editable": null
|
"editable": null
|
||||||
|
|
@ -27,4 +24,4 @@
|
||||||
"cwd": null,
|
"cwd": null,
|
||||||
"args": null
|
"args": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "server.py",
|
"entrypoint": "server.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"python": "3.11",
|
"python": "3.11",
|
||||||
"dependencies": [
|
"dependencies": ["pyautogui", "Pillow"]
|
||||||
"pyautogui",
|
|
||||||
"Pillow"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"deployment": {
|
"deployment": {
|
||||||
"transport": "stdio",
|
"transport": "stdio",
|
||||||
"log_level": "INFO"
|
"log_level": "INFO"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "memory.py",
|
"entrypoint": "memory.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"dependencies": [
|
"dependencies": ["pydantic-ai-slim[openai]", "asyncpg", "numpy", "pgvector"]
|
||||||
"pydantic-ai-slim[openai]",
|
|
||||||
"asyncpg",
|
|
||||||
"numpy",
|
|
||||||
"pgvector"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "mount_example.py"
|
"entrypoint": "mount_example.py"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "screenshot.py",
|
"entrypoint": "screenshot.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"dependencies": ["pyautogui", "Pillow"]
|
"dependencies": ["pyautogui", "Pillow"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "src/smart_home/hub.py",
|
"entrypoint": "src/smart_home/hub.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"smart_home@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/smart_home"
|
"smart_home@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/smart_home"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "src/smart_home/lights/server.py",
|
"entrypoint": "src/smart_home/lights/server.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"smart_home@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/smart_home"
|
"smart_home@git+https://github.com/jlowin/fastmcp.git#subdirectory=examples/smart_home"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ from fastmcp.utilities.logging import get_logger
|
||||||
logger = get_logger("cli.config")
|
logger = get_logger("cli.config")
|
||||||
|
|
||||||
# JSON Schema for IDE support
|
# JSON Schema for IDE support
|
||||||
FASTMCP_JSON_SCHEMA = "https://gofastmcp.com/schemas/fastmcp_config/v1.json"
|
FASTMCP_JSON_SCHEMA = "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json"
|
||||||
|
|
||||||
|
|
||||||
class EntrypointConfig(BaseModel):
|
class EntrypointConfig(BaseModel):
|
||||||
|
|
@ -324,7 +324,7 @@ class FastMCPConfig(BaseModel):
|
||||||
|
|
||||||
# Schema field for IDE support
|
# Schema field for IDE support
|
||||||
schema_: str | None = Field(
|
schema_: str | None = Field(
|
||||||
default="https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
default="https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
alias="$schema",
|
alias="$schema",
|
||||||
description="JSON schema for IDE support and validation",
|
description="JSON schema for IDE support and validation",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,7 @@
|
||||||
"transport": {
|
"transport": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"enum": [
|
"enum": ["stdio", "http", "sse"],
|
||||||
"stdio",
|
|
||||||
"http",
|
|
||||||
"sse"
|
|
||||||
],
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -32,11 +28,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Host to bind to when using HTTP transport",
|
"description": "Host to bind to when using HTTP transport",
|
||||||
"examples": [
|
"examples": ["127.0.0.1", "0.0.0.0", "localhost"],
|
||||||
"127.0.0.1",
|
|
||||||
"0.0.0.0",
|
|
||||||
"localhost"
|
|
||||||
],
|
|
||||||
"title": "Host"
|
"title": "Host"
|
||||||
},
|
},
|
||||||
"port": {
|
"port": {
|
||||||
|
|
@ -50,11 +42,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Port to bind to when using HTTP transport",
|
"description": "Port to bind to when using HTTP transport",
|
||||||
"examples": [
|
"examples": [8000, 3000, 5000],
|
||||||
8000,
|
|
||||||
3000,
|
|
||||||
5000
|
|
||||||
],
|
|
||||||
"title": "Port"
|
"title": "Port"
|
||||||
},
|
},
|
||||||
"path": {
|
"path": {
|
||||||
|
|
@ -68,23 +56,13 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "URL path for the server endpoint",
|
"description": "URL path for the server endpoint",
|
||||||
"examples": [
|
"examples": ["/mcp/", "/api/mcp/", "/sse/"],
|
||||||
"/mcp/",
|
|
||||||
"/api/mcp/",
|
|
||||||
"/sse/"
|
|
||||||
],
|
|
||||||
"title": "Path"
|
"title": "Path"
|
||||||
},
|
},
|
||||||
"log_level": {
|
"log_level": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"enum": [
|
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
||||||
"DEBUG",
|
|
||||||
"INFO",
|
|
||||||
"WARNING",
|
|
||||||
"ERROR",
|
|
||||||
"CRITICAL"
|
|
||||||
],
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -106,11 +84,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Working directory for the server process",
|
"description": "Working directory for the server process",
|
||||||
"examples": [
|
"examples": [".", "./src", "/app"],
|
||||||
".",
|
|
||||||
"./src",
|
|
||||||
"/app"
|
|
||||||
],
|
|
||||||
"title": "Cwd"
|
"title": "Cwd"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
|
|
@ -149,13 +123,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Arguments to pass to the server (after --)",
|
"description": "Arguments to pass to the server (after --)",
|
||||||
"examples": [
|
"examples": [["--config", "config.json", "--debug"]],
|
||||||
[
|
|
||||||
"--config",
|
|
||||||
"config.json",
|
|
||||||
"--debug"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"title": "Args"
|
"title": "Args"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -167,11 +135,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"file": {
|
"file": {
|
||||||
"description": "Path to Python file containing the server",
|
"description": "Path to Python file containing the server",
|
||||||
"examples": [
|
"examples": ["server.py", "src/server.py", "app/main.py"],
|
||||||
"server.py",
|
|
||||||
"src/server.py",
|
|
||||||
"app/main.py"
|
|
||||||
],
|
|
||||||
"title": "File",
|
"title": "File",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
@ -186,11 +150,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Name of the server object in the file (defaults to searching for mcp/server/app)",
|
"description": "Name of the server object in the file (defaults to searching for mcp/server/app)",
|
||||||
"examples": [
|
"examples": ["app", "mcp", "server"],
|
||||||
"app",
|
|
||||||
"mcp",
|
|
||||||
"server"
|
|
||||||
],
|
|
||||||
"title": "Object"
|
"title": "Object"
|
||||||
},
|
},
|
||||||
"repo": {
|
"repo": {
|
||||||
|
|
@ -204,15 +164,11 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Git repository URL",
|
"description": "Git repository URL",
|
||||||
"examples": [
|
"examples": ["https://github.com/user/repo"],
|
||||||
"https://github.com/user/repo"
|
|
||||||
],
|
|
||||||
"title": "Repo"
|
"title": "Repo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": ["file"],
|
||||||
"file"
|
|
||||||
],
|
|
||||||
"title": "EntrypointConfig",
|
"title": "EntrypointConfig",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
|
@ -230,11 +186,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Python version constraint",
|
"description": "Python version constraint",
|
||||||
"examples": [
|
"examples": ["3.10", "3.11", "3.12"],
|
||||||
"3.10",
|
|
||||||
"3.11",
|
|
||||||
"3.12"
|
|
||||||
],
|
|
||||||
"title": "Python"
|
"title": "Python"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -251,13 +203,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Python packages to install with PEP 508 specifiers",
|
"description": "Python packages to install with PEP 508 specifiers",
|
||||||
"examples": [
|
"examples": [["fastmcp>=2.0,<3", "httpx", "pandas>=2.0"]],
|
||||||
[
|
|
||||||
"fastmcp>=2.0,<3",
|
|
||||||
"httpx",
|
|
||||||
"pandas>=2.0"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"title": "Dependencies"
|
"title": "Dependencies"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
|
|
@ -271,10 +217,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Path to requirements.txt file",
|
"description": "Path to requirements.txt file",
|
||||||
"examples": [
|
"examples": ["requirements.txt", "../requirements/prod.txt"],
|
||||||
"requirements.txt",
|
|
||||||
"../requirements/prod.txt"
|
|
||||||
],
|
|
||||||
"title": "Requirements"
|
"title": "Requirements"
|
||||||
},
|
},
|
||||||
"project": {
|
"project": {
|
||||||
|
|
@ -288,10 +231,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Path to project directory containing pyproject.toml",
|
"description": "Path to project directory containing pyproject.toml",
|
||||||
"examples": [
|
"examples": [".", "../my-project"],
|
||||||
".",
|
|
||||||
"../my-project"
|
|
||||||
],
|
|
||||||
"title": "Project"
|
"title": "Project"
|
||||||
},
|
},
|
||||||
"editable": {
|
"editable": {
|
||||||
|
|
@ -305,10 +245,7 @@
|
||||||
],
|
],
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Directory to install in editable mode",
|
"description": "Directory to install in editable mode",
|
||||||
"examples": [
|
"examples": [".", "../my-package"],
|
||||||
".",
|
|
||||||
"../my-package"
|
|
||||||
],
|
|
||||||
"title": "Editable"
|
"title": "Editable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -327,7 +264,7 @@
|
||||||
"type": "null"
|
"type": "null"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"default": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"description": "JSON schema for IDE support and validation",
|
"description": "JSON schema for IDE support and validation",
|
||||||
"title": "$Schema"
|
"title": "$Schema"
|
||||||
},
|
},
|
||||||
|
|
@ -352,10 +289,8 @@
|
||||||
"description": "Server deployment and runtime settings"
|
"description": "Server deployment and runtime settings"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": ["entrypoint"],
|
||||||
"entrypoint"
|
|
||||||
],
|
|
||||||
"title": "FastMCP Configuration",
|
"title": "FastMCP Configuration",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$id": "https://gofastmcp.com/schemas/fastmcp_config/v1.json"
|
"$id": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ class TestFastMCPConfig:
|
||||||
def test_from_file(self, tmp_path):
|
def test_from_file(self, tmp_path):
|
||||||
"""Test loading config from JSON file with nested structure."""
|
"""Test loading config from JSON file with nested structure."""
|
||||||
config_data = {
|
config_data = {
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": {"file": "src/server.py", "object": "app"},
|
"entrypoint": {"file": "src/server.py", "object": "app"},
|
||||||
"environment": {"python": "3.12", "dependencies": ["requests"]},
|
"environment": {"python": "3.12", "dependencies": ["requests"]},
|
||||||
"deployment": {"transport": "http", "port": 8000},
|
"deployment": {"transport": "http", "port": 8000},
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# Create config file
|
# Create config file
|
||||||
config_data = {
|
config_data = {
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "server.py",
|
"entrypoint": "server.py",
|
||||||
"environment": {
|
"environment": {
|
||||||
"python": sys.version.split()[0], # Use current Python version
|
"python": sys.version.split()[0], # Use current Python version
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ def test_schema_has_correct_id():
|
||||||
assert "$id" in generated_schema
|
assert "$id" in generated_schema
|
||||||
assert (
|
assert (
|
||||||
generated_schema["$id"]
|
generated_schema["$id"]
|
||||||
== "https://gofastmcp.com/schemas/fastmcp_config/v1.json"
|
== "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ from fastmcp.utilities.fastmcp_config import (
|
||||||
def sample_config(tmp_path):
|
def sample_config(tmp_path):
|
||||||
"""Create a sample fastmcp.json configuration file with nested structure."""
|
"""Create a sample fastmcp.json configuration file with nested structure."""
|
||||||
config_data = {
|
config_data = {
|
||||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
"$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json",
|
||||||
"entrypoint": "server.py",
|
"entrypoint": "server.py",
|
||||||
"environment": {"python": "3.11", "dependencies": ["requests"]},
|
"environment": {"python": "3.11", "dependencies": ["requests"]},
|
||||||
"deployment": {"transport": "stdio", "env": {"TEST_VAR": "test_value"}},
|
"deployment": {"transport": "stdio", "env": {"TEST_VAR": "test_value"}},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue