Commit 65a13ad
authored
feat: Add mcp support (#450)
* feat: Add mcp transport protocol (#345)
* add basic code
* fixes
* test fix
* new unit tests
* rename ToolboxTransport
* add py3.9 support
* fix langchain tool tests
* test fix
* lint
* fix tests
* move manage session into transport
* move warning to diff file
* avoid code duplication
* fix tests
* lint
* remove redundant tests
* make invoke method return str
* lint
* fix return type
* small refactor
* refactor: remove transport logic from client tests
* try
* version negotiation
* small changes
* lint
* fix endpoint
* add some todos
* lint
* initialise in init
* lint
* add support for 'Mcp-session-id'
* lint
* add todo
* add mcp protocol version to the latest protocol
* add test coverage
* small fix
* small fix
* small fix
* thread fixes
* try
* add tests
* lint
* change small
* nit
* small debugging
* add todos
* small bug fixes
* add todo
* remove id field from notifications
* refactor
* preprocess tools with empty params
* fix types
* fix bugs
* better error log
* small cleanup
* handle notifications
* fix unit tests
* lint
* decouple client from transport
* lint
* use toolbox protocol for e2e tests
* add e2e tests for mcp
* lint
* remove mcp as default protocol
* remove auth tests from mcp
* remove redundant lines
* remove redundant lines
* lint
* revert some changes
* initialise session in a better way
* small fix
* added more test cov
* lint
* rename private method
* Made methods private
* lint
* rename base url
* resolve comment
* better readability
* fix tests
* lint
* fix tests
* lint
* refactor mcp versions
* lint
* added test coverage
* refactor mcp
* lint
* improve cov
* lint
* removed process id
* Update class name
* remove mcp latest
* rename mcp.py
* have a single method for session init
* lint
* better type checks for v20241105
* Revert "better type checks for v20241105"
This reverts commit bc6da15.
* update type checking
* lint
* clean file
* refactor files
* refactor all versions
* fix mypy errors
* refactor properly
* lint
* run mcp e2e tests on all versions
* feat: Add support for auth related features (#363)
* test fix
* lint
* make invoke method return str
* lint
* try
* version negotiation
* small changes
* lint
* fix endpoint
* add some todos
* lint
* initialise in init
* lint
* add support for 'Mcp-session-id'
* lint
* add todo
* add mcp protocol version to the latest protocol
* small fix
* small fix
* small fix
* thread fixes
* try
* add tests
* lint
* change small
* small debugging
* add todos
* small bug fixes
* add todo
* remove id field from notifications
* refactor
* preprocess tools with empty params
* fix types
* fix bugs
* better error log
* small cleanup
* handle notifications
* fix unit tests
* lint
* decouple client from transport
* lint
* use toolbox protocol for e2e tests
* lint
* remove mcp as default protocol
* remove redundant lines
* remove redundant lines
* lint
* revert some changes
* initialise session in a better way
* small fix
* Made methods private
* lint
* rename base url
* resolve comment
* better readability
* add auth tests
* lint
* fix test
* rename authParam to authParams
* refactor mcp versions
* fix tests
* lint
* add auth param support code
* lint
* add unit test
* lint
* test fix
* lint
* fix test
* better error handling
* fix test
* add debug statement
* add debug statement
* add debug statement
* remove debug
* remove not needed files
* refactor mcp
* lint
* improve cov
* lint
* add feat files
* small fix
* small fix
* Update test_e2e_mcp.py
* add new tests
* add more test cases
* remove files
* remove rebase changes
* fix rebase issues
* lint
* fix rebase issues
* add test case
* fix test
* fix convert schema logic
* lint
* feat: Make mcp the default protocol (#364)
* add basic code
* fixes
* test fix
* new unit tests
* rename ToolboxTransport
* add py3.9 support
* fix langchain tool tests
* test fix
* lint
* fix tests
* move manage session into transport
* move warning to diff file
* avoid code duplication
* fix tests
* lint
* remove redundant tests
* make invoke method return str
* lint
* fix return type
* small refactor
* refactor: remove transport logic from client tests
* try
* version negotiation
* small changes
* lint
* fix endpoint
* add some todos
* lint
* initialise in init
* lint
* add support for 'Mcp-session-id'
* lint
* add todo
* add mcp protocol version to the latest protocol
* add test coverage
* small fix
* small fix
* small fix
* thread fixes
* try
* add tests
* lint
* change small
* nit
* small debugging
* add todos
* small bug fixes
* add todo
* remove id field from notifications
* refactor
* preprocess tools with empty params
* fix types
* fix bugs
* better error log
* small cleanup
* handle notifications
* fix unit tests
* lint
* decouple client from transport
* lint
* use toolbox protocol for e2e tests
* add e2e tests for mcp
* lint
* remove mcp as default protocol
* remove auth tests from mcp
* remove redundant lines
* remove redundant lines
* lint
* revert some changes
* initialise session in a better way
* small fix
* added more test cov
* lint
* rename private method
* Made methods private
* lint
* rename base url
* resolve comment
* better readability
* add auth tests
* lint
* fix test
* make mcp the default protocol
* lint
* rename authParam to authParams
* fix tests
* lint
* fix tests
* lint
* refactor mcp versions
* lint
* added test coverage
* add auth param support code
* lint
* add unit test
* lint
* lint
* test fix
* lint
* fix test
* better error handling
* fix test
* add debug statement
* add debug statement
* Update integration.cloudbuild.yaml
* add debug statement
* remove debug
* update server version
* Update test_sync_e2e.py
* Update test_e2e.py
* Update test_e2e.py
* refactor mcp
* lint
* improve cov
* lint
* removed process id
* remove not needed files
* add feat files
* small fix
* small fix
* Update test_e2e_mcp.py
* add new tests
* add more test cases
* fix tests
* remove unwanted files1 parent 1fcf499 commit 65a13ad
File tree
17 files changed
+2721
-5
lines changed- packages/toolbox-core
- src/toolbox_core
- mcp_transport
- v20241105
- v20250326
- v20250618
- tests
- mcp_transport
17 files changed
+2721
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
59 | 78 | | |
60 | 79 | | |
61 | 80 | | |
| |||
Lines changed: 23 additions & 0 deletions
| 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 | + | |
Lines changed: 127 additions & 0 deletions
| 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
Lines changed: 168 additions & 0 deletions
| 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
0 commit comments