Skip to content

Commit c8c974a

Browse files
Add a markdown link checker (#17)
* Add a markdown link checker * Fix broken link * Fix more broken links
1 parent 3e4dd01 commit c8c974a

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check Markdown links
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
markdown-link-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@main
15+
- name: Markup Link Checker (mlc)
16+
uses: becheran/mlc@v0.15.4

README.MD

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The official C# SDK for the [Model Context Protocol](https://modelcontextprotoco
1010
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.
1111

1212
For more information about MCP:
13+
1314
- [Official Documentation](https://modelcontextprotocol.io/)
1415
- [Protocol Specification](https://spec.modelcontextprotocol.io/)
1516
- [GitHub Organization](https://github.com/modelcontextprotocol)
@@ -19,12 +20,13 @@ For more information about MCP:
1920
To get started writing a client, the `McpClientFactory.CreateAsync` method is used to instantiate and connect an `IMcpClient`
2021
to a server, with details about the client and server specified in `McpClientOptions` and `McpServerConfig` objects.
2122
Once you have an `IMcpClient`, you can interact with it, such as to enumerate all available tools and invoke tools.
23+
2224
```csharp
2325
McpClientOptions options = new()
2426
{
2527
ClientInfo = new() { Name = "TestClient", Version = "1.0.0" }
2628
};
27-
29+
2830
McpServerConfig config = new()
2931
{
3032
Id = "everything",
@@ -36,7 +38,7 @@ McpServerConfig config = new()
3638
["arguments"] = "-y @modelcontextprotocol/server-everything",
3739
}
3840
};
39-
41+
4042
var client = await McpClientFactory.CreateAsync(config, options);
4143

4244
// Print the list of tools available from the server.
@@ -55,11 +57,12 @@ var result = await client.CallToolAsync(
5557
Console.WriteLine(result.Content.First(c => c.Type == "text").Text);
5658
```
5759

58-
You can find samples demonstrating how to use ModelContextProtocol with an LLM SDK in the [samples](samples) directory, and also refer to the [IntegrationTests](test/ModelContextProtocol.IntegrationTests) project for more examples. Additional examples and documentation will be added as in the near future.
60+
You can find samples demonstrating how to use ModelContextProtocol with an LLM SDK in the [samples](samples) directory, and also refer to the [tests](tests/ModelContextProtocol.Tests) project for more examples. Additional examples and documentation will be added as in the near future.
5961

6062
Clients can connect to any MCP server, not just ones created using this library. The protocol is designed to be server-agnostic, so you can use this library to connect to any compliant server.
6163

6264
Tools can be exposed easily as `AIFunction` instances so that they are immediately usable with `IChatClient`s.
65+
6366
```csharp
6467
// Get available functions.
6568
IList<AIFunction> tools = await client.GetAIFunctionsAsync();
@@ -103,6 +106,7 @@ public static class EchoTool
103106
```
104107

105108
More control is also available, with fine-grained control over configuring the server and how it should handle client requests. For example:
109+
106110
```csharp
107111
using ModelContextProtocol.Protocol.Transport;
108112
using ModelContextProtocol.Protocol.Types;

src/ModelContextProtocol/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ The official C# SDK for the [Model Context Protocol](https://modelcontextprotoco
1010
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.
1111

1212
For more information about MCP:
13+
1314
- [Official Documentation](https://modelcontextprotocol.io/)
1415
- [Protocol Specification](https://spec.modelcontextprotocol.io/)
1516
- [GitHub Organization](https://github.com/modelcontextprotocol)
1617

1718
## Getting Started (Client)
1819

1920
Then create a client and start using tools, or other capabilities, from the servers you configure:
21+
2022
```csharp
2123
McpClientOptions options = new()
2224
{
2325
ClientInfo = new() { Name = "TestClient", Version = "1.0.0" }
2426
};
25-
27+
2628
McpServerConfig config = new()
2729
{
2830
Id = "everything",
@@ -34,7 +36,7 @@ McpServerConfig config = new()
3436
["arguments"] = "-y @modelcontextprotocol/server-everything",
3537
}
3638
};
37-
39+
3840
var client = await McpClientFactory.CreateAsync(config, options);
3941

4042
// Print the list of tools available from the server.
@@ -57,13 +59,14 @@ Note that you should pass CancellationToken objects suitable for your use case,
5759

5860
It is also highly recommended that you pass a proper LoggerFactory instance to the factory constructor, to enable logging of MCP client operations.
5961

60-
You can find samples demonstrating how to use ModelContextProtocol with an LLM SDK in the [samples](samples) directory, and also refer to the [IntegrationTests](test/ModelContextProtocol.IntegrationTests) project for more examples.
62+
You can find samples demonstrating how to use ModelContextProtocol with an LLM SDK in the [samples](https://github.com/modelcontextprotocol/csharp-sdk/tree/main/samples) directory, and also refer to the [tests](https://github.com/modelcontextprotocol/csharp-sdk/tree/main/tests/ModelContextProtocol.Tests) project for more examples.
6163

6264
Additional examples and documentation will be added as in the near future.
6365

6466
Remember you can connect to any MCP server, not just ones created using ModelContextProtocol. The protocol is designed to be server-agnostic, so you can use this library to connect to any compliant server.
6567

6668
Tools can be exposed easily as `AIFunction` instances so that they are immediately usable with `IChatClient`s.
69+
6770
```csharp
6871
// Get available functions.
6972
IList<AIFunction> tools = await client.GetAIFunctionsAsync();
@@ -107,6 +110,7 @@ public static class EchoTool
107110
```
108111

109112
More control is also available, with fine-grained control over configuring the server and how it should handle client requests. For example:
113+
110114
```csharp
111115
using ModelContextProtocol.Protocol.Transport;
112116
using ModelContextProtocol.Protocol.Types;
@@ -174,4 +178,4 @@ await Task.Delay(Timeout.Infinite);
174178

175179
## License
176180

177-
This project is licensed under the [MIT License](LICENSE).
181+
This project is licensed under the [MIT License](https://github.com/modelcontextprotocol/csharp-sdk/blob/main/LICENSE).

0 commit comments

Comments
 (0)