mosaic-mcp 1.0.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.
- mosaic_mcp-1.0.0/.gitignore +201 -0
- mosaic_mcp-1.0.0/PKG-INFO +112 -0
- mosaic_mcp-1.0.0/README.md +84 -0
- mosaic_mcp-1.0.0/pyproject.toml +48 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/__init__.py +13 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/_compat.py +5 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/db/__init__.py +0 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/db/connection.py +290 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/db/queries.py +2213 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/responses.py +663 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/server.py +1543 -0
- mosaic_mcp-1.0.0/src/mosaic_mcp/users.py +528 -0
- mosaic_mcp-1.0.0/sync_from_monorepo.py +72 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# ============================================
|
|
2
|
+
# Strategic R&D Intelligence Platform
|
|
3
|
+
# .gitignore
|
|
4
|
+
# ============================================
|
|
5
|
+
|
|
6
|
+
# ============================================
|
|
7
|
+
# Python
|
|
8
|
+
# ============================================
|
|
9
|
+
__pycache__/
|
|
10
|
+
*.py[cod]
|
|
11
|
+
*$py.class
|
|
12
|
+
*.so
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# ============================================
|
|
33
|
+
# Virtual Environments
|
|
34
|
+
# ============================================
|
|
35
|
+
.env
|
|
36
|
+
.venv
|
|
37
|
+
env/
|
|
38
|
+
venv/
|
|
39
|
+
ENV/
|
|
40
|
+
env.bak/
|
|
41
|
+
venv.bak/
|
|
42
|
+
.python-version
|
|
43
|
+
Pipfile.lock
|
|
44
|
+
|
|
45
|
+
# ============================================
|
|
46
|
+
# Poetry
|
|
47
|
+
# ============================================
|
|
48
|
+
# poetry.lock is usually committed for applications
|
|
49
|
+
# Uncomment if you want to ignore it
|
|
50
|
+
# poetry.lock
|
|
51
|
+
|
|
52
|
+
# ============================================
|
|
53
|
+
# IDE / Editors
|
|
54
|
+
# ============================================
|
|
55
|
+
.idea/
|
|
56
|
+
.vscode/
|
|
57
|
+
*.swp
|
|
58
|
+
*.swo
|
|
59
|
+
*~
|
|
60
|
+
.project
|
|
61
|
+
.pydevproject
|
|
62
|
+
.settings/
|
|
63
|
+
*.sublime-workspace
|
|
64
|
+
*.sublime-project
|
|
65
|
+
|
|
66
|
+
# ============================================
|
|
67
|
+
# Jupyter Notebooks
|
|
68
|
+
# ============================================
|
|
69
|
+
.ipynb_checkpoints/
|
|
70
|
+
*.ipynb_checkpoints
|
|
71
|
+
profile_default/
|
|
72
|
+
ipython_config.py
|
|
73
|
+
|
|
74
|
+
# ============================================
|
|
75
|
+
# Testing
|
|
76
|
+
# ============================================
|
|
77
|
+
.pytest_cache/
|
|
78
|
+
.coverage
|
|
79
|
+
.coverage.*
|
|
80
|
+
htmlcov/
|
|
81
|
+
.tox/
|
|
82
|
+
.nox/
|
|
83
|
+
.hypothesis/
|
|
84
|
+
.benchmarks/
|
|
85
|
+
coverage.xml
|
|
86
|
+
*.cover
|
|
87
|
+
*.py,cover
|
|
88
|
+
.cache
|
|
89
|
+
nosetests.xml
|
|
90
|
+
|
|
91
|
+
# ============================================
|
|
92
|
+
# Type Checking
|
|
93
|
+
# ============================================
|
|
94
|
+
.mypy_cache/
|
|
95
|
+
.dmypy.json
|
|
96
|
+
dmypy.json
|
|
97
|
+
.pytype/
|
|
98
|
+
.pyre/
|
|
99
|
+
|
|
100
|
+
# ============================================
|
|
101
|
+
# Documentation
|
|
102
|
+
# ============================================
|
|
103
|
+
docs/_build/
|
|
104
|
+
site/
|
|
105
|
+
|
|
106
|
+
# ============================================
|
|
107
|
+
# Environment Variables & Secrets
|
|
108
|
+
# ============================================
|
|
109
|
+
.env
|
|
110
|
+
.env.local
|
|
111
|
+
.env.*.local
|
|
112
|
+
*.env
|
|
113
|
+
!.env.example
|
|
114
|
+
secrets/
|
|
115
|
+
*.pem
|
|
116
|
+
*.key
|
|
117
|
+
credentials.json
|
|
118
|
+
**/gcp-service-account.json
|
|
119
|
+
|
|
120
|
+
# ============================================
|
|
121
|
+
# Database
|
|
122
|
+
# ============================================
|
|
123
|
+
*.db
|
|
124
|
+
*.sqlite
|
|
125
|
+
*.sqlite3
|
|
126
|
+
*.duckdb
|
|
127
|
+
|
|
128
|
+
# ============================================
|
|
129
|
+
# Data Files (Large files should not be in git)
|
|
130
|
+
# ============================================
|
|
131
|
+
data/raw/
|
|
132
|
+
data/processed/
|
|
133
|
+
data/external/
|
|
134
|
+
*.parquet
|
|
135
|
+
*.csv
|
|
136
|
+
!config/**/*.csv
|
|
137
|
+
!src/resolution/dictionaries/*.csv
|
|
138
|
+
!data/targets/*.csv
|
|
139
|
+
*.json
|
|
140
|
+
|
|
141
|
+
!config/**/*.json
|
|
142
|
+
*.pkl
|
|
143
|
+
*.pickle
|
|
144
|
+
*.h5
|
|
145
|
+
*.hdf5
|
|
146
|
+
|
|
147
|
+
# ============================================
|
|
148
|
+
# Logs
|
|
149
|
+
# ============================================
|
|
150
|
+
logs/
|
|
151
|
+
*.log
|
|
152
|
+
|
|
153
|
+
# ============================================
|
|
154
|
+
# Docker
|
|
155
|
+
# ============================================
|
|
156
|
+
docker-compose.override.yml
|
|
157
|
+
|
|
158
|
+
# ============================================
|
|
159
|
+
# OS Generated
|
|
160
|
+
# ============================================
|
|
161
|
+
.DS_Store
|
|
162
|
+
.DS_Store?
|
|
163
|
+
._*
|
|
164
|
+
.Spotlight-V100
|
|
165
|
+
.Trashes
|
|
166
|
+
ehthumbs.db
|
|
167
|
+
Thumbs.db
|
|
168
|
+
desktop.ini
|
|
169
|
+
|
|
170
|
+
# ============================================
|
|
171
|
+
# Temporary Files
|
|
172
|
+
# ============================================
|
|
173
|
+
tmp/
|
|
174
|
+
temp/
|
|
175
|
+
*.tmp
|
|
176
|
+
*.temp
|
|
177
|
+
*.bak
|
|
178
|
+
|
|
179
|
+
# ============================================
|
|
180
|
+
# Dagster
|
|
181
|
+
# ============================================
|
|
182
|
+
.dagster/
|
|
183
|
+
dagster_home/
|
|
184
|
+
.dagster_run/
|
|
185
|
+
/storage/
|
|
186
|
+
|
|
187
|
+
# ============================================
|
|
188
|
+
# Model Files (Too large for git)
|
|
189
|
+
# ============================================
|
|
190
|
+
/models/
|
|
191
|
+
*.bin
|
|
192
|
+
*.pt
|
|
193
|
+
*.pth
|
|
194
|
+
*.onnx
|
|
195
|
+
*.safetensors
|
|
196
|
+
|
|
197
|
+
# ============================================
|
|
198
|
+
# Build Artifacts
|
|
199
|
+
# ============================================
|
|
200
|
+
*.manifest
|
|
201
|
+
*.spec
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mosaic-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Pre-clinical drug discovery intelligence — 28 MCP tools for targets, compounds, patents, clinical trials, and competitive landscapes
|
|
5
|
+
Project-URL: Homepage, https://mosaic.bio
|
|
6
|
+
Project-URL: Repository, https://github.com/mosaic-bio/mosaic
|
|
7
|
+
Project-URL: Documentation, https://mosaic.bio/docs
|
|
8
|
+
Author-email: Mosaic Bio <hello@mosaic.bio>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
Keywords: clinical-trials,compounds,drug-discovery,knowledge-graph,mcp,pharma,preclinical,targets
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Healthcare Industry
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: httpx>=0.27
|
|
23
|
+
Requires-Dist: mcp[cli]>=1.0
|
|
24
|
+
Requires-Dist: psycopg[binary]>=3.1
|
|
25
|
+
Requires-Dist: pydantic>=2.5
|
|
26
|
+
Requires-Dist: python-dotenv>=1.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# mosaic-mcp
|
|
30
|
+
|
|
31
|
+
Pre-clinical drug discovery intelligence as an MCP server. Query 300+ drug targets, 10K+ compounds, 35K+ papers, 18K+ clinical trials, and 12K+ patents through 28 specialized tools.
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install mosaic-mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### With Claude Desktop
|
|
40
|
+
|
|
41
|
+
Add to your `claude_desktop_config.json`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"mosaic": {
|
|
47
|
+
"command": "mosaic-mcp",
|
|
48
|
+
"env": {
|
|
49
|
+
"DATABASE_URL": "postgresql://reader:password@ep-xxx-pooler.neon.tech/mosaic_db?sslmode=require"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Claude Code
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
claude mcp add mosaic -- mosaic-mcp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Standalone
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export DATABASE_URL="postgresql://..."
|
|
66
|
+
export MOSAIC_API_KEY="msk_..." # Optional — for Pro tools
|
|
67
|
+
mosaic-mcp # stdio transport (default)
|
|
68
|
+
mosaic-mcp --transport sse --port 3001 # SSE for remote clients
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Tools
|
|
72
|
+
|
|
73
|
+
### Free Tier (8 tools)
|
|
74
|
+
|
|
75
|
+
| Tool | Description |
|
|
76
|
+
|------|-------------|
|
|
77
|
+
| `mosaic_search_targets` | Search drug targets by name, gene symbol, or keyword |
|
|
78
|
+
| `mosaic_get_target_profile` | Comprehensive target dossier (biology, compounds, scores) |
|
|
79
|
+
| `mosaic_get_target_compounds` | Compounds tested against a target with SAR data |
|
|
80
|
+
| `mosaic_get_target_patents` | Patent landscape for a target |
|
|
81
|
+
| `mosaic_get_target_papers` | Literature for a target |
|
|
82
|
+
| `mosaic_kg_stats` | Knowledge graph overview statistics |
|
|
83
|
+
| `mosaic_list_indications` | Available disease indications |
|
|
84
|
+
| `mosaic_target_scores` | Target attractiveness scoring |
|
|
85
|
+
|
|
86
|
+
### Pro Tier (20 additional tools)
|
|
87
|
+
|
|
88
|
+
Competitive landscape, pathway context, compound selectivity, indication landscape, target validation, clinical pipeline, compound analogs, target comparison, opportunity finding, organization portfolio, target network, mechanism of action, evidence maps, relation search, polypharmacology, clinical trial results, FDA regulatory status, drug comparison, drug repurposing candidates, and KOL discovery.
|
|
89
|
+
|
|
90
|
+
## Data Coverage
|
|
91
|
+
|
|
92
|
+
| Entity | Count |
|
|
93
|
+
|--------|-------|
|
|
94
|
+
| Drug Targets | 347 (oncology + neuroscience + cardiovascular) |
|
|
95
|
+
| Compounds | 10,831 |
|
|
96
|
+
| Clinical Trials | 18,324 |
|
|
97
|
+
| Papers | 35,430 |
|
|
98
|
+
| Patents | 12,603 |
|
|
99
|
+
| Indications | 15,013 |
|
|
100
|
+
| Organizations | 45,496 |
|
|
101
|
+
|
|
102
|
+
## Configuration
|
|
103
|
+
|
|
104
|
+
| Variable | Required | Description |
|
|
105
|
+
|----------|----------|-------------|
|
|
106
|
+
| `DATABASE_URL` | Yes | PostgreSQL connection string (Neon hosted or self-hosted) |
|
|
107
|
+
| `MOSAIC_API_KEY` | No | API key for Pro tool access |
|
|
108
|
+
| `MOSAIC_TIER` | No | Override tier (`free`, `pro`, `enterprise`) |
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
Apache 2.0 for the MCP server tools. The hosted knowledge graph data requires a subscription for Pro-tier access.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# mosaic-mcp
|
|
2
|
+
|
|
3
|
+
Pre-clinical drug discovery intelligence as an MCP server. Query 300+ drug targets, 10K+ compounds, 35K+ papers, 18K+ clinical trials, and 12K+ patents through 28 specialized tools.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install mosaic-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### With Claude Desktop
|
|
12
|
+
|
|
13
|
+
Add to your `claude_desktop_config.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"mosaic": {
|
|
19
|
+
"command": "mosaic-mcp",
|
|
20
|
+
"env": {
|
|
21
|
+
"DATABASE_URL": "postgresql://reader:password@ep-xxx-pooler.neon.tech/mosaic_db?sslmode=require"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### With Claude Code
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
claude mcp add mosaic -- mosaic-mcp
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Standalone
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
export DATABASE_URL="postgresql://..."
|
|
38
|
+
export MOSAIC_API_KEY="msk_..." # Optional — for Pro tools
|
|
39
|
+
mosaic-mcp # stdio transport (default)
|
|
40
|
+
mosaic-mcp --transport sse --port 3001 # SSE for remote clients
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Tools
|
|
44
|
+
|
|
45
|
+
### Free Tier (8 tools)
|
|
46
|
+
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
|------|-------------|
|
|
49
|
+
| `mosaic_search_targets` | Search drug targets by name, gene symbol, or keyword |
|
|
50
|
+
| `mosaic_get_target_profile` | Comprehensive target dossier (biology, compounds, scores) |
|
|
51
|
+
| `mosaic_get_target_compounds` | Compounds tested against a target with SAR data |
|
|
52
|
+
| `mosaic_get_target_patents` | Patent landscape for a target |
|
|
53
|
+
| `mosaic_get_target_papers` | Literature for a target |
|
|
54
|
+
| `mosaic_kg_stats` | Knowledge graph overview statistics |
|
|
55
|
+
| `mosaic_list_indications` | Available disease indications |
|
|
56
|
+
| `mosaic_target_scores` | Target attractiveness scoring |
|
|
57
|
+
|
|
58
|
+
### Pro Tier (20 additional tools)
|
|
59
|
+
|
|
60
|
+
Competitive landscape, pathway context, compound selectivity, indication landscape, target validation, clinical pipeline, compound analogs, target comparison, opportunity finding, organization portfolio, target network, mechanism of action, evidence maps, relation search, polypharmacology, clinical trial results, FDA regulatory status, drug comparison, drug repurposing candidates, and KOL discovery.
|
|
61
|
+
|
|
62
|
+
## Data Coverage
|
|
63
|
+
|
|
64
|
+
| Entity | Count |
|
|
65
|
+
|--------|-------|
|
|
66
|
+
| Drug Targets | 347 (oncology + neuroscience + cardiovascular) |
|
|
67
|
+
| Compounds | 10,831 |
|
|
68
|
+
| Clinical Trials | 18,324 |
|
|
69
|
+
| Papers | 35,430 |
|
|
70
|
+
| Patents | 12,603 |
|
|
71
|
+
| Indications | 15,013 |
|
|
72
|
+
| Organizations | 45,496 |
|
|
73
|
+
|
|
74
|
+
## Configuration
|
|
75
|
+
|
|
76
|
+
| Variable | Required | Description |
|
|
77
|
+
|----------|----------|-------------|
|
|
78
|
+
| `DATABASE_URL` | Yes | PostgreSQL connection string (Neon hosted or self-hosted) |
|
|
79
|
+
| `MOSAIC_API_KEY` | No | API key for Pro tool access |
|
|
80
|
+
| `MOSAIC_TIER` | No | Override tier (`free`, `pro`, `enterprise`) |
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
Apache 2.0 for the MCP server tools. The hosted knowledge graph data requires a subscription for Pro-tier access.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mosaic-mcp"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Pre-clinical drug discovery intelligence — 28 MCP tools for targets, compounds, patents, clinical trials, and competitive landscapes"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Mosaic Bio", email = "hello@mosaic.bio" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"mcp", "drug-discovery", "knowledge-graph", "pharma",
|
|
17
|
+
"preclinical", "targets", "compounds", "clinical-trials",
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 4 - Beta",
|
|
21
|
+
"Intended Audience :: Science/Research",
|
|
22
|
+
"Intended Audience :: Healthcare Industry",
|
|
23
|
+
"License :: OSI Approved :: Apache Software License",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"mcp[cli]>=1.0",
|
|
33
|
+
"psycopg[binary]>=3.1",
|
|
34
|
+
"pydantic>=2.5",
|
|
35
|
+
"httpx>=0.27",
|
|
36
|
+
"python-dotenv>=1.0",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://mosaic.bio"
|
|
41
|
+
Repository = "https://github.com/mosaic-bio/mosaic"
|
|
42
|
+
Documentation = "https://mosaic.bio/docs"
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
mosaic-mcp = "mosaic_mcp.server:main"
|
|
46
|
+
|
|
47
|
+
[tool.hatch.build.targets.wheel]
|
|
48
|
+
packages = ["src/mosaic_mcp"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Mosaic MCP — Pre-clinical drug discovery intelligence server.
|
|
2
|
+
|
|
3
|
+
28 MCP tools for targets, compounds, patents, clinical trials,
|
|
4
|
+
competitive landscapes, and more. Powered by a PostgreSQL knowledge graph.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
pip install mosaic-mcp
|
|
8
|
+
export DATABASE_URL="postgresql://..."
|
|
9
|
+
mosaic-mcp # starts stdio MCP server
|
|
10
|
+
mosaic-mcp --transport sse --port 3001 # SSE for remote clients
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
__version__ = "1.0.0"
|
|
File without changes
|