Skip to content

intbot/ClawSharp

Repository files navigation

OpenClaw.NET Skills SDK

OpenClaw-focused C# Skills SDK that exposes [ClawTool] methods over MCP (JSON-RPC 2.0) via stdio.

Goals

  • Zero external runtime dependencies (uses System.Text.Json only)
  • NativeAOT-friendly design
  • Minimal, OpenClaw-first MCP server over stdio

Quick Start

Build the solution:

dotnet build -c Release

Run the host:

dotnet run -c Release --project src/OpenClaw.Net.Host

Define a Tool

Create a public static method and annotate it:

using OpenClaw.Net.Skills.Reflection;

public static class MySkills
{
    [ClawTool("Echo back the provided message.")]
    public static string Echo(string message) => message;
}

Stdio MCP Test

Pipe a JSON-RPC request into the host:

echo { "jsonrpc":"2.0", "id":1, "method":"list_tools" } | dotnet run -c Release --project src/OpenClaw.Net.Host

Registration Helper

Print a snippet for ~/.openclaw/openclaw.json:

dotnet run -c Release --project src/OpenClaw.Net.Host -- --register

This outputs a JSON block like:

{ "mcpServers": { "openclaw-net": { "command": "path-to-exe", "args": [] } } }

Assumption: the OpenClaw config shape includes mcpServers with a command and args. Adjust as needed for your OpenClaw version.

Tests

dotnet test -c Release --no-build

License

Licensed under the Apache License 2.0 with the Commons Clause. See LICENSE for details. You may use this code freely; the Commons Clause restricts selling a product or service whose value derives substantially from this software.

Non-Affiliation

This project is not affiliated with or endorsed by OpenClaw. It is an independent SDK.

About

.NET Skills for Open.Claw

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages