You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,10 @@ When reporting a bug, use the provided issue template and fill in as many detail
36
36
37
37
Most issues are resolved through a Pull Request. PRs go through a review process to ensure quality and correctness.
38
38
39
-
> [!CAUTION]
40
-
> The [mcp_schema.rs](src/generated_schema/2024_11_05/mcp_schema.rs) file(s) and certain parts of [schema_utils](src/generated_schema/2024_11_05/schema_utils.rs#L514-L1149) are **automatically generated**.
41
-
> The code responsible for generating these files is **not part of this repository** at this time. As a result, we **do not accept pull requests** for these sections.
39
+
### ❗Caution
42
40
43
-
If you find a bug or have suggestions that require modifying the autogenerated code, please **open an issue** and share your proposed changes. We will update the schema generator accordingly, and your changes will be included in a future release.
41
+
The [mcp_schema.rs](src/generated_schema/2024_11_05/mcp_schema.rs) file(s) and certain parts of [schema_utils](src/generated_schema/2024_11_05/schema_utils.rs#L514-L1149) are **automatically generated**. The code responsible for generating these files is **not part of this repository** at this time. As a result, we **do not accept pull requests** for these sections.
42
+
If you discover a bug or have suggestions that involve changing the autogenerated code, please **open an issue** and share your proposed modifications. We'll update the schema generator as needed, and your changes will be included in a future release.
44
43
45
44
:fist_right:**Pull requests are welcome** for non-autogenerated parts of `schema_utils`.
A type-safe implementation of the official Model Context Protocol (MCP) schema in Rust.
14
13
15
14
The MCP schemas in this repository are [automatically generated](#how-are-schemas-generated) from the official Model Context Protocol, ensuring they are always up-to-date and aligned with the latest official specifications.
@@ -18,13 +17,13 @@ The MCP schemas in this repository are [automatically generated](#how-are-schema
18
17
19
18
-[Features](#features)
20
19
-[How can this crate be used?](#how-can-this-crate-be-used)
21
-
-[What this crate doesn't include?](#warning-what-this-crate-doesnt-include)
20
+
-[What is not included in this crate?](#warning-what-is-not-included-in-this-crate)
22
21
-[Schema Versions](#schema-versions)
23
22
-[Currently available versions](#currently-available-versions)
24
23
-[How to switch between different schema versions?](#how-to-switch-between-different-schema-versions)
25
24
-[How are Schemas generated?](#how-are-schemas-generated)
26
25
-[What is `schema_utils`?](#what-is-schema_utils)
27
-
-[What SchemaUtils does?](#what-schemautils-does)
26
+
-[What does the schema_utils do?](#what-does-the-schema_utils-do)
28
27
-[Usage Examples](#usage-examples)
29
28
-[Detecting an InitializeRequest Message on an MCP Server](#detecting-an-initializerequest-message-on-an-mcp-server)
30
29
-[Creating an InitializeResult Response on an MCP Server](#creating-an-initializeresult-response-on-an-mcp-server)
@@ -37,10 +36,10 @@ The MCP schemas in this repository are [automatically generated](#how-are-schema
37
36
38
37
## Features
39
38
40
-
-:jigsaw: Type-safe implementation of the MCP protocol specification.
41
-
-:gem: Auto-generated schemas are always synchronized with the official schema specifications.
42
-
-:scroll: Includes all schema versions, including draft versions for early adoption.
43
-
-:hammer_and_pick: Complimentary schema utility module (schema_utils) to boost productivity and ensure development integrity.
39
+
-🧩 Type-safe implementation of the MCP protocol specification.
40
+
-💎 Auto-generated schemas are always synchronized with the official schema specifications.
41
+
-📜 Includes all schema versions, including draft versions for early adoption.
42
+
-🛠 Complimentary schema utility module (schema_utils) to boost productivity and ensure development integrity.
44
43
45
44
## How can this crate be used?
46
45
@@ -53,7 +52,7 @@ This crate includes the schema with `serialization` / `deserialization` support
53
52
This crate could be used for developing an **MCP Server**, **MCP Client**, or even an **MCP Host** in Rust.
54
53
For more information on the MCP architecture, refer to the [official documentation](https://spec.modelcontextprotocol.io/specification).
55
54
56
-
## :warning: What this crate doesn't include?
55
+
## ⚠️ What is not included in this crate?
57
56
58
57
This crate **only** provides an implementation of the MCP schema.
59
58
This crate is not intended to provide an MCP Transport implementation for sending and receiving MCP messages.
@@ -101,7 +100,8 @@ Schemas are generated from the official `schema.ts` and `schema.json` files avai
101
100
102
101
Using a customized version of [typify](https://github.com/oxidecomputer/typify), along with additional pre-processing and post-processing steps, the schema specifications are transformed into Rust code.
103
102
104
-
> [!NOTE]
103
+
### 📌 Note
104
+
105
105
> The code used to generate schemas from `schema.ts` and `schema.json` is not included in this repository. However, I am considering making it available as a CLI tool in the future, allowing developers to generate MCP schemas as Rust code that can be directly integrated into their projects.
106
106
107
107
## What is `schema_utils`?
@@ -114,13 +114,15 @@ To streamline development, improve compile-time type checking, and reduce the po
114
114
115
115
Please refer to [schema_utils.rs](src/generated_schema/2024_11_05/schema_utils.rs) for more details.
116
116
117
-
> [!NOTE]
117
+
### 📌 Note
118
+
118
119
> Using schema_utils is optional. It is enabled by default through the schema_utils Cargo feature and can be used from `rust_mcp_schema::schema_utils`.
120
+
119
121
> If you prefer not to use schema_utils, you can directly work with the enums and structs provided in schema.rs, adapting them to your needs and creating your own utility types and functions around them.
120
122
121
123
Visit [Usage Examples (Without `Using schema_utils`)](#usage-examples-without-utilizing-schema_utils) to see an alternative approach.
122
124
123
-
### What SchemaUtils Does?
125
+
### What does the schema_utils do?
124
126
125
127
The official schema defines a unified `JsonrpcMessage` type that encompasses all messages and notifications within the MCP protocol.
0 commit comments