Commit bd1e9ad
authored
mcp-function (#572)
* mcp-function
Summary:
Implements Model Context Protocol server to enable LLMs to consume
StackQL as a first-class information source.
Key features:
- Backend interface abstraction for flexible query execution
- Comprehensive configuration with JSON/YAML support
- Complete MCP protocol implementation (initialize, resources, tools)
- Multiple transport support (stdio, TCP, WebSocket)
- Zero dependencies on StackQL internals
- Example backend for testing and demonstration
The package provides clean separation of concerns with interfaces
that can be implemented for in-memory, TCP, or other communication
methods as requested in issue #110.
🤖 Generated with [Claude Code](https://claude.ai/code)
---
- Hide all concrete types behind interfaces except config structures
- Make factory functions return interface types
- Create hierarchical schema interface instead of flat schema
- Add nolint comments for driver import
- Remove unused imports and ensure clean API
🤖 Generated with [Claude Code](https://claude.ai/code)
---
Summary:
- Leverage golang mcp SDK.
- Conform golang versioning.
- Added `stackql_mcp_client` to Dockerfile.
- Agnostic backend for MCP.
- Added robot test `MCP HTTP Server Run List Tools`.
- Added robot test `MCP HTTP Server Verify Greeting Tool`.
- Added robot test `MCP HTTP Server List Providers Tool`.
- Added robot test `MCP HTTP Server List Services Tool`.
- Added robot test `MCP HTTP Server List Resources Tool`.
- Added robot test `MCP HTTP Server List Methods Tool`.
- Added robot test `MCP HTTP Server Query Tool`.
- Doc improvements.
* - Linter fix.1 parent 1aa6590 commit bd1e9ad
File tree
87 files changed
+3692
-494
lines changed- .github/workflows
- .vscode
- cicd/python
- docs
- licenses
- internal
- stackql
- acid
- tsm_physio
- txn_context
- astanalysis/earlyanalysis
- astvisit
- cmd
- data_staging/output_data_staging
- datasource/sql_datasource
- dbmsinternal
- driver
- execution
- internal_data_transfer/internaldto
- mcpbackend
- output
- planbuilderinput
- planbuilder
- primitivebuilder
- primitivegenerator
- provider
- sql_system
- typing
- util
- test/testobjects
- mcp_client
- cmd
- pkg
- mcp_server
- presentation
- textutil
- stackql
- test
- python/stackql_test_tooling
- robot/functional
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
87 files changed
+3692
-494
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
348 | 359 | | |
349 | 360 | | |
350 | 361 | | |
| |||
410 | 421 | | |
411 | 422 | | |
412 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
413 | 431 | | |
414 | 432 | | |
415 | 433 | | |
| |||
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
462 | 485 | | |
463 | 486 | | |
464 | 487 | | |
| |||
474 | 497 | | |
475 | 498 | | |
476 | 499 | | |
| 500 | + | |
477 | 501 | | |
| 502 | + | |
478 | 503 | | |
479 | 504 | | |
480 | 505 | | |
481 | 506 | | |
482 | 507 | | |
483 | | - | |
| 508 | + | |
484 | 509 | | |
485 | 510 | | |
486 | 511 | | |
| |||
649 | 674 | | |
650 | 675 | | |
651 | 676 | | |
| 677 | + | |
652 | 678 | | |
653 | 679 | | |
654 | 680 | | |
| |||
682 | 708 | | |
683 | 709 | | |
684 | 710 | | |
685 | | - | |
| 711 | + | |
686 | 712 | | |
687 | 713 | | |
688 | 714 | | |
| |||
693 | 719 | | |
694 | 720 | | |
695 | 721 | | |
696 | | - | |
| 722 | + | |
697 | 723 | | |
698 | 724 | | |
699 | 725 | | |
| |||
763 | 789 | | |
764 | 790 | | |
765 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
766 | 802 | | |
767 | 803 | | |
768 | 804 | | |
| |||
931 | 967 | | |
932 | 968 | | |
933 | 969 | | |
| 970 | + | |
934 | 971 | | |
935 | 972 | | |
936 | 973 | | |
| |||
979 | 1016 | | |
980 | 1017 | | |
981 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
982 | 1026 | | |
983 | 1027 | | |
984 | 1028 | | |
| |||
1090 | 1134 | | |
1091 | 1135 | | |
1092 | 1136 | | |
1093 | | - | |
| 1137 | + | |
1094 | 1138 | | |
1095 | 1139 | | |
1096 | 1140 | | |
| |||
1164 | 1208 | | |
1165 | 1209 | | |
1166 | 1210 | | |
| 1211 | + | |
1167 | 1212 | | |
1168 | 1213 | | |
1169 | 1214 | | |
| |||
1236 | 1281 | | |
1237 | 1282 | | |
1238 | 1283 | | |
1239 | | - | |
| 1284 | + | |
1240 | 1285 | | |
1241 | 1286 | | |
1242 | 1287 | | |
| |||
1288 | 1333 | | |
1289 | 1334 | | |
1290 | 1335 | | |
| 1336 | + | |
1291 | 1337 | | |
1292 | 1338 | | |
1293 | 1339 | | |
| |||
1421 | 1467 | | |
1422 | 1468 | | |
1423 | 1469 | | |
1424 | | - | |
| 1470 | + | |
1425 | 1471 | | |
1426 | 1472 | | |
1427 | 1473 | | |
| |||
1659 | 1705 | | |
1660 | 1706 | | |
1661 | 1707 | | |
| 1708 | + | |
1662 | 1709 | | |
1663 | 1710 | | |
1664 | 1711 | | |
| |||
1669 | 1716 | | |
1670 | 1717 | | |
1671 | 1718 | | |
| 1719 | + | |
1672 | 1720 | | |
1673 | 1721 | | |
1674 | 1722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
0 commit comments