Below are the details to set up a development environment and run tests for the mcp-toolbox-sdk-java SDK.
This library adheres to Semantic Versioning.
This repository utilizes Conventional Commits for structuring commit messages.
-
Clone the repository:
git clone https://github.com/googleapis/mcp-toolbox-sdk-java
-
Navigate to the project directory:
cd mcp-toolbox-sdk-java -
Build the project:
mvn clean install
This will generate the package JAR in your local .m2 repository, making it available for other local Maven projects.
This repository uses Release Please to automate the release process.
- Pull Requests: When code is merged into the
mainbranch, Release Please analyzes the commit messages (which must follow Conventional Commits). - Release PR: Release Please creates or updates a special "Release PR" that updates the
CHANGELOG.mdand bumps the version inpom.xml. - Release Creation: When a maintainer approves and merges the Release PR, Release Please tags the commit, creates a GitHub Release, and triggers the publishing workflow (to Maven Central).
Use this package in your test application.
To run tests locally, ensure you have the necessary dependencies and a running MCP Toolbox service.
- Create a new Java project (differnet from the SDK project).
- Copy the source code from
examplefolder of this repo (ExampleUsage.java) to thesrc. - Copy the
pom.xmlcontent fromexampleto the new project. - Make the necesary changes for your
YOUR_TOOLBOX_SERVICE_ENDPOINTand theYOUR_CREDENTIALS_JSON_FILE_PATHplaceholders. - Run the following command to test:
mvn clean compile exec:java -Dexec.mainClass="cloudcode.helloworld.ExampleUsage"
This project uses com.spotify.fmt:fmt-maven-plugin for formatting.
Format your code using
mvn com.spotify.fmt:fmt-maven-plugin:formatWe love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
-
Reporting a bug
-
Discussing the current state of the code
-
Submitting a fix
-
Proposing new features
-
Becoming a maintainer
We use github to host code, to track issues and feature requests, as well as accept pull requests.
We welcome contributions to this project! Please review the following guidelines before submitting.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). Read more here
All submissions, including those by project members, require review. We use GitHub pull requests for this purpose.
- Ensure your pull request clearly describes the changes you are making.
- Ideally, your pull request should include code, tests, and updated documentation (if applicable) in a single submission.
- A reviewer from our team will typically review your PR within 2-5 days and may request changes or approve it.
We use GitHub issues to track public bugs. Report a bug by opening a new issue, it's that easy!
Great Bug Reports tend to have:
-
A quick summary and/or background
-
Steps to reproduce
-
Be specific!
-
Give sample code if you can.
-
What you expected would happen
-
What actually happened
-
Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
-
We use standard Java naming conventions.
-
Use CompletableFuture for all network operations to maintain the async-first architecture.
-
Keep dependencies minimal. Do not add new libraries unless absolutely necessary.
-
For more info, see Google Java Style Guide