deep-agentic-core-mcp 0.1.0__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.
- deep_agentic_core_mcp-0.1.0/.github/workflows/ci.yml +36 -0
- deep_agentic_core_mcp-0.1.0/.github/workflows/release-pypi.yml +46 -0
- deep_agentic_core_mcp-0.1.0/.gitignore +10 -0
- deep_agentic_core_mcp-0.1.0/PKG-INFO +192 -0
- deep_agentic_core_mcp-0.1.0/README.md +161 -0
- deep_agentic_core_mcp-0.1.0/ROADMAP.md +113 -0
- deep_agentic_core_mcp-0.1.0/docs/architecture.md +29 -0
- deep_agentic_core_mcp-0.1.0/examples/sample_workflow.json +18 -0
- deep_agentic_core_mcp-0.1.0/pyproject.toml +76 -0
- deep_agentic_core_mcp-0.1.0/server.json +21 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/__init__.py +5 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/adapters/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/adapters/agentic_chaos.py +6 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/adapters/agenticlens.py +6 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/config.py +5 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/prompts/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/prompts/registry.py +15 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/resources/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/resources/catalog.py +17 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/schemas/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/schemas/tooling.py +26 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/server.py +117 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/services/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/services/registry.py +25 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/tools/__init__.py +1 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/tools/chaos.py +8 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/tools/core.py +13 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/tools/lens.py +8 -0
- deep_agentic_core_mcp-0.1.0/src/deep_agentic_core_mcp/tools/registry.py +27 -0
- deep_agentic_core_mcp-0.1.0/tests/test_imports.py +18 -0
- deep_agentic_core_mcp-0.1.0/tests/test_registry.py +27 -0
- deep_agentic_core_mcp-0.1.0/tests/test_server.py +59 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install -e ".[dev]"
|
|
25
|
+
|
|
26
|
+
- name: Lint (ruff check)
|
|
27
|
+
run: ruff check .
|
|
28
|
+
|
|
29
|
+
- name: Format check (ruff format)
|
|
30
|
+
run: ruff format --check .
|
|
31
|
+
|
|
32
|
+
- name: Type check (mypy)
|
|
33
|
+
run: mypy
|
|
34
|
+
|
|
35
|
+
- name: Test (pytest)
|
|
36
|
+
run: pytest --cov
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: publish-pypi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
- name: Build distributions
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install build twine
|
|
25
|
+
python -m build
|
|
26
|
+
python -m twine check dist/*
|
|
27
|
+
- name: Upload distributions
|
|
28
|
+
uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: python-package-distributions
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
publish-pypi:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
needs: build
|
|
36
|
+
environment: pypi
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
|
39
|
+
steps:
|
|
40
|
+
- name: Download distributions
|
|
41
|
+
uses: actions/download-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: python-package-distributions
|
|
44
|
+
path: dist/
|
|
45
|
+
- name: Publish to PyPI
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deep-agentic-core-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unified MCP server for AgenticLens and Agentic Chaos workflows.
|
|
5
|
+
Project-URL: Homepage, https://github.com/DeepAgentLabs/deep-agentic-core-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/DeepAgentLabs/deep-agentic-core-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/DeepAgentLabs/deep-agentic-core-mcp/issues
|
|
8
|
+
Author: DeepAgentLabs
|
|
9
|
+
License: MIT
|
|
10
|
+
Keywords: agentic-ai,chaos-engineering,llm,mcp,observability
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
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: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: mcp>=1.10.0
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
24
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
29
|
+
Requires-Dist: twine>=5.1; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# deep-agentic-core-mcp
|
|
33
|
+
|
|
34
|
+
`deep-agentic-core-mcp` is the shared MCP server layer for the DeepAgentLabs
|
|
35
|
+
ecosystem. It is designed to expose a single MCP interface that combines:
|
|
36
|
+
|
|
37
|
+
- `agenticlens` style workflow inspection, profiling, and analysis
|
|
38
|
+
- `agentic-chaos` style resilience testing and fault-injection workflows
|
|
39
|
+
|
|
40
|
+
The goal is one MCP server, one package, and one registry identity rather than
|
|
41
|
+
separate MCP servers for each product surface.
|
|
42
|
+
|
|
43
|
+
<!-- mcp-name: io.github.deepagentlabs/deep-agentic-core-mcp -->
|
|
44
|
+
|
|
45
|
+
## Idea
|
|
46
|
+
|
|
47
|
+
This project is the control plane between LLM hosts and the existing Python
|
|
48
|
+
libraries:
|
|
49
|
+
|
|
50
|
+
- `agenticlens` remains the core profiling and analysis engine
|
|
51
|
+
- `agentic-chaos` remains the core chaos and resilience engine
|
|
52
|
+
- `deep-agentic-core-mcp` becomes the MCP-native interface that hosts can call
|
|
53
|
+
|
|
54
|
+
That means MCP clients can connect once and access both observability and chaos
|
|
55
|
+
testing capabilities through one server.
|
|
56
|
+
|
|
57
|
+
## What This Server Should Eventually Do
|
|
58
|
+
|
|
59
|
+
Planned capability areas:
|
|
60
|
+
|
|
61
|
+
- profile an agentic workflow and return structured telemetry summaries
|
|
62
|
+
- analyze workflow artifacts and surface optimization recommendations
|
|
63
|
+
- run controlled chaos experiments against target workflows
|
|
64
|
+
- compare normal versus chaos runs
|
|
65
|
+
- expose shared resources such as workflow schemas, run metadata, and saved
|
|
66
|
+
reports
|
|
67
|
+
|
|
68
|
+
## Design Principles
|
|
69
|
+
|
|
70
|
+
- One MCP identity: publish a single server to the MCP Registry
|
|
71
|
+
- Python-first: package and publish through PyPI
|
|
72
|
+
- Thin orchestration layer: reuse `agenticlens` and `agentic-chaos` instead of
|
|
73
|
+
re-implementing their logic
|
|
74
|
+
- Local-first: work well as a stdio MCP server for developer workflows
|
|
75
|
+
- Expandable: leave room for a later remote deployment mode if needed
|
|
76
|
+
|
|
77
|
+
## Initial Scope
|
|
78
|
+
|
|
79
|
+
The first milestone is foundation only:
|
|
80
|
+
|
|
81
|
+
- repository structure
|
|
82
|
+
- packaging metadata
|
|
83
|
+
- MCP registry metadata
|
|
84
|
+
- roadmap and product framing
|
|
85
|
+
- minimal server entrypoint and tool layout
|
|
86
|
+
|
|
87
|
+
The first working implementation can stay intentionally small while the shape of
|
|
88
|
+
the tool surface stabilizes.
|
|
89
|
+
|
|
90
|
+
## Proposed MCP Surface
|
|
91
|
+
|
|
92
|
+
Possible first tool groups:
|
|
93
|
+
|
|
94
|
+
- `lens.profile_workflow`
|
|
95
|
+
- `lens.analyze_workflow`
|
|
96
|
+
- `chaos.run_experiment`
|
|
97
|
+
- `chaos.list_faults`
|
|
98
|
+
- `core.health`
|
|
99
|
+
- `core.version`
|
|
100
|
+
|
|
101
|
+
These names are placeholders, but the structure matters: one server can expose
|
|
102
|
+
multiple tools without needing multiple MCP packages or registry entries.
|
|
103
|
+
|
|
104
|
+
## Repository Layout
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
mcp-server/
|
|
108
|
+
├── README.md
|
|
109
|
+
├── ROADMAP.md
|
|
110
|
+
├── pyproject.toml
|
|
111
|
+
├── server.json
|
|
112
|
+
├── .gitignore
|
|
113
|
+
├── docs/
|
|
114
|
+
│ └── architecture.md
|
|
115
|
+
├── examples/
|
|
116
|
+
│ └── sample_workflow.json
|
|
117
|
+
├── src/
|
|
118
|
+
│ └── deep_agentic_core_mcp/
|
|
119
|
+
│ ├── __init__.py
|
|
120
|
+
│ ├── server.py
|
|
121
|
+
│ ├── config.py
|
|
122
|
+
│ ├── prompts/
|
|
123
|
+
│ │ ├── __init__.py
|
|
124
|
+
│ │ └── registry.py
|
|
125
|
+
│ ├── resources/
|
|
126
|
+
│ │ ├── __init__.py
|
|
127
|
+
│ │ └── catalog.py
|
|
128
|
+
│ ├── schemas/
|
|
129
|
+
│ │ ├── __init__.py
|
|
130
|
+
│ │ └── tooling.py
|
|
131
|
+
│ ├── services/
|
|
132
|
+
│ │ ├── __init__.py
|
|
133
|
+
│ │ └── registry.py
|
|
134
|
+
│ ├── adapters/
|
|
135
|
+
│ │ ├── __init__.py
|
|
136
|
+
│ │ ├── agentic_chaos.py
|
|
137
|
+
│ │ └── agenticlens.py
|
|
138
|
+
│ └── tools/
|
|
139
|
+
│ ├── __init__.py
|
|
140
|
+
│ ├── registry.py
|
|
141
|
+
│ ├── chaos.py
|
|
142
|
+
│ ├── core.py
|
|
143
|
+
│ └── lens.py
|
|
144
|
+
└── tests/
|
|
145
|
+
├── test_imports.py
|
|
146
|
+
└── test_registry.py
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## MCP-Oriented Structure
|
|
150
|
+
|
|
151
|
+
This repository should have all of the standard layers we expect for a useful
|
|
152
|
+
MCP server:
|
|
153
|
+
|
|
154
|
+
- `tools/` for callable MCP tools and their registration metadata
|
|
155
|
+
- `resources/` for readable assets such as fault catalogs, templates, and
|
|
156
|
+
workflow examples
|
|
157
|
+
- `prompts/` for reusable prompt templates exposed through the server
|
|
158
|
+
- `schemas/` for typed request and response contracts
|
|
159
|
+
- `services/` for shared orchestration logic that keeps tool modules thin
|
|
160
|
+
- `adapters/` for integration boundaries to `agenticlens` and
|
|
161
|
+
`agentic-chaos`
|
|
162
|
+
|
|
163
|
+
The implementation is still early, but the file structure now reflects that
|
|
164
|
+
shape so we can add functionality without reshuffling the repo later.
|
|
165
|
+
|
|
166
|
+
## Packaging and Publishing Model
|
|
167
|
+
|
|
168
|
+
`deep-agentic-core-mcp` should publish in two layers:
|
|
169
|
+
|
|
170
|
+
1. Publish the Python package to PyPI.
|
|
171
|
+
2. Publish the MCP metadata in `server.json` to the official MCP Registry.
|
|
172
|
+
|
|
173
|
+
For PyPI-based verification, the `mcp-name` marker above must match the
|
|
174
|
+
`name` field in `server.json`.
|
|
175
|
+
|
|
176
|
+
## Near-Term Build Order
|
|
177
|
+
|
|
178
|
+
1. Lock the canonical namespace and package metadata.
|
|
179
|
+
2. Implement the stdio MCP server entrypoint.
|
|
180
|
+
3. Add a minimal `core.health` tool.
|
|
181
|
+
4. Add the first `agenticlens` and `agentic-chaos` adapter-backed tools.
|
|
182
|
+
5. Add examples and publishable packaging checks.
|
|
183
|
+
|
|
184
|
+
## Notes
|
|
185
|
+
|
|
186
|
+
This scaffold assumes the intended GitHub namespace is
|
|
187
|
+
`io.github.deepagentlabs/deep-agentic-core-mcp`. If the final publishing
|
|
188
|
+
account or org changes, update:
|
|
189
|
+
|
|
190
|
+
- the `mcp-name` marker in this README
|
|
191
|
+
- `server.json`
|
|
192
|
+
- any repository URLs in `pyproject.toml`
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# deep-agentic-core-mcp
|
|
2
|
+
|
|
3
|
+
`deep-agentic-core-mcp` is the shared MCP server layer for the DeepAgentLabs
|
|
4
|
+
ecosystem. It is designed to expose a single MCP interface that combines:
|
|
5
|
+
|
|
6
|
+
- `agenticlens` style workflow inspection, profiling, and analysis
|
|
7
|
+
- `agentic-chaos` style resilience testing and fault-injection workflows
|
|
8
|
+
|
|
9
|
+
The goal is one MCP server, one package, and one registry identity rather than
|
|
10
|
+
separate MCP servers for each product surface.
|
|
11
|
+
|
|
12
|
+
<!-- mcp-name: io.github.deepagentlabs/deep-agentic-core-mcp -->
|
|
13
|
+
|
|
14
|
+
## Idea
|
|
15
|
+
|
|
16
|
+
This project is the control plane between LLM hosts and the existing Python
|
|
17
|
+
libraries:
|
|
18
|
+
|
|
19
|
+
- `agenticlens` remains the core profiling and analysis engine
|
|
20
|
+
- `agentic-chaos` remains the core chaos and resilience engine
|
|
21
|
+
- `deep-agentic-core-mcp` becomes the MCP-native interface that hosts can call
|
|
22
|
+
|
|
23
|
+
That means MCP clients can connect once and access both observability and chaos
|
|
24
|
+
testing capabilities through one server.
|
|
25
|
+
|
|
26
|
+
## What This Server Should Eventually Do
|
|
27
|
+
|
|
28
|
+
Planned capability areas:
|
|
29
|
+
|
|
30
|
+
- profile an agentic workflow and return structured telemetry summaries
|
|
31
|
+
- analyze workflow artifacts and surface optimization recommendations
|
|
32
|
+
- run controlled chaos experiments against target workflows
|
|
33
|
+
- compare normal versus chaos runs
|
|
34
|
+
- expose shared resources such as workflow schemas, run metadata, and saved
|
|
35
|
+
reports
|
|
36
|
+
|
|
37
|
+
## Design Principles
|
|
38
|
+
|
|
39
|
+
- One MCP identity: publish a single server to the MCP Registry
|
|
40
|
+
- Python-first: package and publish through PyPI
|
|
41
|
+
- Thin orchestration layer: reuse `agenticlens` and `agentic-chaos` instead of
|
|
42
|
+
re-implementing their logic
|
|
43
|
+
- Local-first: work well as a stdio MCP server for developer workflows
|
|
44
|
+
- Expandable: leave room for a later remote deployment mode if needed
|
|
45
|
+
|
|
46
|
+
## Initial Scope
|
|
47
|
+
|
|
48
|
+
The first milestone is foundation only:
|
|
49
|
+
|
|
50
|
+
- repository structure
|
|
51
|
+
- packaging metadata
|
|
52
|
+
- MCP registry metadata
|
|
53
|
+
- roadmap and product framing
|
|
54
|
+
- minimal server entrypoint and tool layout
|
|
55
|
+
|
|
56
|
+
The first working implementation can stay intentionally small while the shape of
|
|
57
|
+
the tool surface stabilizes.
|
|
58
|
+
|
|
59
|
+
## Proposed MCP Surface
|
|
60
|
+
|
|
61
|
+
Possible first tool groups:
|
|
62
|
+
|
|
63
|
+
- `lens.profile_workflow`
|
|
64
|
+
- `lens.analyze_workflow`
|
|
65
|
+
- `chaos.run_experiment`
|
|
66
|
+
- `chaos.list_faults`
|
|
67
|
+
- `core.health`
|
|
68
|
+
- `core.version`
|
|
69
|
+
|
|
70
|
+
These names are placeholders, but the structure matters: one server can expose
|
|
71
|
+
multiple tools without needing multiple MCP packages or registry entries.
|
|
72
|
+
|
|
73
|
+
## Repository Layout
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
mcp-server/
|
|
77
|
+
├── README.md
|
|
78
|
+
├── ROADMAP.md
|
|
79
|
+
├── pyproject.toml
|
|
80
|
+
├── server.json
|
|
81
|
+
├── .gitignore
|
|
82
|
+
├── docs/
|
|
83
|
+
│ └── architecture.md
|
|
84
|
+
├── examples/
|
|
85
|
+
│ └── sample_workflow.json
|
|
86
|
+
├── src/
|
|
87
|
+
│ └── deep_agentic_core_mcp/
|
|
88
|
+
│ ├── __init__.py
|
|
89
|
+
│ ├── server.py
|
|
90
|
+
│ ├── config.py
|
|
91
|
+
│ ├── prompts/
|
|
92
|
+
│ │ ├── __init__.py
|
|
93
|
+
│ │ └── registry.py
|
|
94
|
+
│ ├── resources/
|
|
95
|
+
│ │ ├── __init__.py
|
|
96
|
+
│ │ └── catalog.py
|
|
97
|
+
│ ├── schemas/
|
|
98
|
+
│ │ ├── __init__.py
|
|
99
|
+
│ │ └── tooling.py
|
|
100
|
+
│ ├── services/
|
|
101
|
+
│ │ ├── __init__.py
|
|
102
|
+
│ │ └── registry.py
|
|
103
|
+
│ ├── adapters/
|
|
104
|
+
│ │ ├── __init__.py
|
|
105
|
+
│ │ ├── agentic_chaos.py
|
|
106
|
+
│ │ └── agenticlens.py
|
|
107
|
+
│ └── tools/
|
|
108
|
+
│ ├── __init__.py
|
|
109
|
+
│ ├── registry.py
|
|
110
|
+
│ ├── chaos.py
|
|
111
|
+
│ ├── core.py
|
|
112
|
+
│ └── lens.py
|
|
113
|
+
└── tests/
|
|
114
|
+
├── test_imports.py
|
|
115
|
+
└── test_registry.py
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## MCP-Oriented Structure
|
|
119
|
+
|
|
120
|
+
This repository should have all of the standard layers we expect for a useful
|
|
121
|
+
MCP server:
|
|
122
|
+
|
|
123
|
+
- `tools/` for callable MCP tools and their registration metadata
|
|
124
|
+
- `resources/` for readable assets such as fault catalogs, templates, and
|
|
125
|
+
workflow examples
|
|
126
|
+
- `prompts/` for reusable prompt templates exposed through the server
|
|
127
|
+
- `schemas/` for typed request and response contracts
|
|
128
|
+
- `services/` for shared orchestration logic that keeps tool modules thin
|
|
129
|
+
- `adapters/` for integration boundaries to `agenticlens` and
|
|
130
|
+
`agentic-chaos`
|
|
131
|
+
|
|
132
|
+
The implementation is still early, but the file structure now reflects that
|
|
133
|
+
shape so we can add functionality without reshuffling the repo later.
|
|
134
|
+
|
|
135
|
+
## Packaging and Publishing Model
|
|
136
|
+
|
|
137
|
+
`deep-agentic-core-mcp` should publish in two layers:
|
|
138
|
+
|
|
139
|
+
1. Publish the Python package to PyPI.
|
|
140
|
+
2. Publish the MCP metadata in `server.json` to the official MCP Registry.
|
|
141
|
+
|
|
142
|
+
For PyPI-based verification, the `mcp-name` marker above must match the
|
|
143
|
+
`name` field in `server.json`.
|
|
144
|
+
|
|
145
|
+
## Near-Term Build Order
|
|
146
|
+
|
|
147
|
+
1. Lock the canonical namespace and package metadata.
|
|
148
|
+
2. Implement the stdio MCP server entrypoint.
|
|
149
|
+
3. Add a minimal `core.health` tool.
|
|
150
|
+
4. Add the first `agenticlens` and `agentic-chaos` adapter-backed tools.
|
|
151
|
+
5. Add examples and publishable packaging checks.
|
|
152
|
+
|
|
153
|
+
## Notes
|
|
154
|
+
|
|
155
|
+
This scaffold assumes the intended GitHub namespace is
|
|
156
|
+
`io.github.deepagentlabs/deep-agentic-core-mcp`. If the final publishing
|
|
157
|
+
account or org changes, update:
|
|
158
|
+
|
|
159
|
+
- the `mcp-name` marker in this README
|
|
160
|
+
- `server.json`
|
|
161
|
+
- any repository URLs in `pyproject.toml`
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Vision
|
|
4
|
+
|
|
5
|
+
Build one public MCP server for the DeepAgentLabs ecosystem that unifies:
|
|
6
|
+
|
|
7
|
+
- workflow observability from `agenticlens`
|
|
8
|
+
- resilience testing from `agentic-chaos`
|
|
9
|
+
|
|
10
|
+
The result should feel like a coherent platform surface rather than two loosely
|
|
11
|
+
connected products.
|
|
12
|
+
|
|
13
|
+
## Phase 0: Foundation
|
|
14
|
+
|
|
15
|
+
Status: current
|
|
16
|
+
|
|
17
|
+
Goals:
|
|
18
|
+
|
|
19
|
+
- define project identity and packaging
|
|
20
|
+
- define MCP registry metadata
|
|
21
|
+
- set the package and source tree structure
|
|
22
|
+
- identify the first tool contracts
|
|
23
|
+
|
|
24
|
+
Deliverables:
|
|
25
|
+
|
|
26
|
+
- `README.md`
|
|
27
|
+
- `ROADMAP.md`
|
|
28
|
+
- `pyproject.toml`
|
|
29
|
+
- `server.json`
|
|
30
|
+
- initial `src/` and `tests/` layout
|
|
31
|
+
|
|
32
|
+
## Phase 1: Minimal MCP Server
|
|
33
|
+
|
|
34
|
+
Goals:
|
|
35
|
+
|
|
36
|
+
- create a runnable stdio MCP server
|
|
37
|
+
- expose `core.health`
|
|
38
|
+
- expose `core.version`
|
|
39
|
+
- return stable JSON payloads
|
|
40
|
+
|
|
41
|
+
Success criteria:
|
|
42
|
+
|
|
43
|
+
- local start command works
|
|
44
|
+
- host can discover at least one tool
|
|
45
|
+
- smoke tests cover imports and server boot
|
|
46
|
+
|
|
47
|
+
## Phase 2: AgenticLens Integration
|
|
48
|
+
|
|
49
|
+
Goals:
|
|
50
|
+
|
|
51
|
+
- wire `agenticlens` into the MCP server through adapter functions
|
|
52
|
+
- expose a first analysis-oriented tool surface
|
|
53
|
+
- support reading workflow JSON artifacts
|
|
54
|
+
|
|
55
|
+
Possible tools:
|
|
56
|
+
|
|
57
|
+
- `lens.analyze_workflow`
|
|
58
|
+
- `lens.report_summary`
|
|
59
|
+
|
|
60
|
+
Success criteria:
|
|
61
|
+
|
|
62
|
+
- a saved workflow artifact can be analyzed through MCP
|
|
63
|
+
- recommendations are returned in a host-friendly schema
|
|
64
|
+
|
|
65
|
+
## Phase 3: Agentic Chaos Integration
|
|
66
|
+
|
|
67
|
+
Goals:
|
|
68
|
+
|
|
69
|
+
- wire `agentic-chaos` into the MCP server through adapter functions
|
|
70
|
+
- expose fault listing and experiment execution
|
|
71
|
+
- return structured experiment results
|
|
72
|
+
|
|
73
|
+
Possible tools:
|
|
74
|
+
|
|
75
|
+
- `chaos.list_faults`
|
|
76
|
+
- `chaos.run_experiment`
|
|
77
|
+
|
|
78
|
+
Success criteria:
|
|
79
|
+
|
|
80
|
+
- a target script or workflow can be exercised with selected faults
|
|
81
|
+
- results can be summarized alongside normal run output
|
|
82
|
+
|
|
83
|
+
## Phase 4: Unified Workflows
|
|
84
|
+
|
|
85
|
+
Goals:
|
|
86
|
+
|
|
87
|
+
- combine observability and chaos into joined workflows
|
|
88
|
+
- compare baseline and chaos runs
|
|
89
|
+
- expose reusable resources and prompts
|
|
90
|
+
|
|
91
|
+
Possible tools:
|
|
92
|
+
|
|
93
|
+
- `core.compare_runs`
|
|
94
|
+
- `core.export_report`
|
|
95
|
+
|
|
96
|
+
## Phase 5: Publishing and Adoption
|
|
97
|
+
|
|
98
|
+
Goals:
|
|
99
|
+
|
|
100
|
+
- verify PyPI packaging
|
|
101
|
+
- publish to PyPI
|
|
102
|
+
- authenticate with the MCP Registry
|
|
103
|
+
- publish `server.json`
|
|
104
|
+
- add CI for package build and registry publishing
|
|
105
|
+
|
|
106
|
+
## Open Questions
|
|
107
|
+
|
|
108
|
+
- Which MCP Python SDK will be the long-term foundation?
|
|
109
|
+
- Should the first release depend on local sibling checkouts or published PyPI
|
|
110
|
+
releases only?
|
|
111
|
+
- Should `deep-agentic-core-mcp` be a thin wrapper package or eventually own
|
|
112
|
+
workflow orchestration logic directly?
|
|
113
|
+
- Is stdio-only enough for v0, or do we want a remote deployment path early?
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
`deep-agentic-core-mcp` is intended to be a thin MCP server that orchestrates
|
|
6
|
+
existing DeepAgentLabs capabilities instead of re-implementing them.
|
|
7
|
+
|
|
8
|
+
The package is organized around six layers:
|
|
9
|
+
|
|
10
|
+
1. `server.py`
|
|
11
|
+
The MCP transport entrypoint and registration boundary.
|
|
12
|
+
2. `tools/`
|
|
13
|
+
Host-facing callable operations such as health checks, workflow analysis,
|
|
14
|
+
and chaos experiments.
|
|
15
|
+
3. `services/`
|
|
16
|
+
Shared application logic used by tools.
|
|
17
|
+
4. `schemas/`
|
|
18
|
+
Request and response models for consistent payloads.
|
|
19
|
+
5. `resources/`
|
|
20
|
+
Readable static or generated assets that clients may inspect.
|
|
21
|
+
6. `adapters/`
|
|
22
|
+
Bridges into sibling libraries like `agenticlens` and `agentic-chaos`.
|
|
23
|
+
|
|
24
|
+
## Why This Shape
|
|
25
|
+
|
|
26
|
+
- Keeps host-facing interfaces stable even if underlying integrations change.
|
|
27
|
+
- Prevents tool modules from becoming large orchestration files.
|
|
28
|
+
- Makes it easier to expose prompts and resources alongside tools.
|
|
29
|
+
- Gives us a clean place to add typed contracts before networked or remote use.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sample-agentic-workflow",
|
|
3
|
+
"description": "Placeholder workflow artifact for early MCP resource examples.",
|
|
4
|
+
"steps": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Planner",
|
|
7
|
+
"type": "planner"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "Retriever",
|
|
11
|
+
"type": "retriever"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Final Answer",
|
|
15
|
+
"type": "final_response"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "deep-agentic-core-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Unified MCP server for AgenticLens and Agentic Chaos workflows."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "DeepAgentLabs" }]
|
|
13
|
+
keywords = ["mcp", "agentic-ai", "observability", "chaos-engineering", "llm"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"mcp>=1.10.0",
|
|
26
|
+
"pydantic>=2.0,<3",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = [
|
|
31
|
+
"pytest>=8.0",
|
|
32
|
+
"pytest-asyncio>=0.23",
|
|
33
|
+
"pytest-cov>=5.0",
|
|
34
|
+
"ruff>=0.6",
|
|
35
|
+
"mypy>=1.10",
|
|
36
|
+
"build>=1.2",
|
|
37
|
+
"twine>=5.1",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
deep-agentic-core-mcp = "deep_agentic_core_mcp.server:main"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://github.com/DeepAgentLabs/deep-agentic-core-mcp"
|
|
45
|
+
Repository = "https://github.com/DeepAgentLabs/deep-agentic-core-mcp"
|
|
46
|
+
Issues = "https://github.com/DeepAgentLabs/deep-agentic-core-mcp/issues"
|
|
47
|
+
|
|
48
|
+
[tool.hatch.build.targets.wheel]
|
|
49
|
+
packages = ["src/deep_agentic_core_mcp"]
|
|
50
|
+
|
|
51
|
+
[tool.ruff]
|
|
52
|
+
line-length = 100
|
|
53
|
+
target-version = "py310"
|
|
54
|
+
src = ["src", "tests"]
|
|
55
|
+
|
|
56
|
+
[tool.ruff.lint]
|
|
57
|
+
select = ["E", "F", "I", "UP", "B", "SIM", "N"]
|
|
58
|
+
ignore = ["B008"]
|
|
59
|
+
|
|
60
|
+
[tool.ruff.lint.isort]
|
|
61
|
+
known-first-party = ["deep_agentic_core_mcp"]
|
|
62
|
+
|
|
63
|
+
[tool.ruff.format]
|
|
64
|
+
quote-style = "double"
|
|
65
|
+
|
|
66
|
+
[tool.mypy]
|
|
67
|
+
python_version = "3.10"
|
|
68
|
+
strict = true
|
|
69
|
+
packages = ["deep_agentic_core_mcp"]
|
|
70
|
+
mypy_path = "src"
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
testpaths = ["tests"]
|
|
74
|
+
pythonpath = ["src"]
|
|
75
|
+
addopts = "-ra"
|
|
76
|
+
asyncio_mode = "auto"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.deepagentlabs/deep-agentic-core-mcp",
|
|
4
|
+
"title": "Deep Agentic Core MCP",
|
|
5
|
+
"description": "Unified MCP server for AgenticLens and Agentic Chaos capabilities.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/DeepAgentLabs/deep-agentic-core-mcp",
|
|
9
|
+
"source": "github"
|
|
10
|
+
},
|
|
11
|
+
"packages": [
|
|
12
|
+
{
|
|
13
|
+
"registryType": "pypi",
|
|
14
|
+
"identifier": "deep-agentic-core-mcp",
|
|
15
|
+
"version": "0.1.0",
|
|
16
|
+
"transport": {
|
|
17
|
+
"type": "stdio"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Integration adapters for sibling DeepAgentLabs projects."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Prompt definitions exposed by the MCP server."""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Reusable prompt catalog placeholders."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def list_prompts() -> list[dict[str, str]]:
|
|
5
|
+
"""Return the initial prompt registry."""
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
"name": "lens.workflow_summary",
|
|
9
|
+
"description": "Summarize an analyzed workflow for a human operator.",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "chaos.experiment_brief",
|
|
13
|
+
"description": "Explain the intent and expected impact of a chaos run.",
|
|
14
|
+
},
|
|
15
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Resource catalogs exposed by the MCP server."""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Placeholder resource catalog."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def list_resources() -> list[dict[str, str]]:
|
|
5
|
+
"""Return the initial resource inventory."""
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
"uri": "resource://examples/sample_workflow",
|
|
9
|
+
"name": "Sample workflow artifact",
|
|
10
|
+
"kind": "workflow-json",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"uri": "resource://catalogs/chaos_faults",
|
|
14
|
+
"name": "Chaos fault catalog",
|
|
15
|
+
"kind": "reference",
|
|
16
|
+
},
|
|
17
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Typed contracts for MCP-facing operations."""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Core schema definitions for early tool contracts."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ToolDescriptor(BaseModel):
|
|
7
|
+
"""Basic metadata describing an MCP tool."""
|
|
8
|
+
|
|
9
|
+
name: str
|
|
10
|
+
title: str
|
|
11
|
+
description: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ResourceDescriptor(BaseModel):
|
|
15
|
+
"""Basic metadata describing an MCP resource."""
|
|
16
|
+
|
|
17
|
+
uri: str
|
|
18
|
+
name: str
|
|
19
|
+
kind: str = Field(description="Broad classification for the resource payload.")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PromptDescriptor(BaseModel):
|
|
23
|
+
"""Basic metadata describing an MCP prompt."""
|
|
24
|
+
|
|
25
|
+
name: str
|
|
26
|
+
description: str
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""MCP server entrypoint using the official MCP Python SDK (stdio transport)."""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import json
|
|
5
|
+
from collections.abc import Callable
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from mcp.server import Server
|
|
9
|
+
from mcp.server.stdio import stdio_server
|
|
10
|
+
from mcp.types import Resource, TextContent, Tool
|
|
11
|
+
from pydantic import AnyUrl
|
|
12
|
+
|
|
13
|
+
from deep_agentic_core_mcp.config import SERVER_NAME
|
|
14
|
+
from deep_agentic_core_mcp.resources.catalog import list_resources as _catalog_resources
|
|
15
|
+
from deep_agentic_core_mcp.tools.core import health, version
|
|
16
|
+
from deep_agentic_core_mcp.tools.registry import list_tools as _registry_tools
|
|
17
|
+
|
|
18
|
+
# ---------------------------------------------------------------------------
|
|
19
|
+
# Server instance
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
server = Server(SERVER_NAME)
|
|
23
|
+
|
|
24
|
+
# ---------------------------------------------------------------------------
|
|
25
|
+
# Tool dispatch
|
|
26
|
+
# ---------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
_TOOL_DISPATCH: dict[str, Callable[[], dict[str, str]]] = {
|
|
29
|
+
"core.health": health,
|
|
30
|
+
"core.version": version,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# ---------------------------------------------------------------------------
|
|
34
|
+
# Tool definitions (derived from the canonical registry)
|
|
35
|
+
# ---------------------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_tools() -> list[Tool]:
|
|
39
|
+
"""Build Tool objects from the central tool registry.
|
|
40
|
+
|
|
41
|
+
Only tools with a registered handler are advertised.
|
|
42
|
+
"""
|
|
43
|
+
return [
|
|
44
|
+
Tool(
|
|
45
|
+
name=entry["name"],
|
|
46
|
+
description=entry["description"],
|
|
47
|
+
inputSchema={"type": "object", "properties": {}, "additionalProperties": False},
|
|
48
|
+
)
|
|
49
|
+
for entry in _registry_tools()
|
|
50
|
+
if entry["name"] in _TOOL_DISPATCH
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _build_resources() -> list[Resource]:
|
|
55
|
+
"""Build Resource objects from the central resource catalog."""
|
|
56
|
+
return [
|
|
57
|
+
Resource(
|
|
58
|
+
uri=AnyUrl(entry["uri"]),
|
|
59
|
+
name=entry["name"],
|
|
60
|
+
mimeType="application/json",
|
|
61
|
+
)
|
|
62
|
+
for entry in _catalog_resources()
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
TOOLS: list[Tool] = _build_tools()
|
|
67
|
+
RESOURCES: list[Resource] = _build_resources()
|
|
68
|
+
|
|
69
|
+
# ---------------------------------------------------------------------------
|
|
70
|
+
# Handlers
|
|
71
|
+
# ---------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@server.list_tools() # type: ignore[no-untyped-call, untyped-decorator]
|
|
75
|
+
async def handle_list_tools() -> list[Tool]:
|
|
76
|
+
"""Advertise available tools."""
|
|
77
|
+
return TOOLS
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@server.call_tool() # type: ignore[untyped-decorator]
|
|
81
|
+
async def handle_call_tool(name: str, arguments: dict[str, Any] | None) -> list[TextContent]:
|
|
82
|
+
"""Dispatch tool calls and return JSON results."""
|
|
83
|
+
handler = _TOOL_DISPATCH.get(name)
|
|
84
|
+
if handler is None:
|
|
85
|
+
return [TextContent(type="text", text=json.dumps({"error": f"Unknown tool: {name}"}))]
|
|
86
|
+
result = handler()
|
|
87
|
+
return [TextContent(type="text", text=json.dumps(result))]
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@server.list_resources() # type: ignore[no-untyped-call, untyped-decorator]
|
|
91
|
+
async def handle_list_resources() -> list[Resource]:
|
|
92
|
+
"""Advertise available resources."""
|
|
93
|
+
return RESOURCES
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# ---------------------------------------------------------------------------
|
|
97
|
+
# Entrypoint
|
|
98
|
+
# ---------------------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
async def run_server() -> None:
|
|
102
|
+
"""Start the MCP server over stdio."""
|
|
103
|
+
async with stdio_server() as (read_stream, write_stream):
|
|
104
|
+
await server.run(
|
|
105
|
+
read_stream,
|
|
106
|
+
write_stream,
|
|
107
|
+
server.create_initialization_options(),
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def main() -> None:
|
|
112
|
+
"""Synchronous entrypoint for console_scripts."""
|
|
113
|
+
asyncio.run(run_server())
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if __name__ == "__main__":
|
|
117
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Shared orchestration services."""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Service helpers for server-side registries."""
|
|
2
|
+
|
|
3
|
+
from deep_agentic_core_mcp.prompts.registry import list_prompts
|
|
4
|
+
from deep_agentic_core_mcp.resources.catalog import list_resources
|
|
5
|
+
from deep_agentic_core_mcp.schemas.tooling import (
|
|
6
|
+
PromptDescriptor,
|
|
7
|
+
ResourceDescriptor,
|
|
8
|
+
ToolDescriptor,
|
|
9
|
+
)
|
|
10
|
+
from deep_agentic_core_mcp.tools.registry import list_tools
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def tool_descriptors() -> list[ToolDescriptor]:
|
|
14
|
+
"""Return typed tool metadata."""
|
|
15
|
+
return [ToolDescriptor(**tool) for tool in list_tools()]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def resource_descriptors() -> list[ResourceDescriptor]:
|
|
19
|
+
"""Return typed resource metadata."""
|
|
20
|
+
return [ResourceDescriptor(**resource) for resource in list_resources()]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def prompt_descriptors() -> list[PromptDescriptor]:
|
|
24
|
+
"""Return typed prompt metadata."""
|
|
25
|
+
return [PromptDescriptor(**prompt) for prompt in list_prompts()]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Tool group modules for the MCP server."""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Core server tool stubs."""
|
|
2
|
+
|
|
3
|
+
from deep_agentic_core_mcp.config import SERVER_NAME, VERSION
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def health() -> dict[str, str]:
|
|
7
|
+
"""Return a basic health payload."""
|
|
8
|
+
return {"status": "ok", "server": SERVER_NAME}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def version() -> dict[str, str]:
|
|
12
|
+
"""Return the current package version."""
|
|
13
|
+
return {"version": VERSION}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Central tool metadata registry."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def list_tools() -> list[dict[str, str]]:
|
|
5
|
+
"""Return the initial tool inventory for the server."""
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
"name": "core.health",
|
|
9
|
+
"title": "Health Check",
|
|
10
|
+
"description": "Return the basic health status of the MCP server.",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "core.version",
|
|
14
|
+
"title": "Server Version",
|
|
15
|
+
"description": "Return the current server package version.",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "lens.analyze_workflow",
|
|
19
|
+
"title": "Analyze Workflow",
|
|
20
|
+
"description": "Analyze an AgenticLens-compatible workflow artifact.",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "chaos.list_faults",
|
|
24
|
+
"title": "List Chaos Faults",
|
|
25
|
+
"description": "List the supported fault types for chaos experiments.",
|
|
26
|
+
},
|
|
27
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from deep_agentic_core_mcp.tools.chaos import capabilities as chaos_capabilities
|
|
2
|
+
from deep_agentic_core_mcp.tools.core import health, version
|
|
3
|
+
from deep_agentic_core_mcp.tools.lens import capabilities as lens_capabilities
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_health_payload() -> None:
|
|
7
|
+
payload = health()
|
|
8
|
+
assert payload["status"] == "ok"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_version_payload() -> None:
|
|
12
|
+
payload = version()
|
|
13
|
+
assert "version" in payload
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_capability_placeholders() -> None:
|
|
17
|
+
assert "chaos" in chaos_capabilities()
|
|
18
|
+
assert "lens" in lens_capabilities()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from deep_agentic_core_mcp.prompts.registry import list_prompts
|
|
2
|
+
from deep_agentic_core_mcp.resources.catalog import list_resources
|
|
3
|
+
from deep_agentic_core_mcp.services.registry import (
|
|
4
|
+
prompt_descriptors,
|
|
5
|
+
resource_descriptors,
|
|
6
|
+
tool_descriptors,
|
|
7
|
+
)
|
|
8
|
+
from deep_agentic_core_mcp.tools.registry import list_tools
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_tool_registry_has_core_health() -> None:
|
|
12
|
+
names = {tool["name"] for tool in list_tools()}
|
|
13
|
+
assert "core.health" in names
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_resource_registry_not_empty() -> None:
|
|
17
|
+
assert list_resources()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_prompt_registry_not_empty() -> None:
|
|
21
|
+
assert list_prompts()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_typed_descriptors_build() -> None:
|
|
25
|
+
assert tool_descriptors()
|
|
26
|
+
assert resource_descriptors()
|
|
27
|
+
assert prompt_descriptors()
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Smoke tests for MCP server boot and tool discovery."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
from deep_agentic_core_mcp.server import _TOOL_DISPATCH, TOOLS, server
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_server_has_name() -> None:
|
|
11
|
+
assert server.name == "io.github.deepagentlabs/deep-agentic-core-mcp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_tools_registered() -> None:
|
|
15
|
+
tool_names = {t.name for t in TOOLS}
|
|
16
|
+
assert "core.health" in tool_names
|
|
17
|
+
assert "core.version" in tool_names
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_tool_dispatch_covers_all_tools() -> None:
|
|
21
|
+
for tool in TOOLS:
|
|
22
|
+
assert tool.name in _TOOL_DISPATCH, f"No handler for {tool.name}"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@pytest.mark.asyncio
|
|
26
|
+
async def test_handle_list_tools() -> None:
|
|
27
|
+
from deep_agentic_core_mcp.server import handle_list_tools
|
|
28
|
+
|
|
29
|
+
tools = await handle_list_tools()
|
|
30
|
+
names = {t.name for t in tools}
|
|
31
|
+
assert "core.health" in names
|
|
32
|
+
assert "core.version" in names
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@pytest.mark.asyncio
|
|
36
|
+
async def test_handle_call_tool_health() -> None:
|
|
37
|
+
from deep_agentic_core_mcp.server import handle_call_tool
|
|
38
|
+
|
|
39
|
+
result = await handle_call_tool("core.health", {})
|
|
40
|
+
payload = json.loads(result[0].text)
|
|
41
|
+
assert payload["status"] == "ok"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.mark.asyncio
|
|
45
|
+
async def test_handle_call_tool_version() -> None:
|
|
46
|
+
from deep_agentic_core_mcp.server import handle_call_tool
|
|
47
|
+
|
|
48
|
+
result = await handle_call_tool("core.version", {})
|
|
49
|
+
payload = json.loads(result[0].text)
|
|
50
|
+
assert "version" in payload
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@pytest.mark.asyncio
|
|
54
|
+
async def test_handle_call_tool_unknown() -> None:
|
|
55
|
+
from deep_agentic_core_mcp.server import handle_call_tool
|
|
56
|
+
|
|
57
|
+
result = await handle_call_tool("nonexistent.tool", {})
|
|
58
|
+
payload = json.loads(result[0].text)
|
|
59
|
+
assert "error" in payload
|