solograph 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.
- solograph-0.1.0/.gitignore +8 -0
- solograph-0.1.0/PKG-INFO +144 -0
- solograph-0.1.0/README.md +115 -0
- solograph-0.1.0/pyproject.toml +51 -0
- solograph-0.1.0/src/codegraph_mcp/__init__.py +3 -0
- solograph-0.1.0/src/codegraph_mcp/__main__.py +4 -0
- solograph-0.1.0/src/codegraph_mcp/cli.py +772 -0
- solograph-0.1.0/src/codegraph_mcp/db.py +72 -0
- solograph-0.1.0/src/codegraph_mcp/kb.py +335 -0
- solograph-0.1.0/src/codegraph_mcp/models.py +130 -0
- solograph-0.1.0/src/codegraph_mcp/output/__init__.py +1 -0
- solograph-0.1.0/src/codegraph_mcp/output/console.py +169 -0
- solograph-0.1.0/src/codegraph_mcp/output/explain.py +168 -0
- solograph-0.1.0/src/codegraph_mcp/output/mermaid.py +162 -0
- solograph-0.1.0/src/codegraph_mcp/query/__init__.py +1 -0
- solograph-0.1.0/src/codegraph_mcp/query/search.py +231 -0
- solograph-0.1.0/src/codegraph_mcp/registry.py +383 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/__init__.py +1 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/code.py +486 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/deps.py +173 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/git.py +80 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/registry.py +42 -0
- solograph-0.1.0/src/codegraph_mcp/scanner/sessions.py +367 -0
- solograph-0.1.0/src/codegraph_mcp/server.py +437 -0
- solograph-0.1.0/src/codegraph_mcp/vectors/__init__.py +1 -0
- solograph-0.1.0/src/codegraph_mcp/vectors/common.py +119 -0
- solograph-0.1.0/src/codegraph_mcp/vectors/project_graph_index.py +443 -0
- solograph-0.1.0/src/codegraph_mcp/vectors/session_index.py +126 -0
- solograph-0.1.0/uv.lock +2095 -0
solograph-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: solograph
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Code intelligence MCP server — multi-project code graph, semantic search, session history, knowledge base, web search
|
|
5
|
+
Author: Rustam Salavatov
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: claude-code,code-intelligence,codegraph,mcp,semantic-search,solograph
|
|
8
|
+
Requires-Python: <3.14,>=3.13
|
|
9
|
+
Requires-Dist: click>=8.1
|
|
10
|
+
Requires-Dist: falkordblite>=0.4
|
|
11
|
+
Requires-Dist: httpx>=0.28.1
|
|
12
|
+
Requires-Dist: mcp>=1.26.0
|
|
13
|
+
Requires-Dist: pydantic>=2.12.5
|
|
14
|
+
Requires-Dist: python-frontmatter>=1.1.0
|
|
15
|
+
Requires-Dist: pyyaml>=6.0
|
|
16
|
+
Requires-Dist: rich>=13.0.0
|
|
17
|
+
Requires-Dist: semantic-text-splitter>=0.29.0
|
|
18
|
+
Requires-Dist: sentence-transformers>=5.2.2
|
|
19
|
+
Requires-Dist: tree-sitter-kotlin>=1.0
|
|
20
|
+
Requires-Dist: tree-sitter-python>=0.23
|
|
21
|
+
Requires-Dist: tree-sitter-swift>=0.0.1
|
|
22
|
+
Requires-Dist: tree-sitter-typescript>=0.23
|
|
23
|
+
Requires-Dist: tree-sitter>=0.24
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pre-commit>=4.5.1; extra == 'dev'
|
|
26
|
+
Provides-Extra: mlx
|
|
27
|
+
Requires-Dist: mlx-embeddings>=0.0.3; extra == 'mlx'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# solograph
|
|
31
|
+
|
|
32
|
+
Code intelligence MCP server for Claude Code. Multi-project code graph, semantic search, session history, knowledge base, web search.
|
|
33
|
+
|
|
34
|
+
> PyPI: `pip install solograph` / `uvx solograph`
|
|
35
|
+
|
|
36
|
+
All vector search powered by **FalkorDB** (embedded, no Docker). No ChromaDB dependency.
|
|
37
|
+
|
|
38
|
+
## Embeddings
|
|
39
|
+
|
|
40
|
+
Two backends, both produce **384-dimensional** vectors:
|
|
41
|
+
|
|
42
|
+
| Backend | Model | Platform | Languages |
|
|
43
|
+
|---------|-------|----------|-----------|
|
|
44
|
+
| **MLX** (primary) | `multilingual-e5-small-mlx` | Apple Silicon | RU + EN |
|
|
45
|
+
| **sentence-transformers** (fallback) | `all-MiniLM-L6-v2` | Any | EN |
|
|
46
|
+
|
|
47
|
+
Auto-detects Apple Silicon → uses MLX. Falls back to sentence-transformers on other platforms.
|
|
48
|
+
|
|
49
|
+
Install MLX support (optional):
|
|
50
|
+
```bash
|
|
51
|
+
uv add solograph[mlx]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uv add solograph
|
|
58
|
+
# or
|
|
59
|
+
pip install solograph
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
### MCP Server (for Claude Code)
|
|
65
|
+
|
|
66
|
+
Add to `.mcp.json`:
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"codegraph": {
|
|
71
|
+
"command": "uvx",
|
|
72
|
+
"args": ["solograph"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### CLI
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
codegraph scan # Build code graph
|
|
82
|
+
codegraph stats # Graph statistics
|
|
83
|
+
codegraph explain my-app # Architecture overview
|
|
84
|
+
codegraph query "MATCH ..." # Raw Cypher
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Configuration
|
|
88
|
+
|
|
89
|
+
Environment variables:
|
|
90
|
+
|
|
91
|
+
| Variable | Default | Description |
|
|
92
|
+
|----------|---------|-------------|
|
|
93
|
+
| `CODEGRAPH_DB_PATH` | `~/.codegraph/codegraph.db` | FalkorDB code graph path |
|
|
94
|
+
| `CODEGRAPH_REGISTRY` | auto-detect | registry.yaml path |
|
|
95
|
+
| `KB_PATH` | (none) | Knowledge base root (markdown files with YAML frontmatter) |
|
|
96
|
+
| `TAVILY_API_URL` | `http://localhost:8013` | Tavily-compatible search URL |
|
|
97
|
+
| `TAVILY_API_KEY` | (none) | API key for Tavily |
|
|
98
|
+
|
|
99
|
+
## 11 MCP Tools
|
|
100
|
+
|
|
101
|
+
- `codegraph_query` — Cypher queries against code graph
|
|
102
|
+
- `codegraph_stats` — graph statistics (projects, files, symbols, packages)
|
|
103
|
+
- `codegraph_explain` — architecture overview of a project
|
|
104
|
+
- `codegraph_shared` — packages shared across projects
|
|
105
|
+
- `project_code_search` — semantic code search (auto-indexes on first call)
|
|
106
|
+
- `project_code_reindex` — reindex project code into FalkorDB vectors
|
|
107
|
+
- `session_search` — Claude Code session history search
|
|
108
|
+
- `project_info` — project registry info
|
|
109
|
+
- `kb_search` — knowledge base semantic search
|
|
110
|
+
- `web_search` — web search (Tavily/SearXNG)
|
|
111
|
+
|
|
112
|
+
## Web Search
|
|
113
|
+
|
|
114
|
+
The `web_search` tool connects to any **Tavily-compatible API**. Works great with self-hosted [SearXNG + Tavily Adapter](https://github.com/fortunto2/searxng-docker-tavily-adapter) — private, no API keys, smart engine routing.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Self-hosted (Docker, 1 minute setup)
|
|
118
|
+
git clone https://github.com/fortunto2/searxng-docker-tavily-adapter.git
|
|
119
|
+
cd searxng-docker-tavily-adapter
|
|
120
|
+
cp config.example.yaml config.yaml
|
|
121
|
+
docker compose up -d
|
|
122
|
+
# → http://localhost:8013/search (Tavily API)
|
|
123
|
+
# → http://localhost:8999 (SearXNG UI)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Or use [Tavily API](https://tavily.com) directly — set `TAVILY_API_URL=https://api.tavily.com` and `TAVILY_API_KEY`.
|
|
127
|
+
|
|
128
|
+
Smart engine routing auto-selects search engines by query type:
|
|
129
|
+
- **tech**: github, stackoverflow (keywords: python, react, code)
|
|
130
|
+
- **academic**: arxiv, google scholar (keywords: research, paper)
|
|
131
|
+
- **product**: brave, reddit, app stores (keywords: app, competitor, pricing)
|
|
132
|
+
- **news**: google news (keywords: news, latest, trend)
|
|
133
|
+
- **general**: google, duckduckgo, brave (default)
|
|
134
|
+
|
|
135
|
+
## Storage
|
|
136
|
+
|
|
137
|
+
- **Code graph:** `~/.codegraph/codegraph.db` (FalkorDB)
|
|
138
|
+
- **Session vectors:** `~/.codegraph/sessions_vectors/graph.db` (FalkorDB)
|
|
139
|
+
- **KB vectors:** `{KB_PATH}/.codegraph/kb/graph.db` (FalkorDB)
|
|
140
|
+
- **Project vectors:** `{project_path}/.codegraph/falkordb/graph.db` (per-project FalkorDB)
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
MIT
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# solograph
|
|
2
|
+
|
|
3
|
+
Code intelligence MCP server for Claude Code. Multi-project code graph, semantic search, session history, knowledge base, web search.
|
|
4
|
+
|
|
5
|
+
> PyPI: `pip install solograph` / `uvx solograph`
|
|
6
|
+
|
|
7
|
+
All vector search powered by **FalkorDB** (embedded, no Docker). No ChromaDB dependency.
|
|
8
|
+
|
|
9
|
+
## Embeddings
|
|
10
|
+
|
|
11
|
+
Two backends, both produce **384-dimensional** vectors:
|
|
12
|
+
|
|
13
|
+
| Backend | Model | Platform | Languages |
|
|
14
|
+
|---------|-------|----------|-----------|
|
|
15
|
+
| **MLX** (primary) | `multilingual-e5-small-mlx` | Apple Silicon | RU + EN |
|
|
16
|
+
| **sentence-transformers** (fallback) | `all-MiniLM-L6-v2` | Any | EN |
|
|
17
|
+
|
|
18
|
+
Auto-detects Apple Silicon → uses MLX. Falls back to sentence-transformers on other platforms.
|
|
19
|
+
|
|
20
|
+
Install MLX support (optional):
|
|
21
|
+
```bash
|
|
22
|
+
uv add solograph[mlx]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv add solograph
|
|
29
|
+
# or
|
|
30
|
+
pip install solograph
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
### MCP Server (for Claude Code)
|
|
36
|
+
|
|
37
|
+
Add to `.mcp.json`:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"codegraph": {
|
|
42
|
+
"command": "uvx",
|
|
43
|
+
"args": ["solograph"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### CLI
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
codegraph scan # Build code graph
|
|
53
|
+
codegraph stats # Graph statistics
|
|
54
|
+
codegraph explain my-app # Architecture overview
|
|
55
|
+
codegraph query "MATCH ..." # Raw Cypher
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
Environment variables:
|
|
61
|
+
|
|
62
|
+
| Variable | Default | Description |
|
|
63
|
+
|----------|---------|-------------|
|
|
64
|
+
| `CODEGRAPH_DB_PATH` | `~/.codegraph/codegraph.db` | FalkorDB code graph path |
|
|
65
|
+
| `CODEGRAPH_REGISTRY` | auto-detect | registry.yaml path |
|
|
66
|
+
| `KB_PATH` | (none) | Knowledge base root (markdown files with YAML frontmatter) |
|
|
67
|
+
| `TAVILY_API_URL` | `http://localhost:8013` | Tavily-compatible search URL |
|
|
68
|
+
| `TAVILY_API_KEY` | (none) | API key for Tavily |
|
|
69
|
+
|
|
70
|
+
## 11 MCP Tools
|
|
71
|
+
|
|
72
|
+
- `codegraph_query` — Cypher queries against code graph
|
|
73
|
+
- `codegraph_stats` — graph statistics (projects, files, symbols, packages)
|
|
74
|
+
- `codegraph_explain` — architecture overview of a project
|
|
75
|
+
- `codegraph_shared` — packages shared across projects
|
|
76
|
+
- `project_code_search` — semantic code search (auto-indexes on first call)
|
|
77
|
+
- `project_code_reindex` — reindex project code into FalkorDB vectors
|
|
78
|
+
- `session_search` — Claude Code session history search
|
|
79
|
+
- `project_info` — project registry info
|
|
80
|
+
- `kb_search` — knowledge base semantic search
|
|
81
|
+
- `web_search` — web search (Tavily/SearXNG)
|
|
82
|
+
|
|
83
|
+
## Web Search
|
|
84
|
+
|
|
85
|
+
The `web_search` tool connects to any **Tavily-compatible API**. Works great with self-hosted [SearXNG + Tavily Adapter](https://github.com/fortunto2/searxng-docker-tavily-adapter) — private, no API keys, smart engine routing.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Self-hosted (Docker, 1 minute setup)
|
|
89
|
+
git clone https://github.com/fortunto2/searxng-docker-tavily-adapter.git
|
|
90
|
+
cd searxng-docker-tavily-adapter
|
|
91
|
+
cp config.example.yaml config.yaml
|
|
92
|
+
docker compose up -d
|
|
93
|
+
# → http://localhost:8013/search (Tavily API)
|
|
94
|
+
# → http://localhost:8999 (SearXNG UI)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Or use [Tavily API](https://tavily.com) directly — set `TAVILY_API_URL=https://api.tavily.com` and `TAVILY_API_KEY`.
|
|
98
|
+
|
|
99
|
+
Smart engine routing auto-selects search engines by query type:
|
|
100
|
+
- **tech**: github, stackoverflow (keywords: python, react, code)
|
|
101
|
+
- **academic**: arxiv, google scholar (keywords: research, paper)
|
|
102
|
+
- **product**: brave, reddit, app stores (keywords: app, competitor, pricing)
|
|
103
|
+
- **news**: google news (keywords: news, latest, trend)
|
|
104
|
+
- **general**: google, duckduckgo, brave (default)
|
|
105
|
+
|
|
106
|
+
## Storage
|
|
107
|
+
|
|
108
|
+
- **Code graph:** `~/.codegraph/codegraph.db` (FalkorDB)
|
|
109
|
+
- **Session vectors:** `~/.codegraph/sessions_vectors/graph.db` (FalkorDB)
|
|
110
|
+
- **KB vectors:** `{KB_PATH}/.codegraph/kb/graph.db` (FalkorDB)
|
|
111
|
+
- **Project vectors:** `{project_path}/.codegraph/falkordb/graph.db` (per-project FalkorDB)
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "solograph"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Code intelligence MCP server — multi-project code graph, semantic search, session history, knowledge base, web search"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13,<3.14"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Rustam Salavatov" },
|
|
10
|
+
]
|
|
11
|
+
keywords = ["mcp", "code-intelligence", "codegraph", "semantic-search", "claude-code", "solograph"]
|
|
12
|
+
|
|
13
|
+
dependencies = [
|
|
14
|
+
# Graph Database + Vector Search
|
|
15
|
+
"falkordblite>=0.4",
|
|
16
|
+
# Embeddings
|
|
17
|
+
"sentence-transformers>=5.2.2",
|
|
18
|
+
"semantic-text-splitter>=0.29.0",
|
|
19
|
+
# Code Analysis
|
|
20
|
+
"tree-sitter>=0.24",
|
|
21
|
+
"tree-sitter-python>=0.23",
|
|
22
|
+
"tree-sitter-swift>=0.0.1",
|
|
23
|
+
"tree-sitter-typescript>=0.23",
|
|
24
|
+
"tree-sitter-kotlin>=1.0",
|
|
25
|
+
# Schema & Config
|
|
26
|
+
"pydantic>=2.12.5",
|
|
27
|
+
"pyyaml>=6.0",
|
|
28
|
+
"python-frontmatter>=1.1.0",
|
|
29
|
+
# CLI & Output
|
|
30
|
+
"click>=8.1",
|
|
31
|
+
"rich>=13.0.0",
|
|
32
|
+
# MCP
|
|
33
|
+
"mcp>=1.26.0",
|
|
34
|
+
# HTTP (web search)
|
|
35
|
+
"httpx>=0.28.1",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
mlx = ["mlx-embeddings>=0.0.3"]
|
|
40
|
+
dev = ["pre-commit>=4.5.1"]
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
codegraph = "codegraph_mcp.cli:cli"
|
|
44
|
+
solograph = "codegraph_mcp.server:main"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["hatchling"]
|
|
48
|
+
build-backend = "hatchling.build"
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
packages = ["src/codegraph_mcp"]
|