Skip to content

Commit 2c9fd37

Browse files
ElanHassonclaude
andauthored
Fix project configuration and documentation for MCP server (#14)
* fix: Correct project configuration - MCP server only, not dotnet tool Remove incorrect dotnet tool configuration that was causing packaging issues. This should be an MCP server only, not a global dotnet tool. - Set PackAsTool=false - Remove ToolCommandName - Set PackageType=McpServer only 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: Update README to use dnx instead of dotnet tool - Replace dotnet tool installation instructions with dnx - Update all MCP configuration examples to use dnx commands - Remove references to global dotnet tool installation - Update build documentation to reflect MCP package (not tool) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Set PackAsTool=true for MCP server PackAsTool should be true for MCP servers to enable proper packaging and distribution via dnx. Only removed dotnet tool specific properties like ToolCommandName. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent bb3f485 commit 2c9fd37

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ An MCP (Model Context Protocol) server that evaluates and executes C# scripts us
99
- 📚 NuGet package support via `#r "nuget: PackageName, Version"` directives
1010
- 🔒 Console output capture (safe for MCP stdio protocol)
1111
- ⚡ Comprehensive error handling for compilation and runtime errors
12-
- 🐳 Available as both Docker container and dotnet tool with volume mounting support
12+
- 🐳 Available as both Docker container and dnx package with volume mounting support
1313
- ✅ Full test coverage with NUnit and FluentAssertions
1414

1515
## Installation
1616

17-
### As a dotnet tool
17+
### Using dnx
1818

1919
```bash
20-
# Install globally
21-
dotnet tool install -g InfinityFlow.CSharp.Eval
20+
# Install via dnx
21+
dnx InfinityFlow.CSharp.Eval --version 1.0.0 --yes
2222

2323
# Run the tool
24-
infinityflow-csharp-eval
24+
dnx run InfinityFlow.CSharp.Eval
2525
```
2626

2727
### Using Docker
@@ -171,13 +171,14 @@ Add to your Cursor settings (`.cursor/mcp_settings.json` or via Settings UI):
171171
}
172172
```
173173

174-
Or if installed as a dotnet tool:
174+
Or if installed via dnx:
175175

176176
```json
177177
{
178178
"mcpServers": {
179179
"csharp-eval": {
180-
"command": "infinityflow-csharp-eval",
180+
"command": "dnx",
181+
"args": ["run", "InfinityFlow.CSharp.Eval"],
181182
"env": {
182183
"CSX_ALLOWED_PATH": "${workspaceFolder}/scripts"
183184
}
@@ -212,13 +213,14 @@ Add to your Claude Code configuration (`claude_desktop_config.json`):
212213

213214
Note: The volume mounting (`-v ${HOME}:${HOME}`) allows the tool to access .csx files from your filesystem.
214215

215-
Or if installed as a dotnet tool:
216+
Or if installed via dnx:
216217

217218
```json
218219
{
219220
"mcpServers": {
220221
"csharp-eval": {
221-
"command": "infinityflow-csharp-eval",
222+
"command": "dnx",
223+
"args": ["run", "InfinityFlow.CSharp.Eval"],
222224
"env": {
223225
"CSX_ALLOWED_PATH": "/Users/your-username/scripts"
224226
}
@@ -236,7 +238,8 @@ Create `.vscode/mcp.json`:
236238
"servers": {
237239
"csharp-eval": {
238240
"type": "stdio",
239-
"command": "infinityflow-csharp-eval"
241+
"command": "dnx",
242+
"args": ["run", "InfinityFlow.CSharp.Eval"]
240243
}
241244
}
242245
}
@@ -282,7 +285,7 @@ dotnet build
282285
# Run tests
283286
dotnet test
284287

285-
# Pack as dotnet tool
288+
# Pack as MCP package
286289
dotnet pack -c Release
287290
```
288291

src/InfinityFlow.CSharp.Eval/InfinityFlow.CSharp.Eval.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
88

9-
<!-- Set up the NuGet package to be an MCP server and dotnet tool -->
9+
<!-- Set up the NuGet package to be an MCP server -->
1010
<PackAsTool>true</PackAsTool>
11-
<ToolCommandName>infinityflow-csharp-eval</ToolCommandName>
12-
<PackageType>McpServer;DotnetTool</PackageType>
11+
<PackageType>McpServer</PackageType>
1312

1413
<!-- Set recommended package metadata -->
1514
<PackageReadmeFile>README.md</PackageReadmeFile>
@@ -31,9 +30,9 @@
3130
</ItemGroup>
3231

3332
<ItemGroup>
34-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
35-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
36-
<PrivateAssets>all</PrivateAssets>
33+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
34+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
<PrivateAssets>all</PrivateAssets>
3736
</PackageReference>
3837
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" />
3938
<PackageReference Include="Microsoft.Extensions.Hosting" />

0 commit comments

Comments
 (0)