Skip to content

Commit e907e78

Browse files
committed
Model Context Protocol (MCP) implementation ; increase coverage
1 parent 5c069eb commit e907e78

59 files changed

Lines changed: 6076 additions & 38 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cdd-python-all
33
[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![interactive WASM web demo](https://img.shields.io/badge/interactive-WASM_web_demo-blue.svg)](https://offscale.io/wasm_web_demo)
55
[![CI](https://github.com/offscale/cdd-python-all/actions/workflows/ci.yml/badge.svg)](https://github.com/offscale/cdd-python-all/actions)
6-
[![Test Coverage](https://img.shields.io/badge/test_coverage-99%25-brightgreen.svg)](#)
6+
[![Test Coverage](https://img.shields.io/badge/test_coverage-100%25-brightgreen.svg)](#)
77
[![Doc Coverage](https://img.shields.io/badge/doc_coverage-100%25-brightgreen.svg)](#)
88

99
----
@@ -68,6 +68,7 @@ The `cdd-python-all` compiler leverages a unified architecture to support variou
6868
- **Compilation**:
6969
- **OpenAPI → `Python`**: Generate idiomatic native models, network routes, client SDKs, and boilerplate directly from OpenAPI (`.json` / `.yaml`) specifications.
7070
- **`Python` → OpenAPI**: Statically parse existing `Python` source code and emit compliant OpenAPI specifications.
71+
- **Model Context Protocol (MCP)**: Generate and run MCP clients and servers, exposing your APIs seamlessly to AI models.
7172
- **AST-Driven & Safe**: Employs static analysis instead of unsafe dynamic execution or reflection, allowing it to safely parse and emit code even for incomplete or un-compilable project states.
7273
- **Seamless Sync**: Keep your docs, tests, database, clients, and routing in perfect harmony. Update your code, and generate the docs; or update the docs, and generate the code.
7374

mcp-1.0.0/cli-gen.md

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

mcp-1.0.0/client-cli.md

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

mcp-1.0.0/client-sdk.md

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

mcp-1.0.0/sdk-gen.md

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

mcp-1.0.0/server-gen.md

Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "openapi-python-client"
7-
version = "0.0.1"
7+
version = "0.0.2"
88
description = "OpenAPI 3.2.0 Python Client"
99
readme = "README.md"
1010
requires-python = ">=3.9,<3.14"

scripts/doc_coverage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def calculate_doc_coverage(directory):
2323
if ast.get_docstring(tree):
2424
with_docs += 1
2525
else:
26-
pass # print(f"Missing docstring: Module {path}")
26+
print(f"Missing docstring: Module {path}")
2727

2828
for node in ast.walk(tree):
2929
if isinstance(
@@ -38,7 +38,7 @@ def calculate_doc_coverage(directory):
3838
if ast.get_docstring(node):
3939
with_docs += 1
4040
else:
41-
pass # pragma: no cover
41+
print(f"Missing docstring: {path} :: {node.name}")
4242

4343
percent = (with_docs / total * 100) if total > 0 else 0
4444
return percent, with_docs, total

src/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Init module."""

src/openapi_client/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
generate_docs_json,
1212
serve_json_rpc,
1313
)
14+
from openapi_client import mcp
1415

1516
__all__ = [
1617
"ClientGenerator",
@@ -20,4 +21,5 @@
2021
"generate_to_openapi",
2122
"generate_docs_json",
2223
"serve_json_rpc",
24+
"mcp",
2325
]

0 commit comments

Comments
 (0)