Skip to content

Commit a9ad676

Browse files
committed
Merge branch 'main' of https://github.com/modelcontextprotocol/csharp-sdk into copilot/fix-binary-data-encoding
2 parents 05e906c + a3ce9e9 commit a9ad676

196 files changed

Lines changed: 13002 additions & 1646 deletions

File tree

Some content is hidden

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

.github/workflows/ci-build-test.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
- "*.props"
1717
- "Makefile"
1818
- "global.json"
19+
- "package.json"
20+
- "package-lock.json"
1921
- "src/**"
2022
- "tests/**"
2123
- "samples/**"
@@ -47,36 +49,24 @@ jobs:
4749
10.0.x
4850
9.0.x
4951
50-
# NetFX testing on non-Windows requires mono
51-
- name: 🔧 Setup Mono
52-
if: runner.os == 'Linux'
53-
run: sudo apt-get install -y mono-devel
54-
55-
- name: 🔧 Setup Mono on macOS
56-
if: runner.os == 'macOS'
57-
run: brew install mono
58-
5952
- name: 🔧 Set up Node.js
6053
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6154
with:
6255
node-version: '20'
6356

64-
- name: 📦 Install dependencies for tests
65-
run: npm install @modelcontextprotocol/server-everything@2025.12.18
66-
67-
- name: 📦 Install dependencies for tests
68-
run: npm install @modelcontextprotocol/server-memory
69-
70-
# Keep version in sync with McpConformanceVersion in Directory.Packages.props
71-
- name: 📦 Install conformance test runner
72-
run: npm install @modelcontextprotocol/conformance@0.1.10
57+
- name: 📦 Install pinned npm dependencies for tests
58+
run: npm ci
7359

7460
- name: 🏗️ Build
7561
run: make build CONFIGURATION=${{ matrix.configuration }}
7662

7763
- name: 🧪 Test
7864
run: make test CONFIGURATION=${{ matrix.configuration }}
7965

