nocfo-cli 1.4.2__tar.gz → 1.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/PKG-INFO +1 -1
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/pyproject.toml +1 -1
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/app.py +9 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/server.py +9 -1
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/LICENSE +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/README.md +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/__init__.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/api_client.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/__init__.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/__init__.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/_helpers.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/accounts.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/auth.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/businesses.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/contacts.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/documents.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/files.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/invoices.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/products.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/purchase_invoices.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/reports.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/schema.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/tags.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/commands/user.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/context.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/cli/output.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/config.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/__init__.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/auth.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/contract_validation.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/error_handling.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/http_error_capture.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/mcp/middleware.py +0 -0
- {nocfo_cli-1.4.2 → nocfo_cli-1.4.3}/src/nocfo_toolkit/openapi.py +0 -0
|
@@ -103,6 +103,14 @@ def run_mcp_server(
|
|
|
103
103
|
"--required-scopes",
|
|
104
104
|
help="Comma-separated OAuth scopes required for MCP tools.",
|
|
105
105
|
),
|
|
106
|
+
stateless_http: bool = typer.Option(
|
|
107
|
+
False,
|
|
108
|
+
"--stateless-http/--stateful-http",
|
|
109
|
+
help=(
|
|
110
|
+
"Use stateless streamable HTTP mode (recommended behind "
|
|
111
|
+
"load balancers with multiple MCP tasks)."
|
|
112
|
+
),
|
|
113
|
+
),
|
|
106
114
|
) -> None:
|
|
107
115
|
"""Run NoCFO MCP server over stdio or HTTP transport.
|
|
108
116
|
|
|
@@ -135,6 +143,7 @@ def run_mcp_server(
|
|
|
135
143
|
auth_mode=auth_mode_value,
|
|
136
144
|
mcp_base_url=mcp_base_url or os.getenv("NOCFO_MCP_BASE_URL"),
|
|
137
145
|
required_scopes=scope_items,
|
|
146
|
+
stateless_http=stateless_http,
|
|
138
147
|
)
|
|
139
148
|
|
|
140
149
|
if transport_normalized == "http":
|
|
@@ -168,6 +168,7 @@ class MCPServerOptions:
|
|
|
168
168
|
jwt_exchange_path: str = "/auth/jwt/"
|
|
169
169
|
token_refresh_skew_seconds: int = 60
|
|
170
170
|
required_scopes: tuple[str, ...] = ()
|
|
171
|
+
stateless_http: bool = False
|
|
171
172
|
|
|
172
173
|
|
|
173
174
|
def _create_pat_client(
|
|
@@ -288,7 +289,14 @@ def run_http_server(
|
|
|
288
289
|
"""Run NoCFO MCP server over streamable HTTP transport."""
|
|
289
290
|
|
|
290
291
|
server = create_server(config, options=options)
|
|
291
|
-
|
|
292
|
+
opts = options or MCPServerOptions()
|
|
293
|
+
server.run(
|
|
294
|
+
transport="http",
|
|
295
|
+
host=host,
|
|
296
|
+
port=port,
|
|
297
|
+
path=path,
|
|
298
|
+
stateless_http=opts.stateless_http,
|
|
299
|
+
)
|
|
292
300
|
|
|
293
301
|
|
|
294
302
|
async def run_server_async(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|