Skip to content

Commit f9e3ca9

Browse files
committed
Initial Python SDK import
0 parents  commit f9e3ca9

51 files changed

Lines changed: 7225 additions & 0 deletions

Some content is hidden

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

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
.deepeval/
3+
.pytest_cache/
4+
.venv/
5+
.venv-bench/
6+
7+
__pycache__/
8+
*.py[cod]
9+
10+
node_modules/
11+
.next/

README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Zero Context Protocol Python SDK
2+
3+
This repository is the official Python SDK for Zero Context Protocol.
4+
5+
The public Python surface stays:
6+
7+
- package name: `zcp`
8+
- import path: `import zcp`
9+
10+
The companion documentation and protocol site lives separately as
11+
`zero-context-protocol`.
12+
13+
## What This Repository Owns
14+
15+
- `src/zcp`: the official Python SDK and runtime
16+
- `examples`: official and reference Python examples
17+
- `tests`: SDK, MCP compatibility, and runtime regression tests
18+
- `tools`: repository-local tooling such as the real SDK benchmark harness
19+
- `benchmark_reports`: generated benchmark artifacts that the docs site can consume
20+
21+
## Install
22+
23+
```bash
24+
pip install -e ".[dev,openai,mcp]"
25+
```
26+
27+
Python `3.10+` is required. The MCP extra uses the official MCP Python SDK.
28+
29+
## Official Paths
30+
31+
### MCP-compatible stdio server
32+
33+
```bash
34+
python3 examples/run_zcp_mcp_stdio_server.py
35+
```
36+
37+
### ASGI server with `/zcp` and `/mcp`
38+
39+
```bash
40+
python3 examples/run_zcp_api_server.py
41+
```
42+
43+
### Native ZCP example
44+
45+
```bash
46+
python3 examples/zcp_weather_server.py
47+
```
48+
49+
### Real SDK benchmark
50+
51+
```bash
52+
python3 examples/compare_zcp_mcp_tool_call_benchmark.py --repeats 2
53+
```
54+
55+
Generated reports land in `benchmark_reports/`.
56+
57+
## Validation
58+
59+
```bash
60+
python3 -m pytest -q
61+
```
62+
63+
## Alpha Boundary
64+
65+
Repo-level alpha guarantees focus on:
66+
67+
- `initialize`, `initialized`, `ping`
68+
- tools
69+
- resources
70+
- prompts
71+
- MCP-compatible stdio
72+
- MCP-compatible HTTP at `/mcp`
73+
- native ZCP transport helpers
74+
- bearer auth on the ASGI surface
75+
76+
These remain partial or experimental unless separately contract-tested:
77+
78+
- logging parity details
79+
- sampling
80+
- elicitation
81+
- tasks
82+
- OAuth flows beyond exposed metadata
83+
84+
## Benchmarks
85+
86+
Use only the real SDK benchmark as the primary evidence source:
87+
88+
- script: `examples/compare_zcp_mcp_tool_call_benchmark.py`
89+
- harness: `tools/benchmarking.py`
90+
- reports: `benchmark_reports/zcp_mcp_tool_call_benchmark.json` and `.md`
91+
92+
The static payload comparison in `examples/compare_mcp_zcp_profiles.py` is only
93+
reference material and is not the primary benchmark source.

0 commit comments

Comments
 (0)