cortexhub 2.0.4__tar.gz → 2.0.5__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.
- cortexhub-2.0.5/PKG-INFO +105 -0
- cortexhub-2.0.5/README.md +83 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/pyproject.toml +1 -1
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/__init__.py +7 -2
- cortexhub-2.0.4/PKG-INFO +0 -65
- cortexhub-2.0.4/README.md +0 -43
- {cortexhub-2.0.4 → cortexhub-2.0.5}/.gitignore +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/LICENSE +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/_config.py +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/client.py +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/errors.py +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/mcp_key.py +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/mcp_oauth.py +0 -0
- {cortexhub-2.0.4 → cortexhub-2.0.5}/src/cortexhub/session.py +0 -0
cortexhub-2.0.5/PKG-INFO
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cortexhub
|
|
3
|
+
Version: 2.0.5
|
|
4
|
+
Summary: MCP gateway client for CortexHub programmatic agent access.
|
|
5
|
+
Project-URL: Homepage, https://cortexhub.ai
|
|
6
|
+
Project-URL: Documentation, https://docs.cortexhub.ai
|
|
7
|
+
Author-email: CortexHub <hello@cortexhub.ai>
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agents,ai,governance,mcp,programmatic
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# cortexhub
|
|
24
|
+
|
|
25
|
+
Official Python client for the **CortexHub MCP gateway**.
|
|
26
|
+
|
|
27
|
+
This package builds the URL and headers your MCP transport needs to call
|
|
28
|
+
`https://mcp.cortexhub.ai/v1/mcp`. It does not call the CortexHub
|
|
29
|
+
Platform API; for organisation and workspace management, see the
|
|
30
|
+
[Platform API reference](https://docs.cortexhub.ai/docs/rest-api/overview).
|
|
31
|
+
|
|
32
|
+
[Documentation](https://docs.cortexhub.ai/docs/sdks/overview)
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install cortexhub
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Two ways to authenticate
|
|
41
|
+
|
|
42
|
+
The SDK supports both gateway authentication paths through one entry
|
|
43
|
+
point. Pick the one that matches how your application identifies users.
|
|
44
|
+
|
|
45
|
+
### Workspace MCP API key (recommended for backends)
|
|
46
|
+
|
|
47
|
+
Use this when your application has its own users who do not have
|
|
48
|
+
CortexHub accounts. The workspace key authenticates the gateway; the
|
|
49
|
+
end-user identity is attested per call.
|
|
50
|
+
|
|
51
|
+
Mint the key from **Workspace settings → MCP API keys** in the
|
|
52
|
+
CortexHub dashboard, or programmatically via the Platform API.
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from cortexhub import Cortexhub
|
|
56
|
+
|
|
57
|
+
cx = Cortexhub(api_key="cxh_mcpk_<id>_<secret>")
|
|
58
|
+
session = cx.session(
|
|
59
|
+
agent="invoice-bot",
|
|
60
|
+
end_user_subject="user_42", # required for end-user accountability policies
|
|
61
|
+
end_user_display_hint="Alice", # optional, render-only, never persisted
|
|
62
|
+
invocation_mode="autonomous", # default; pass "interactive" if a human is present
|
|
63
|
+
)
|
|
64
|
+
# session.mcp.url and session.mcp.headers → pass to your MCP transport
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### MCP OAuth client
|
|
68
|
+
|
|
69
|
+
Use this when your application signs in CortexHub users interactively.
|
|
70
|
+
Create the OAuth client from **Account settings → MCP OAuth clients** and
|
|
71
|
+
copy the `client_id` and `client_secret`.
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
from cortexhub import Cortexhub
|
|
75
|
+
|
|
76
|
+
cx = Cortexhub(client_id="...", client_secret="...")
|
|
77
|
+
session = cx.session(
|
|
78
|
+
agent="helpdesk-bot",
|
|
79
|
+
mcp_session_id="chat-42", # optional: groups activity per session
|
|
80
|
+
conversation_title="Engineering standup", # optional: context shown in audit
|
|
81
|
+
last_user_message="Create a standup page", # optional: context shown in audit
|
|
82
|
+
)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Environment variables
|
|
86
|
+
|
|
87
|
+
| Variable | Default | Purpose |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `CORTEXHUB_URL` | `https://mcp.cortexhub.ai` | MCP gateway base URL |
|
|
90
|
+
| `CORTEXHUB_API_KEY` | — | Workspace MCP API key (`cxh_mcpk_*`) |
|
|
91
|
+
| `CORTEXHUB_CLIENT_ID` | — | MCP OAuth client id |
|
|
92
|
+
| `CORTEXHUB_CLIENT_SECRET` | — | MCP OAuth client secret |
|
|
93
|
+
|
|
94
|
+
If both `CORTEXHUB_API_KEY` and OAuth credentials are configured, the
|
|
95
|
+
API key wins.
|
|
96
|
+
|
|
97
|
+
## What the SDK returns
|
|
98
|
+
|
|
99
|
+
In both modes, `session.mcp.url` and `session.mcp.headers` are ready to
|
|
100
|
+
wire into the MCP transport of your choice (the official MCP Python SDK,
|
|
101
|
+
a custom HTTP client, anything that accepts URL + headers).
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# cortexhub
|
|
2
|
+
|
|
3
|
+
Official Python client for the **CortexHub MCP gateway**.
|
|
4
|
+
|
|
5
|
+
This package builds the URL and headers your MCP transport needs to call
|
|
6
|
+
`https://mcp.cortexhub.ai/v1/mcp`. It does not call the CortexHub
|
|
7
|
+
Platform API; for organisation and workspace management, see the
|
|
8
|
+
[Platform API reference](https://docs.cortexhub.ai/docs/rest-api/overview).
|
|
9
|
+
|
|
10
|
+
[Documentation](https://docs.cortexhub.ai/docs/sdks/overview)
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install cortexhub
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Two ways to authenticate
|
|
19
|
+
|
|
20
|
+
The SDK supports both gateway authentication paths through one entry
|
|
21
|
+
point. Pick the one that matches how your application identifies users.
|
|
22
|
+
|
|
23
|
+
### Workspace MCP API key (recommended for backends)
|
|
24
|
+
|
|
25
|
+
Use this when your application has its own users who do not have
|
|
26
|
+
CortexHub accounts. The workspace key authenticates the gateway; the
|
|
27
|
+
end-user identity is attested per call.
|
|
28
|
+
|
|
29
|
+
Mint the key from **Workspace settings → MCP API keys** in the
|
|
30
|
+
CortexHub dashboard, or programmatically via the Platform API.
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from cortexhub import Cortexhub
|
|
34
|
+
|
|
35
|
+
cx = Cortexhub(api_key="cxh_mcpk_<id>_<secret>")
|
|
36
|
+
session = cx.session(
|
|
37
|
+
agent="invoice-bot",
|
|
38
|
+
end_user_subject="user_42", # required for end-user accountability policies
|
|
39
|
+
end_user_display_hint="Alice", # optional, render-only, never persisted
|
|
40
|
+
invocation_mode="autonomous", # default; pass "interactive" if a human is present
|
|
41
|
+
)
|
|
42
|
+
# session.mcp.url and session.mcp.headers → pass to your MCP transport
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### MCP OAuth client
|
|
46
|
+
|
|
47
|
+
Use this when your application signs in CortexHub users interactively.
|
|
48
|
+
Create the OAuth client from **Account settings → MCP OAuth clients** and
|
|
49
|
+
copy the `client_id` and `client_secret`.
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from cortexhub import Cortexhub
|
|
53
|
+
|
|
54
|
+
cx = Cortexhub(client_id="...", client_secret="...")
|
|
55
|
+
session = cx.session(
|
|
56
|
+
agent="helpdesk-bot",
|
|
57
|
+
mcp_session_id="chat-42", # optional: groups activity per session
|
|
58
|
+
conversation_title="Engineering standup", # optional: context shown in audit
|
|
59
|
+
last_user_message="Create a standup page", # optional: context shown in audit
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Environment variables
|
|
64
|
+
|
|
65
|
+
| Variable | Default | Purpose |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `CORTEXHUB_URL` | `https://mcp.cortexhub.ai` | MCP gateway base URL |
|
|
68
|
+
| `CORTEXHUB_API_KEY` | — | Workspace MCP API key (`cxh_mcpk_*`) |
|
|
69
|
+
| `CORTEXHUB_CLIENT_ID` | — | MCP OAuth client id |
|
|
70
|
+
| `CORTEXHUB_CLIENT_SECRET` | — | MCP OAuth client secret |
|
|
71
|
+
|
|
72
|
+
If both `CORTEXHUB_API_KEY` and OAuth credentials are configured, the
|
|
73
|
+
API key wins.
|
|
74
|
+
|
|
75
|
+
## What the SDK returns
|
|
76
|
+
|
|
77
|
+
In both modes, `session.mcp.url` and `session.mcp.headers` are ready to
|
|
78
|
+
wire into the MCP transport of your choice (the official MCP Python SDK,
|
|
79
|
+
a custom HTTP client, anything that accepts URL + headers).
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT.
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
"""cortexhub -
|
|
1
|
+
"""cortexhub - Python client for the CortexHub MCP gateway.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package builds the URL and headers your MCP transport needs to
|
|
4
|
+
call ``https://mcp.cortexhub.ai/v1/mcp``. It does not call the
|
|
5
|
+
CortexHub Platform API; for organisation and workspace management, use
|
|
6
|
+
the Platform API directly.
|
|
7
|
+
|
|
8
|
+
Two gateway authentication paths through one entry point:
|
|
4
9
|
|
|
5
10
|
.. code-block:: python
|
|
6
11
|
|
cortexhub-2.0.4/PKG-INFO
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cortexhub
|
|
3
|
-
Version: 2.0.4
|
|
4
|
-
Summary: MCP gateway client for CortexHub programmatic agent access.
|
|
5
|
-
Project-URL: Homepage, https://cortexhub.ai
|
|
6
|
-
Project-URL: Documentation, https://docs.cortexhub.ai
|
|
7
|
-
Author-email: CortexHub <hello@cortexhub.ai>
|
|
8
|
-
License: MIT
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Keywords: agents,ai,governance,mcp,programmatic
|
|
11
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
-
Requires-Python: >=3.10
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-
# cortexhub
|
|
24
|
-
|
|
25
|
-
Official Python SDK for CortexHub programmatic MCP access.
|
|
26
|
-
|
|
27
|
-
[Documentation](https://docs.cortexhub.ai/docs/sdks/overview)
|
|
28
|
-
|
|
29
|
-
## Install
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
pip install cortexhub
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Credentials
|
|
36
|
-
|
|
37
|
-
Create an MCP OAuth client in CortexHub Cloud: **Account** → **MCP API access** → copy `client_id` and `client_secret`.
|
|
38
|
-
|
|
39
|
-
## Usage
|
|
40
|
-
|
|
41
|
-
```python
|
|
42
|
-
from cortexhub import Cortexhub
|
|
43
|
-
|
|
44
|
-
session = Cortexhub().session(
|
|
45
|
-
agent="helpdesk-bot",
|
|
46
|
-
mcp_session_id="chat-42", # optional: separate conversations in Cloud
|
|
47
|
-
conversation_title="Engineering standup", # optional: shown to operators
|
|
48
|
-
last_user_message="Create a standup page in Engineering Confluence", # optional
|
|
49
|
-
)
|
|
50
|
-
# session.mcp.url and session.mcp.headers → pass to your MCP transport
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Configuration
|
|
54
|
-
|
|
55
|
-
| Variable | Default | Purpose |
|
|
56
|
-
|---|---|---|
|
|
57
|
-
| `CORTEXHUB_URL` | `https://mcp.cortexhub.ai` | MCP gateway and OAuth token base URL |
|
|
58
|
-
| `CORTEXHUB_CLIENT_ID` | — | MCP OAuth client id |
|
|
59
|
-
| `CORTEXHUB_CLIENT_SECRET` | — | MCP OAuth client secret |
|
|
60
|
-
|
|
61
|
-
Token exchange: `POST {CORTEXHUB_URL}/v1/mcp/oauth/token` (`client_credentials` or `refresh_token`).
|
|
62
|
-
|
|
63
|
-
## License
|
|
64
|
-
|
|
65
|
-
MIT.
|
cortexhub-2.0.4/README.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# cortexhub
|
|
2
|
-
|
|
3
|
-
Official Python SDK for CortexHub programmatic MCP access.
|
|
4
|
-
|
|
5
|
-
[Documentation](https://docs.cortexhub.ai/docs/sdks/overview)
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pip install cortexhub
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Credentials
|
|
14
|
-
|
|
15
|
-
Create an MCP OAuth client in CortexHub Cloud: **Account** → **MCP API access** → copy `client_id` and `client_secret`.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```python
|
|
20
|
-
from cortexhub import Cortexhub
|
|
21
|
-
|
|
22
|
-
session = Cortexhub().session(
|
|
23
|
-
agent="helpdesk-bot",
|
|
24
|
-
mcp_session_id="chat-42", # optional: separate conversations in Cloud
|
|
25
|
-
conversation_title="Engineering standup", # optional: shown to operators
|
|
26
|
-
last_user_message="Create a standup page in Engineering Confluence", # optional
|
|
27
|
-
)
|
|
28
|
-
# session.mcp.url and session.mcp.headers → pass to your MCP transport
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Configuration
|
|
32
|
-
|
|
33
|
-
| Variable | Default | Purpose |
|
|
34
|
-
|---|---|---|
|
|
35
|
-
| `CORTEXHUB_URL` | `https://mcp.cortexhub.ai` | MCP gateway and OAuth token base URL |
|
|
36
|
-
| `CORTEXHUB_CLIENT_ID` | — | MCP OAuth client id |
|
|
37
|
-
| `CORTEXHUB_CLIENT_SECRET` | — | MCP OAuth client secret |
|
|
38
|
-
|
|
39
|
-
Token exchange: `POST {CORTEXHUB_URL}/v1/mcp/oauth/token` (`client_credentials` or `refresh_token`).
|
|
40
|
-
|
|
41
|
-
## License
|
|
42
|
-
|
|
43
|
-
MIT.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|