parent
85cefc23ff
commit
c9ace236a0
1 changed files with 864 additions and 274 deletions
11
README.MD
11
README.MD
|
|
@ -16,7 +16,7 @@ For more information about MCP:
|
|||
This project is in early development. While functional, it may undergo significant changes as the protocol and implementation evolve.
|
||||
|
||||
### Current Limitations
|
||||
- Only supports the Tool capability (Resources, Prompts, Sampling, and Roots not yet implemented)
|
||||
- Only supports the Tools, Resources, and Prompts capabilities (Sampling and Roots not yet implemented)
|
||||
- Only stdio transport is currently supported (HTTP/SSE transport coming soon)
|
||||
- Client library only - server implementation support may be added in the future
|
||||
- Provider-agnostic implementation focused purely on the MCP protocol
|
||||
|
|
@ -28,7 +28,8 @@ The library's current focus is on implementing the core MCP protocol, with the m
|
|||
|
||||
- MCP client implementation for .NET applications
|
||||
- Support for stdio transport
|
||||
- Tool discovery and execution
|
||||
- Support for Tool, Resource, and Prompt capabilities
|
||||
- Support for pagination and notifications
|
||||
- Async/await pattern throughout
|
||||
- Compatible with .NET 8.0 and later
|
||||
|
||||
|
|
@ -62,7 +63,7 @@ You can then retrieve an IMcpClient reference using the `id` of a server from th
|
|||
```csharp
|
||||
var client = await factory.GetClientAsync("everything");
|
||||
// Get the list of tools, for passing to an LLM
|
||||
var tools = await client.ListToolsAsync(CancellationToken.None);
|
||||
var tools = await client.ListToolsAsync();
|
||||
// Execute a tool, in practice this would normally be driven by LLM tool invocations
|
||||
var result = await client.CallToolAsync(
|
||||
"echo",
|
||||
|
|
@ -76,7 +77,9 @@ var result = await client.CallToolAsync(
|
|||
Console.WriteLine(result.Content.FirstOrDefault(c => c.Type == "text").Text);
|
||||
```
|
||||
|
||||
Note that you should pass CancellationToken objects suitable for your use case, to enable proper error handling, timeouts, etc.
|
||||
Note that you should pass CancellationToken objects suitable for your use case, to enable proper error handling, timeouts, etc. This example also does not paginate the tools list, which may be necessary for large tool sets. See the IntegrationTests project for an example of pagination, as well as examples of how to handle Prompts and Resources.
|
||||
|
||||
Additional examples and documentation will be added as in the near future.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue