My C++ project introduced some internal third-party projects through bazel, so when I need cursor to help me implement some code, I need to let cursor know the API or class implementation of these third-party projects.
I tried some methods, but the effect was not good:
1、Introduce the documentation of open source projects. Unfortunately, many projects, whether open source projects or internal company projects, do not have very complete documentation.
2、Export the header files of external projects through bazel run @hedron_compile_commands//:refresh_all. These header files are placed in a thirdpary directory under the root directory. From the code generated by cursor, the effect is not ideal.
Is there a better way to introduce the source code of third-party projects? Does MCP help this scenario? For example, build an MCP tool, specify a third-party project directory, and provide code search and code index related functions through the MCP interface. Is this effective? I have not found a ready-made tool.
I guess the best solution is to also create a cursor index for the third-party code directory, so that cursor can find the correct interface when generating code?