Skip to content

Commit b54d7ba

Browse files
authored
Merge branch 'main' into add-tool-annotation-to-schema
2 parents f3cd195 + b701a36 commit b54d7ba

File tree

59 files changed

+4864
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4864
-982
lines changed

CODE_OF_CONDUCT.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a
6+
harassment-free experience for everyone, regardless of age, body size, visible or
7+
invisible disability, ethnicity, sex characteristics, gender identity and expression,
8+
level of experience, education, socio-economic status, nationality, personal appearance,
9+
race, religion, or sexual identity and orientation.
10+
11+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
12+
inclusive, and healthy community.
13+
14+
## Our Standards
15+
16+
Examples of behavior that contributes to a positive environment for our community
17+
include:
18+
19+
- Demonstrating empathy and kindness toward other people
20+
- Being respectful of differing opinions, viewpoints, and experiences
21+
- Giving and gracefully accepting constructive feedback
22+
- Accepting responsibility and apologizing to those affected by our mistakes, and
23+
learning from the experience
24+
- Focusing on what is best not just for us as individuals, but for the overall community
25+
26+
Examples of unacceptable behavior include:
27+
28+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
29+
- Trolling, insulting or derogatory comments, and personal or political attacks
30+
- Public or private harassment
31+
- Publishing others' private information, such as a physical or email address, without
32+
their explicit permission
33+
- Other conduct which could reasonably be considered inappropriate in a professional
34+
setting
35+
36+
## Enforcement Responsibilities
37+
38+
Community leaders are responsible for clarifying and enforcing our standards of
39+
acceptable behavior and will take appropriate and fair corrective action in response to
40+
any behavior that they deem inappropriate, threatening, offensive, or harmful.
41+
42+
Community leaders have the right and responsibility to remove, edit, or reject comments,
43+
commits, code, wiki edits, issues, and other contributions that are not aligned to this
44+
Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all community spaces, and also applies when an
49+
individual is officially representing the community in public spaces. Examples of
50+
representing our community include using an official e-mail address, posting via an
51+
official social media account, or acting as an appointed representative at an online or
52+
offline event.
53+
54+
## Enforcement
55+
56+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to
57+
the community leaders responsible for enforcement at mcp-coc@anthropic.com. All
58+
complaints will be reviewed and investigated promptly and fairly.
59+
60+
All community leaders are obligated to respect the privacy and security of the reporter
61+
of any incident.
62+
63+
## Enforcement Guidelines
64+
65+
Community leaders will follow these Community Impact Guidelines in determining the
66+
consequences for any action they deem in violation of this Code of Conduct:
67+
68+
### 1. Correction
69+
70+
**Community Impact**: Use of inappropriate language or other behavior deemed
71+
unprofessional or unwelcome in the community.
72+
73+
**Consequence**: A private, written warning from community leaders, providing clarity
74+
around the nature of the violation and an explanation of why the behavior was
75+
inappropriate. A public apology may be requested.
76+
77+
### 2. Warning
78+
79+
**Community Impact**: A violation through a single incident or series of actions.
80+
81+
**Consequence**: A warning with consequences for continued behavior. No interaction with
82+
the people involved, including unsolicited interaction with those enforcing the Code of
83+
Conduct, for a specified period of time. This includes avoiding interactions in community
84+
spaces as well as external channels like social media. Violating these terms may lead to
85+
a temporary or permanent ban.
86+
87+
### 3. Temporary Ban
88+
89+
**Community Impact**: A serious violation of community standards, including sustained
90+
inappropriate behavior.
91+
92+
**Consequence**: A temporary ban from any sort of interaction or public communication
93+
with the community for a specified period of time. No public or private interaction with
94+
the people involved, including unsolicited interaction with those enforcing the Code of
95+
Conduct, is allowed during this period. Violating these terms may lead to a permanent
96+
ban.
97+
98+
### 4. Permanent Ban
99+
100+
**Community Impact**: Demonstrating a pattern of violation of community standards,
101+
including sustained inappropriate behavior, harassment of an individual, or aggression
102+
toward or disparagement of classes of individuals.
103+
104+
**Consequence**: A permanent ban from any sort of public interaction within the
105+
community.
106+
107+
## Attribution
108+
109+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
110+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
111+
112+
Community Impact Guidelines were inspired by
113+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
114+
115+
[homepage]: https://www.contributor-covenant.org
116+
117+
For answers to common questions about this code of conduct, see the FAQ at
118+
https://www.contributor-covenant.org/faq. Translations are available at
119+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Contributing to Model Context Protocol Java SDK
2+
3+
Thank you for your interest in contributing to the Model Context Protocol Java SDK!
4+
This document outlines how to contribute to this project.
5+
6+
## Prerequisites
7+
8+
The following software is required to work on the codebase:
9+
10+
- `Java 17` or above
11+
- `Docker`
12+
- `npx`
13+
14+
## Getting Started
15+
16+
1. Fork the repository
17+
2. Clone your fork:
18+
19+
```bash
20+
git clone https://github.com/YOUR-USERNAME/java-sdk.git
21+
cd java-sdk
22+
```
23+
24+
3. Build from source:
25+
26+
```bash
27+
./mvnw clean install -DskipTests # skip the tests
28+
./mvnw test # run tests
29+
```
30+
31+
## Reporting Issues
32+
33+
Please create an issue in the repository if you discover a bug or would like to
34+
propose an enhancement. Bug reports should have a reproducer in the form of a code
35+
sample or a repository attached that the maintainers or contributors can work with to
36+
address the problem.
37+
38+
## Making Changes
39+
40+
1. Create a new branch:
41+
42+
```bash
43+
git checkout -b feature/your-feature-name
44+
```
45+
46+
2. Make your changes
47+
3. Validate your changes:
48+
49+
```bash
50+
./mvnw clean test
51+
```
52+
53+
### Change Proposal Guidelines
54+
55+
#### Principles of MCP
56+
57+
1. **Simple + Minimal**: It is much easier to add things to the codebase than it is to
58+
remove them. To maintain simplicity, we keep a high bar for adding new concepts and
59+
primitives as each addition requires maintenance and compatibility consideration.
60+
2. **Concrete**: Code changes need to be based on specific usage and implementation
61+
challenges and not on speculative ideas. Most importantly, the SDK is meant to
62+
implement the MCP specification.
63+
64+
## Submitting Changes
65+
66+
1. For non-trivial changes, please clarify with the maintainers in an issue whether
67+
you can contribute the change and the desired scope of the change.
68+
2. For trivial changes (for example a couple of lines or documentation changes) there
69+
is no need to open an issue first.
70+
3. Push your changes to your fork.
71+
4. Submit a pull request to the main repository.
72+
5. Follow the pull request template.
73+
6. Wait for review.
74+
7. For any follow-up work, please add new commits instead of force-pushing. This will
75+
allow the reviewer to focus on incremental changes instead of having to restart the
76+
review process.
77+
78+
## Code of Conduct
79+
80+
This project follows a Code of Conduct. Please review it in
81+
[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
82+
83+
## Questions
84+
85+
If you have questions, please create a discussion in the repository.
86+
87+
## License
88+
89+
By contributing, you agree that your contributions will be licensed under the MIT
90+
License.
91+
92+
## Security
93+
94+
Please review our [Security Policy](SECURITY.md) for reporting security issues.

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ This SDK enables Java applications to interact with AI models and tools through
77
## 📚 Reference Documentation
88

99
#### MCP Java SDK documentation
10-
For comprehensive guides and SDK API documentation, visit the [MCP Java SDK Reference Documentation](https://modelcontextprotocol.io/sdk/java/mcp-overview).
10+
For comprehensive guides and SDK API documentation
11+
12+
- [Features](https://modelcontextprotocol.io/sdk/java/mcp-overview#features) - Overview the features provided by the Java MCP SDK
13+
- [Acrchitecture](https://modelcontextprotocol.io/sdk/java/mcp-overview#architecture) - Java MCP SDK architecture overview.
14+
- [Java Dependencies / BOM](https://modelcontextprotocol.io/sdk/java/mcp-overview#dependencies) - Java dependencies and BOM.
15+
- [Java MCP Client](https://modelcontextprotocol.io/sdk/java/mcp-client) - Learn how to use the MCP client to interact with MCP servers.
16+
- [Java MCP Server](https://modelcontextprotocol.io/sdk/java/mcp-server) - Learn how to implement and configure a MCP servers.
1117

1218
#### Spring AI MCP documentation
1319
[Spring AI MCP](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-overview.html) extends the MCP Java SDK with Spring Boot integration, providing both [client](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-client-boot-starter-docs.html) and [server](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-server-boot-starter-docs.html) starters. Bootstrap your AI applications with MCP support using [Spring Initializer](https://start.spring.io).
@@ -30,11 +36,8 @@ To run the tests you have to pre-install `Docker` and `npx`.
3036

3137
## Contributing
3238

33-
Contributions are welcome! Please:
34-
35-
1. Fork the repository
36-
2. Create a feature branch
37-
3. Submit a Pull Request
39+
Contributions are welcome!
40+
Please follow the [Contributing Guidelines](CONTRIBUTING.md).
3841

3942
## Team
4043

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
Thank you for helping us keep the SDKs and systems they interact with secure.
4+
5+
## Reporting Security Issues
6+
7+
This SDK is maintained by [Anthropic](https://www.anthropic.com/) as part of the Model
8+
Context Protocol project.
9+
10+
The security of our systems and user data is Anthropic’s top priority. We appreciate the
11+
work of security researchers acting in good faith in identifying and reporting potential
12+
vulnerabilities.
13+
14+
Our security program is managed on HackerOne and we ask that any validated vulnerability
15+
in this functionality be reported through their
16+
[submission form](https://hackerone.com/anthropic-vdp/reports/new?type=team&report_type=vulnerability).
17+
18+
## Vulnerability Disclosure Program
19+
20+
Our Vulnerability Program Guidelines are defined on our
21+
[HackerOne program page](https://hackerone.com/anthropic-vdp).

mcp-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.modelcontextprotocol.sdk</groupId>
99
<artifactId>mcp-parent</artifactId>
10-
<version>0.10.0-SNAPSHOT</version>
10+
<version>0.11.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>mcp-bom</artifactId>

mcp-spring/mcp-spring-webflux/pom.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.modelcontextprotocol.sdk</groupId>
88
<artifactId>mcp-parent</artifactId>
9-
<version>0.10.0-SNAPSHOT</version>
9+
<version>0.11.0-SNAPSHOT</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212
<artifactId>mcp-spring-webflux</artifactId>
@@ -25,13 +25,13 @@
2525
<dependency>
2626
<groupId>io.modelcontextprotocol.sdk</groupId>
2727
<artifactId>mcp</artifactId>
28-
<version>0.10.0-SNAPSHOT</version>
28+
<version>0.11.0-SNAPSHOT</version>
2929
</dependency>
3030

3131
<dependency>
3232
<groupId>io.modelcontextprotocol.sdk</groupId>
3333
<artifactId>mcp-test</artifactId>
34-
<version>0.10.0-SNAPSHOT</version>
34+
<version>0.11.0-SNAPSHOT</version>
3535
<scope>test</scope>
3636
</dependency>
3737

@@ -82,6 +82,12 @@
8282
<version>${mockito.version}</version>
8383
<scope>test</scope>
8484
</dependency>
85+
<dependency>
86+
<groupId>net.bytebuddy</groupId>
87+
<artifactId>byte-buddy</artifactId>
88+
<version>${byte-buddy.version}</version>
89+
<scope>test</scope>
90+
</dependency>
8591
<dependency>
8692
<groupId>io.projectreactor</groupId>
8793
<artifactId>reactor-test</artifactId>
@@ -93,6 +99,12 @@
9399
<version>${testcontainers.version}</version>
94100
<scope>test</scope>
95101
</dependency>
102+
<dependency>
103+
<groupId>org.testcontainers</groupId>
104+
<artifactId>toxiproxy</artifactId>
105+
<version>${toxiproxy.version}</version>
106+
<scope>test</scope>
107+
</dependency>
96108

97109
<dependency>
98110
<groupId>org.awaitility</groupId>

0 commit comments

Comments
 (0)