docs : Cookbook on using MCP with CAMEL on SQL
Description
PR for the Cookbook - https://github.com/camel-ai/camel/issues/1983
Checklist
Go over all the following points, and put an x in all the boxes that apply.
- [x] I have read the CONTRIBUTION guide (required)
- [x] I have linked this PR to an issue using the Development section on the right sidebar or by adding
Fixes #issue-numberin the PR description (required) - [x] I have checked if any dependencies need to be added or updated in
pyproject.tomlanduv lock - [x] I have updated the tests accordingly (required for a bug fix or a new feature)
- [ ] I have updated the documentation if needed:
- [ ] I have added examples if this is a new feature
If you are unsure about any of these, don't hesitate to ask. We are here to help!
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thanks @parthshr370 . I'm a bit confused about the entire process.
Under normal circumstances, we set up a server first. Then, we have a config.json file, and the agent uses this config.json to connect to the MCP server. However, there doesn't seem to be any config.json file.
Thanks @parthshr370 . I'm a bit confused about the entire process.
Under normal circumstances, we set up a server first. Then, we have a
config.jsonfile, and the agent uses thisconfig.jsonto connect to the MCP server. However, there doesn't seem to be anyconfig.jsonfile.
Thanks @parthshr370 . I'm a bit confused about the entire process.
Under normal circumstances, we set up a server first. Then, we have a
config.jsonfile, and the agent uses thisconfig.jsonto connect to the MCP server. However, there doesn't seem to be anyconfig.jsonfile.
@zjrwtx there are two ways to implement an mcp server
- One through typscript and json as you mentioned
- Other through the python sdk
While apps like cusor , claude desktop(client) use the simple json cofig as it is just npm install <server_name> and then the config for the same
Agent libs like CAMEL are best suited for Python sdk implementation , where we write a server with a set of rules and then connect the camel-agent to it (client)
The client calls the custom server written in python and then does the task
Also from my experience we see a lot of dependencies error in lot of linux distro while going the server.json route(mostly npx dependencies)
You can refer this for python sdk - https://github.com/modelcontextprotocol/python-sdk
Thanks @parthshr370 . I'm a bit confused about the entire process. Under normal circumstances, we set up a server first. Then, we have a
config.jsonfile, and the agent uses thisconfig.jsonto connect to the MCP server. However, there doesn't seem to be anyconfig.jsonfile.@zjrwtx there are two ways to implement an mcp server
- One through typscript and json as you mentioned
- Other through the python sdk
While apps like cusor , claude desktop(client) use the simple json cofig as it is just npm install <server_name> and then the config for the same
Agent libs like CAMEL are best suited for Python sdk implementation , where we write a server with a set of rules and then connect the camel-agent to it (client)
The client calls the custom server written in python and then does the task
Also from my experience we see a lot of dependencies error in lot of linux distro while going the server.json route(mostly npx dependencies)
You can refer this for python sdk - https://github.com/modelcontextprotocol/python-sdk thanks @parthshr370 ,i see
hello @JoyceXu02 have made the specific changes asked you can take a look
Hi @parthshr370, I think the statements here are not accurate. MCP server can be implement in more languages.
There are two approaches to implementing an MCP server:
TypeScript with JSON Config: This approach is typically used with npm-based clients (such as Cursor or Claude Desktop), where a config.json file is used to configure and connect to the server.
Python SDK Approach: In this notebook, we use the Python SDK. Here, you write the MCP server in Python and connect directly without a config.json file.
I am not sure if it's really necessary to give all details about "Building the SQL MCP Server". I think the main focus of this cookbook is about user using the SQL MCP server, not implementing the MCP server from scratch and use. It gets too long, especially for user who doesn't really care about the detail implementations.
I think we can skip the 1st half part of the cookbook, the details of implementing. Just find a SQL MCP server on the Internet (there are a lot), and tell user how to config it with Camel agents.
Hello @MuggleJinx i will fix wrt to the comments
I have my own implementation of the server here so should I just link the server and the just focus on the implementation part with camel?
Hello @MuggleJinx i will fix wrt to the comments
I have my own implementation of the server here so should I just link the server and the just focus on the implementation part with camel?
Sure, that would be great. Then you can config like npx -y github:your-username/your-repo for node project for example. Then focus on the usage of agents calling the MCP tools to do the tasks.
It looks like the cookbook in this PR differs from the one in Colab: link. Could you please unify the two so they are consistent?
Sorry , did that please check now