66+
- name: 🧪 AOT Compatibility
67+
if: matrix.configuration == 'Release'
68+
run: make test-aot CONFIGURATION=${{ matrix.configuration }}
69+
8070
- name: 📦 Pack
8171
if: matrix.configuration == 'Release'
8272
run: make pack CONFIGURATION=${{ matrix.configuration }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ _ReSharper*/
3434
**/packages/*
3535
!**/packages/build/
3636

37+
# npm
38+
node_modules/
39+
3740
# MSTest test Results
3841
[Tt]est[Rr]esult*/
3942
[Bb]uild[Ll]og.*

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@
4545
<!-- Don't use x64 when running netfx test procs on Windows ARM -->
4646
<PreferNativeArm64>true</PreferNativeArm64>
4747
</PropertyGroup>
48+
49+
<PropertyGroup>
50+
<!-- Shared target frameworks for test projects and test support projects. net472 is only included on Windows. -->
51+
<DefaultTestTargetFrameworks>net10.0;net9.0;net8.0</DefaultTestTargetFrameworks>
52+
<DefaultTestTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(DefaultTestTargetFrameworks);net472</DefaultTestTargetFrameworks>
53+
</PropertyGroup>
4854
</Project>

Directory.Packages.props

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<System8Version>8.0.22</System8Version>
55
<System9Version>9.0.11</System9Version>
6-
<System10Version>10.0.2</System10Version>
7-
<MicrosoftExtensionsVersion>10.2.0</MicrosoftExtensionsVersion>
8-
<!-- Pin the conformance tester Node package version for CI stability.
9-
Keep in sync npm install step at ci-build-test.yml -->
10-
<McpConformanceVersion>0.1.10</McpConformanceVersion>
6+
<System10Version>10.0.3</System10Version>
7+
<MicrosoftExtensionsVersion>10.3.0</MicrosoftExtensionsVersion>
118
</PropertyGroup>
129

1310
<!-- Product dependencies shared -->
1411
<ItemGroup>
1512
<PackageVersion Include="Microsoft.Extensions.AI" Version="$(MicrosoftExtensionsVersion)" />
1613
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
14+
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="$(System10Version)" />
15+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="$(System10Version)" />
1716
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(System10Version)" />
1817
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(System10Version)" />
1918
</ItemGroup>
@@ -63,8 +62,8 @@
6362

6463
<!-- Testing dependencies -->
6564
<ItemGroup>
66-
<PackageVersion Include="Anthropic" Version="12.2.0" />
67-
<PackageVersion Include="coverlet.collector" Version="6.0.4">
65+
<PackageVersion Include="Anthropic" Version="12.5.0" />
66+
<PackageVersion Include="coverlet.collector" Version="8.0.0">
6867
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6968
<PrivateAssets>all</PrivateAssets>
7069
</PackageVersion>
@@ -88,11 +87,11 @@
8887
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
8988
<PackageVersion Include="Serilog.Sinks.Debug" Version="3.0.0" />
9089
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
91-
<PackageVersion Include="Serilog" Version="4.3.0" />
90+
<PackageVersion Include="Serilog" Version="4.3.1" />
9291
<PackageVersion Include="System.Linq.AsyncEnumerable" Version="$(System10Version)" />
9392
<PackageVersion Include="xunit.v3" Version="3.2.2" />
9493
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
9594
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
96-
<PackageVersion Include="JsonSchema.Net" Version="8.0.5" />
95+
<PackageVersion Include="JsonSchema.Net" Version="9.1.0" />
9796
</ItemGroup>
9897
</Project>

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ test: build
3030
-- \
3131
RunConfiguration.CollectSourceInformation=true
3232

33+
test-aot:
34+
dotnet publish tests/ModelContextProtocol.AotCompatibility.TestApp/ModelContextProtocol.AotCompatibility.TestApp.csproj --configuration $(CONFIGURATION) -o $(ARTIFACT_PATH)/aot-publish
35+
$(ARTIFACT_PATH)/aot-publish/ModelContextProtocol.AotCompatibility.TestApp
36+
3337
pack: restore
3438
dotnet pack --no-restore --configuration $(CONFIGURATION)
3539

ModelContextProtocol.slnx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@
7070
</Folder>
7171
<Folder Name="/tests/">
7272
<Project Path="tests/ModelContextProtocol.Analyzers.Tests/ModelContextProtocol.Analyzers.Tests.csproj" />
73+
<Project Path="tests/ModelContextProtocol.AotCompatibility.TestApp/ModelContextProtocol.AotCompatibility.TestApp.csproj" />
7374
<Project Path="tests/ModelContextProtocol.AspNetCore.Tests/ModelContextProtocol.AspNetCore.Tests.csproj" />
7475
<Project Path="tests/ModelContextProtocol.ConformanceClient/ModelContextProtocol.ConformanceClient.csproj" />
7576
<Project Path="tests/ModelContextProtocol.ConformanceServer/ModelContextProtocol.ConformanceServer.csproj" />
7677
<Project Path="tests/ModelContextProtocol.TestOAuthServer/ModelContextProtocol.TestOAuthServer.csproj" />
7778
<Project Path="tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj" />
7879
<Project Path="tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj" />
7980
<Project Path="tests/ModelContextProtocol.TestSseServer/ModelContextProtocol.TestSseServer.csproj" />
81+
<Project Path="tests/ModelContextProtocol.ExperimentalApiRegressionTest/ModelContextProtocol.ExperimentalApiRegressionTest.csproj" />
8082
</Folder>
8183
</Solution>

SECURITY.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Security Policy
2-
Thank you for helping us keep the SDKs and systems they interact with secure.
2+
3+
Thank you for helping keep the Model Context Protocol and its ecosystem secure.
34

45
## Reporting Security Issues
56

6-
This SDK is maintained by [Anthropic](https://www.anthropic.com/) as part of the Model Context Protocol project.
7+
If you discover a security vulnerability in this repository, please report it through
8+
the [GitHub Security Advisory process](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability)
9+
for this repository.
710

8-
The security of our systems and user data is Anthropic’s top priority. We appreciate the work of security researchers acting in good faith in identifying and reporting potential vulnerabilities.
11+
Please **do not** report security vulnerabilities through public GitHub issues, discussions,
12+
or pull requests.
913

10-
Our security program is managed on HackerOne and we ask that any validated vulnerability in this functionality be reported through their [submission form](https://hackerone.com/anthropic-vdp/reports/new?type=team&report_type=vulnerability).
14+
## What to Include
1115

12-
## Vulnerability Disclosure Program
16+
To help us triage and respond quickly, please include:
1317

14-
Our Vulnerability Program Guidelines are defined on our [HackerOne program page](https://hackerone.com/anthropic-vdp).
18+
- A description of the vulnerability
19+
- Steps to reproduce the issue
20+
- The potential impact
21+
- Any suggested fixes (optional)

0 commit comments

Comments
 (0)