ckg-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.
@@ -0,0 +1,6 @@
1
+ *.pyc
2
+ __pycache__/
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .env
ckg_mcp-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: ckg-mcp
3
+ Version: 0.1.0
4
+ Summary: Compact Knowledge Graph MCP server — 42× more efficient than RAG on structural queries
5
+ Project-URL: Homepage, https://graphifymd.com
6
+ Project-URL: Repository, https://github.com/Yarmoluk/ckg-mcp
7
+ Project-URL: Paper, https://graphifymd.com/paper.html
8
+ Author-email: Daniel Yarmoluk <daniel.yarmoluk@gmail.com>
9
+ License: MIT
10
+ Keywords: ai,knowledge-graph,llm,mcp,rag
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: mcp>=1.0.0
19
+ Description-Content-Type: text/markdown
20
+
21
+ # ckg-mcp
22
+
23
+ **Compact Knowledge Graph MCP server.** Pre-structured domain knowledge as a routing layer for agent stacks — 42× more efficient than RAG on structural queries.
24
+
25
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
26
+ [![Python 3.10+](https://img.shields.io/badge/Python-3.10+-green.svg)]()
27
+ [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-purple.svg)]()
28
+
29
+ > Built on the [CKG Benchmark](https://github.com/Yarmoluk/ckg-benchmark) — 45 domains, 7,928 queries, fully reproducible results.
30
+
31
+ ---
32
+
33
+ ## What It Does
34
+
35
+ Drop CKG into your agent stack as an MCP tool. Instead of retrieving text chunks and hoping the LLM infers structure, CKG gives agents pre-compiled dependency paths, prerequisite chains, and concept relationships — directly from a structured graph.
36
+
37
+ | System | Macro F1 | Tokens/query | Hallucination Rate |
38
+ |--------|----------|-------------|-------------------|
39
+ | **CKG** | **0.471** | **269** | **0%** |
40
+ | RAG | 0.123 | 2,982 | Variable |
41
+ | GraphRAG | 0.120 | 3,450 | Variable |
42
+
43
+ ---
44
+
45
+ ## Install
46
+
47
+ ```bash
48
+ pip install ckg-mcp
49
+ ```
50
+
51
+ ## Claude Desktop Configuration
52
+
53
+ Add to your `claude_desktop_config.json`:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "ckg": {
59
+ "command": "ckg-mcp"
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Tools
68
+
69
+ | Tool | Description |
70
+ |------|-------------|
71
+ | `list_domains()` | List all available CKG domains |
72
+ | `query_ckg(domain, concept, depth)` | Extract subgraph — prerequisites + dependents |
73
+ | `get_prerequisites(domain, concept)` | Full prerequisite chain to root |
74
+ | `search_concepts(domain, query)` | Find concepts by name |
75
+
76
+ ---
77
+
78
+ ## Bundled Domains (v0.1.0)
79
+
80
+ | Domain | Concepts |
81
+ |--------|---------|
82
+ | calculus | 105 |
83
+ | algebra-1 | 80 |
84
+ | chemistry | 95 |
85
+ | biology | 88 |
86
+ | linear-algebra | 72 |
87
+ | data-science-course | 91 |
88
+ | economics-course | 78 |
89
+ | glp1-obesity | 90 |
90
+
91
+ More domains available via [Graphify.md](https://graphifymd.com) — weekly-updated commercial CKGs for clinical, regulatory, legal, and financial domains.
92
+
93
+ ---
94
+
95
+ ## Example
96
+
97
+ ```python
98
+ # In your agent — via MCP tool call
99
+ query_ckg(domain="calculus", concept="Taylor Series", depth=3)
100
+
101
+ # Returns:
102
+ ## CKG: Taylor Series (calculus)
103
+
104
+ ### Prerequisites (what you need to know first)
105
+ - Power Series
106
+ - Sequences and Series
107
+ - Limits
108
+ - Derivatives
109
+ - Infinite Series
110
+
111
+ ### Builds toward
112
+ - Maclaurin Series
113
+ - Error Estimation
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Why Not RAG?
119
+
120
+ RAG retrieves text chunks and forces the LLM to infer structure. On multi-hop structural queries (prerequisites, dependency chains, category aggregation), that inference fails — F1 = 0.123 vs CKG's 0.471.
121
+
122
+ CKG is a **pre-compiled routing layer**: the dependency paths are already in the graph. BFS/DFS traversal, not similarity search. No hallucinations by construction.
123
+
124
+ Full benchmark: [github.com/Yarmoluk/ckg-benchmark](https://github.com/Yarmoluk/ckg-benchmark)
125
+
126
+ ---
127
+
128
+ ## License
129
+
130
+ MIT — Yarmoluk & McCreary, 2026. Commercial deployment → [graphifymd.com](https://graphifymd.com)
@@ -0,0 +1,110 @@
1
+ # ckg-mcp
2
+
3
+ **Compact Knowledge Graph MCP server.** Pre-structured domain knowledge as a routing layer for agent stacks — 42× more efficient than RAG on structural queries.
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+ [![Python 3.10+](https://img.shields.io/badge/Python-3.10+-green.svg)]()
7
+ [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-purple.svg)]()
8
+
9
+ > Built on the [CKG Benchmark](https://github.com/Yarmoluk/ckg-benchmark) — 45 domains, 7,928 queries, fully reproducible results.
10
+
11
+ ---
12
+
13
+ ## What It Does
14
+
15
+ Drop CKG into your agent stack as an MCP tool. Instead of retrieving text chunks and hoping the LLM infers structure, CKG gives agents pre-compiled dependency paths, prerequisite chains, and concept relationships — directly from a structured graph.
16
+
17
+ | System | Macro F1 | Tokens/query | Hallucination Rate |
18
+ |--------|----------|-------------|-------------------|
19
+ | **CKG** | **0.471** | **269** | **0%** |
20
+ | RAG | 0.123 | 2,982 | Variable |
21
+ | GraphRAG | 0.120 | 3,450 | Variable |
22
+
23
+ ---
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install ckg-mcp
29
+ ```
30
+
31
+ ## Claude Desktop Configuration
32
+
33
+ Add to your `claude_desktop_config.json`:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "ckg": {
39
+ "command": "ckg-mcp"
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Tools
48
+
49
+ | Tool | Description |
50
+ |------|-------------|
51
+ | `list_domains()` | List all available CKG domains |
52
+ | `query_ckg(domain, concept, depth)` | Extract subgraph — prerequisites + dependents |
53
+ | `get_prerequisites(domain, concept)` | Full prerequisite chain to root |
54
+ | `search_concepts(domain, query)` | Find concepts by name |
55
+
56
+ ---
57
+
58
+ ## Bundled Domains (v0.1.0)
59
+
60
+ | Domain | Concepts |
61
+ |--------|---------|
62
+ | calculus | 105 |
63
+ | algebra-1 | 80 |
64
+ | chemistry | 95 |
65
+ | biology | 88 |
66
+ | linear-algebra | 72 |
67
+ | data-science-course | 91 |
68
+ | economics-course | 78 |
69
+ | glp1-obesity | 90 |
70
+
71
+ More domains available via [Graphify.md](https://graphifymd.com) — weekly-updated commercial CKGs for clinical, regulatory, legal, and financial domains.
72
+
73
+ ---
74
+
75
+ ## Example
76
+
77
+ ```python
78
+ # In your agent — via MCP tool call
79
+ query_ckg(domain="calculus", concept="Taylor Series", depth=3)
80
+
81
+ # Returns:
82
+ ## CKG: Taylor Series (calculus)
83
+
84
+ ### Prerequisites (what you need to know first)
85
+ - Power Series
86
+ - Sequences and Series
87
+ - Limits
88
+ - Derivatives
89
+ - Infinite Series
90
+
91
+ ### Builds toward
92
+ - Maclaurin Series
93
+ - Error Estimation
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Why Not RAG?
99
+
100
+ RAG retrieves text chunks and forces the LLM to infer structure. On multi-hop structural queries (prerequisites, dependency chains, category aggregation), that inference fails — F1 = 0.123 vs CKG's 0.471.
101
+
102
+ CKG is a **pre-compiled routing layer**: the dependency paths are already in the graph. BFS/DFS traversal, not similarity search. No hallucinations by construction.
103
+
104
+ Full benchmark: [github.com/Yarmoluk/ckg-benchmark](https://github.com/Yarmoluk/ckg-benchmark)
105
+
106
+ ---
107
+
108
+ ## License
109
+
110
+ MIT — Yarmoluk & McCreary, 2026. Commercial deployment → [graphifymd.com](https://graphifymd.com)
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ckg-mcp"
7
+ version = "0.1.0"
8
+ description = "Compact Knowledge Graph MCP server — 42× more efficient than RAG on structural queries"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "Daniel Yarmoluk", email = "daniel.yarmoluk@gmail.com" }]
12
+ keywords = ["mcp", "knowledge-graph", "rag", "llm", "ai"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ ]
21
+ requires-python = ">=3.10"
22
+ dependencies = ["mcp>=1.0.0"]
23
+
24
+ [project.scripts]
25
+ ckg-mcp = "ckg_mcp.server:main"
26
+
27
+ [project.urls]
28
+ Homepage = "https://graphifymd.com"
29
+ Repository = "https://github.com/Yarmoluk/ckg-mcp"
30
+ Paper = "https://graphifymd.com/paper.html"
31
+
32
+ [tool.hatch.build.targets.wheel]
33
+ packages = ["src/ckg_mcp"]
@@ -0,0 +1,4 @@
1
+ from .server import mcp
2
+
3
+ __version__ = "0.1.0"
4
+ __all__ = ["mcp"]
@@ -0,0 +1,201 @@
1
+ ConceptID,ConceptLabel,Dependencies,TaxonomyID
2
+ 1,Number,,FOUND
3
+ 2,Variable,,FOUND
4
+ 3,Constant,,FOUND
5
+ 4,Coefficient,2,FOUND
6
+ 5,Term,2|3|4,FOUND
7
+ 6,Expression,5,FOUND
8
+ 7,Equation,6,FOUND
9
+ 8,Inequality,6,FOUND
10
+ 9,Order of Operations,1,PROP
11
+ 10,Commutative Property,1,PROP
12
+ 11,Associative Property,1,PROP
13
+ 12,Distributive Property,1|5,PROP
14
+ 13,Identity Property,1,PROP
15
+ 14,Inverse Property,1,PROP
16
+ 15,Integers,1,NUMS
17
+ 16,Rational Numbers,15,NUMS
18
+ 17,Real Numbers,16,NUMS
19
+ 18,Absolute Value,1,NUMS
20
+ 19,Number Line,1|15,NUMS
21
+ 20,Coordinate System,19,NUMS
22
+ 21,Exponent,1,EXP
23
+ 22,Base,21,EXP
24
+ 23,Power,21|22,EXP
25
+ 24,Integer Exponents,21|15,EXP
26
+ 25,Rational Exponents,24|16,EXP
27
+ 26,Negative Exponents,24,EXP
28
+ 27,Zero Exponent,21,EXP
29
+ 28,Product Rule for Exponents,23,EXP
30
+ 29,Quotient Rule for Exponents,23,EXP
31
+ 30,Power Rule for Exponents,23,EXP
32
+ 31,Scientific Notation,24|28,EXP
33
+ 32,Square Root,23,EXP
34
+ 33,Cube Root,23,EXP
35
+ 34,Radical Expression,32|33,EXP
36
+ 35,Simplifying Radicals,34,EXP
37
+ 36,Evaluating Expressions,6|9,FOUND
38
+ 37,Substitution,2|36,FOUND
39
+ 38,Like Terms,5,POLY
40
+ 39,Combining Like Terms,38,POLY
41
+ 40,Simplifying Expressions,36|39,POLY
42
+ 41,Expanding Expressions,12|6,POLY
43
+ 42,Monomial,5|21,POLY
44
+ 43,Binomial,42,POLY
45
+ 44,Trinomial,43,POLY
46
+ 45,Polynomial,44,POLY
47
+ 46,Degree of Polynomial,45|21,POLY
48
+ 47,Leading Coefficient,45|4,POLY
49
+ 48,Standard Form of Polynomial,45|46,POLY
50
+ 49,Adding Polynomials,45|39,POLY
51
+ 50,Subtracting Polynomials,45|39,POLY
52
+ 51,Multiplying Polynomials,45|12,POLY
53
+ 52,FOIL Method,43|51,POLY
54
+ 53,Special Products,51,POLY
55
+ 54,Difference of Squares,53,POLY
56
+ 55,Perfect Square Trinomial,53,POLY
57
+ 56,Factoring,45,FACT
58
+ 57,Greatest Common Factor,45,FACT
59
+ 58,Factoring by GCF,56|57,FACT
60
+ 59,Factoring Trinomials,56|44,FACT
61
+ 60,Factoring Difference of Squares,56|54,FACT
62
+ 61,Factoring Perfect Squares,56|55,FACT
63
+ 62,Factoring by Grouping,56|45,FACT
64
+ 63,Prime Factorization,1,FACT
65
+ 64,Prime Polynomial,56,FACT
66
+ 65,Zero Product Property,56|7,FACT
67
+ 66,Solving by Factoring,65|7,FACT
68
+ 67,Factoring Completely,58|59|60,FACT
69
+ 68,Sum of Cubes,56,FACT
70
+ 69,Difference of Cubes,56,FACT
71
+ 70,Factoring Quadratic Form,59,FACT
72
+ 71,Solving Equations,7,LIN
73
+ 72,One-Step Equations,71|14,LIN
74
+ 73,Two-Step Equations,72,LIN
75
+ 74,Multi-Step Equations,73|12,LIN
76
+ 75,Variables on Both Sides,74,LIN
77
+ 76,Equations with Fractions,74|16,LIN
78
+ 77,Equations with Decimals,74|16,LIN
79
+ 78,Literal Equations,71|2,LIN
80
+ 79,Solving for a Variable,78,LIN
81
+ 80,Formula Manipulation,79,LIN
82
+ 81,Linear Equation in One Variable,71|2,LIN
83
+ 82,Solution Set,71,LIN
84
+ 83,Identity Equation,81,LIN
85
+ 84,Contradiction,81,LIN
86
+ 85,Conditional Equation,81,LIN
87
+ 86,Checking Solutions,71|37,LIN
88
+ 87,Applications of Linear Equations,81,DATA
89
+ 88,Consecutive Integers,87|15,DATA
90
+ 89,Perimeter Problems,87,DATA
91
+ 90,Distance Rate Time Problems,87,DATA
92
+ 91,Inequality,8,LIN
93
+ 92,Linear Inequality,91|81,LIN
94
+ 93,Inequality Symbols,91,LIN
95
+ 94,Graphing Inequalities,92|19,GRAPH
96
+ 95,Solving Linear Inequalities,92|71,LIN
97
+ 96,Compound Inequalities,95,LIN
98
+ 97,And Inequalities,96,LIN
99
+ 98,Or Inequalities,96,LIN
100
+ 99,Absolute Value Equations,71|18,LIN
101
+ 100,Absolute Value Inequalities,99|91,LIN
102
+ 101,Relation,2,FUNC
103
+ 102,Function,101,FUNC
104
+ 103,Domain,102,FUNC
105
+ 104,Range,102,FUNC
106
+ 105,Input,102,FUNC
107
+ 106,Output,102,FUNC
108
+ 107,Function Notation,102,FUNC
109
+ 108,Evaluating Functions,107|36,FUNC
110
+ 109,Independent Variable,102|2,FUNC
111
+ 110,Dependent Variable,102|2,FUNC
112
+ 111,Vertical Line Test,102,FUNC
113
+ 112,Discrete Function,102,FUNC
114
+ 113,Continuous Function,102,FUNC
115
+ 114,Piecewise Function,102,FUNC
116
+ 115,Step Function,114,FUNC
117
+ 116,Absolute Value Function,102|18,FUNC
118
+ 117,Parent Function,102,FUNC
119
+ 118,Function Transformation,117,FUNC
120
+ 119,Translation,118,FUNC
121
+ 120,Reflection,118,FUNC
122
+ 121,Coordinate Plane,20,GRAPH
123
+ 122,Ordered Pair,121,GRAPH
124
+ 123,X-Coordinate,122,GRAPH
125
+ 124,Y-Coordinate,122,GRAPH
126
+ 125,Origin,121,GRAPH
127
+ 126,Quadrants,121,GRAPH
128
+ 127,Plotting Points,122|121,GRAPH
129
+ 128,Linear Function,102|81,GRAPH
130
+ 129,Graph of a Line,128|127,GRAPH
131
+ 130,X-Intercept,129,GRAPH
132
+ 131,Y-Intercept,129,GRAPH
133
+ 132,Slope,129,GRAPH
134
+ 133,Rise,132,GRAPH
135
+ 134,Run,132,GRAPH
136
+ 135,Rate of Change,132,GRAPH
137
+ 136,Slope Formula,132|122,GRAPH
138
+ 137,Positive Slope,132,GRAPH
139
+ 138,Negative Slope,132,GRAPH
140
+ 139,Zero Slope,132,GRAPH
141
+ 140,Undefined Slope,132,GRAPH
142
+ 141,Slope-Intercept Form,128|132|131,GRAPH
143
+ 142,Point-Slope Form,128|132|122,GRAPH
144
+ 143,Standard Form,128,GRAPH
145
+ 144,Horizontal Line,129|139,GRAPH
146
+ 145,Vertical Line,129|140,GRAPH
147
+ 146,System of Equations,7,SYS
148
+ 147,Solution of a System,146,SYS
149
+ 148,Consistent System,146,SYS
150
+ 149,Inconsistent System,146,SYS
151
+ 150,Independent System,148,SYS
152
+ 151,Dependent System,148,SYS
153
+ 152,Graphing Method,146|129,SYS
154
+ 153,Substitution Method,146|37,SYS
155
+ 154,Elimination Method,146|39,SYS
156
+ 155,Linear Combination,154,SYS
157
+ 156,System of Inequalities,146|91,SYS
158
+ 157,Graphing Systems,156|152,SYS
159
+ 158,Solution Region,157,SYS
160
+ 159,Boundary Line,157,SYS
161
+ 160,Applications of Systems,146|87,DATA
162
+ 161,Quadratic Function,102|45,QUAD
163
+ 162,Parabola,161|129,QUAD
164
+ 163,Vertex,162,QUAD
165
+ 164,Axis of Symmetry,162,QUAD
166
+ 165,Maximum Value,163,QUAD
167
+ 166,Minimum Value,163,QUAD
168
+ 167,Standard Form of Quadratic,161|48,QUAD
169
+ 168,Vertex Form,161|163,QUAD
170
+ 169,Graphing Quadratics,162|127,QUAD
171
+ 170,Quadratic Equation,7|45,QUAD
172
+ 171,Solving Quadratics by Graphing,170|169,QUAD
173
+ 172,Solving by Square Roots,170|32,QUAD
174
+ 173,Completing the Square,170|55,QUAD
175
+ 174,Quadratic Formula,170|173,QUAD
176
+ 175,Discriminant,174,QUAD
177
+ 176,Nature of Roots,175,QUAD
178
+ 177,Complex Numbers,176,QUAD
179
+ 178,Imaginary Unit,177,QUAD
180
+ 179,Applications of Quadratics,170|87,DATA
181
+ 180,Projectile Motion,179,DATA
182
+ 181,Exponential Function,102|21,QUAD
183
+ 182,Exponential Growth,181,QUAD
184
+ 183,Exponential Decay,181,QUAD
185
+ 184,Growth Factor,182,QUAD
186
+ 185,Decay Factor,183,QUAD
187
+ 186,Initial Value,181,QUAD
188
+ 187,Compound Interest,182,DATA
189
+ 188,Exponential Models,181,QUAD
190
+ 189,Comparing Linear and Exponential,128|181,QUAD
191
+ 190,Graphing Exponentials,181|127,QUAD
192
+ 191,Data Set,1,DATA
193
+ 192,Scatterplot,121|191,DATA
194
+ 193,Correlation,192,DATA
195
+ 194,Positive Correlation,193,DATA
196
+ 195,Negative Correlation,193,DATA
197
+ 196,No Correlation,193,DATA
198
+ 197,Line of Best Fit,192|129,DATA
199
+ 198,Linear Regression,197,DATA
200
+ 199,Arithmetic Sequence,1,DATA
201
+ 200,Geometric Sequence,199|21,DATA