mcpField
M
MCP Text Transform Server

MCP Text Transform Server

Local
github.com/msv2017Developer Tools0Updated 74w ago

About MCP Text Transform Server

MCP Text Transform Server is a C# .NET 9 server for clients that need text case conversion. It provides Capital Case and snake_case tools, including handling camelCase and PascalCase input.

Key features

  1. 01Convert text to Capital Case
  2. 02Convert text to snake_case
  3. 03Split camelCase and PascalCase words
  4. 04Communicate over STDIO with JSON-RPC

Use cases

  1. 01Format identifiers as Capital Case
  2. 02Convert identifiers to snake_case
  3. 03Transform camelCase or PascalCase input

MCP support

The server exposes text transformation tools to MCP clients through STDIO using JSON-RPC. Its tools can be discovered and called through the MCP interface.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Text Transform Server

A Model Context Protocol (MCP) server implementation in C# .NET 9 that provides text transformation tools. This server is compatible with Claude Desktop and other MCP clients.

📖 Learn more about MCP: Visit the official Model Context Protocol documentation for comprehensive guides and examples.

✨ Features

This MCP server provides two powerful text transformation tools:

  1. CapitalCase Tool (capital_case)

    • Converts text to Capital Case (Title Case) format
    • Handles camelCase/PascalCase by intelligently adding spaces
    • Example: "camelCaseExample" → "Camel Case Example"
  2. SnakeCase Tool (snake_case)

    • Converts text to snake_case format
    • Handles camelCase, PascalCase, and spaces
    • Example: "HelloWorld" → "hello_world"

🏗️ Architecture

This project uses the official Model Context Protocol SDK and follows modern C# practices:

  • MCP Protocol Compliance: Uses ModelContextProtocol NuGet package
  • STDIO Transport: Communicates via standard input/output (JSON-RPC)
  • Attribute-Based Tools: Simple [McpServerTool] decoration
  • Dependency Injection: Built-in .NET DI container
  • Structured Logging: Configured for MCP compatibility (stderr)
  • Modern C# Features: .NET 9, nullable reference types, async patterns

📁 Project Structure

McpServer/
├── Tools/                     # MCP tool implementations
│   └── TextTransformTools.cs  # Capital case & snake case tools
├── Program.cs                 # MCP server entry point
├── McpServer.csproj          # Project file with MCP SDK
└── README.md                 # This documentation

🚀 Getting Started

Prerequisites
  • .NET 9.0 SDK or later
  • Claude Desktop (for testing MCP integration)
Building the Server
# Clone and build
git clone <repository-url>
cd test-mcp-server
dotnet build

# Test the server
dotnet run
Testing the Tools

The server provides these text transformation capabilities:

Input: "camelCaseExample"
├── CapitalCase → "Camel Case Example"  
└── SnakeCase   → "camel_case_example"

Input: "Hello World"
├── CapitalCase → "Hello World"
└── SnakeCase   → "hello_world"

🖥️ Claude Desktop Integration

To use this MCP server with Claude Desktop, add the following configuration:

Step 1: Locate Claude Desktop Config

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

Step 2: Add Server Configuration
{
  "mcpServers": {
    "text-transform": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "/path/to/your/test-mcp-server/McpServer.csproj",
        "--no-build"
      ]
    }
  }
}

Replace /path/to/your/test-mcp-server with your actual project path:

Windows example:

{
  "mcpServers": {
    "text-transform": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "C:\\Users\\YourName\\projects\\test-mcp-server\\McpServer.csproj",
        "--no-build"
      ]
    }
  }
}

macOS/Linux example:

{
  "mcpServers": {
    "text-transform": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "/home/username/projects/test-mcp-server/McpServer.csproj",
        "--no-build"
      ]
    }
  }
}

Important notes:

  • Use absolute paths to the McpServer.csproj file
  • Use double backslashes (\\) on Windows for JSON escaping
  • Ensure the project file path exists
  • The --no-build flag speeds up server startup (recommended)
Step 3: Restart Claude Desktop

After saving the configuration, restart Claude Desktop. The text transformation tools will be available in your conversations.

Step 4: Test in Claude Desktop

Try these prompts to test the integration:

"Please convert 'HelloWorldExample' to capital case"
"Transform 'My Example Text' to snake_case format"  
"Convert 'camelCaseVariable' to title case"

🔧 Development

Adding New Tools

To add new MCP tools, simply add methods to the TextTransformTools class:

[McpServerTool]
[Description("Your tool description")]
public static string YourTool([Description("Input parameter")] string input)
{
    // Your transformation logic
    return transformedText;
}
Testing Locally
# Build and run
dotnet run

# Test with JSON-RPC (the server expects MCP protocol messages)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | dotnet run

🛠️ Troubleshooting

Claude Desktop Not Detecting MCP Server

If Claude Desktop doesn't show the text transformation tools, follow these steps:

1. Verify Server Works Locally
# Test the server responds to MCP commands:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | dotnet run
2. Check Claude Desktop Configuration

Location of config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Exact configuration format:

{
  "mcpServers": {
    "text-transform": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "/path/to/your/test-mcp-server/McpServer.csproj",
        "--no-build"
      ]
    }
  }
}

Replace /path/to/your/test-mcp-server with your actual project path:

Windows:

"args": [
  "run",
  "--project",
  "C:\\Users\\YourName\\projects\\test-mcp-server\\McpServer.csproj",
  "--no-build"
]

macOS/Linux:

"args": [
  "run",
  "--project",
  "/home/username/projects/test-mcp-server/McpServer.csproj",
  "--no-build"
]

Important notes:

  • Use absolute paths to the McpServer.csproj file
  • Use double backslashes (\\) on Windows for JSON escaping
  • Ensure the project file path exists and is correct
  • The command should be dotnet (not full path)
3. Common Issues
  1. "Server not found" in Claude Desktop

    • Verify the file path in claude_desktop_config.json exists
    • Ensure the project builds successfully (dotnet build)
    • Check that .NET 9 SDK is installed (dotnet --version)
    • Try using forward slashes / instead of backslashes in paths
  2. Server starts but tools not available

    • Restart Claude Desktop completely after configuration changes
    • Check Claude Desktop's console/logs for error messages
    • Verify the server name in config matches exactly (text-transform)
  3. Build errors

    • Run dotnet restore to ensure all NuGet packages are installed
    • Verify you have .NET 9.0 SDK or later
    • Try dotnet clean followed by dotnet build
4. Advanced Debugging

Test with manual JSON-RPC:

# Initialize the server
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | dotnet run

# List available tools  
echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}' | dotnet run

# Test tool execution
echo '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "CapitalCase", "arguments": {"text": "hello world"}}}' | dotnet run

Check Claude Desktop logs:

  • Windows: Look in Event Viewer or Claude's application data folder
  • macOS: Use Console.app to view logs
  • Linux: Check system logs or run Claude from terminal
MCP Protocol Details
  1. Server starts but tools not available

    • Restart Claude Desktop after configuration changes
    • Check the server logs in Claude Desktop's console
  2. Build errors

    • Run dotnet restore to ensure all NuGet packages are installed
    • Verify you have .NET 9.0 SDK or later
MCP Protocol Details

This server implements the Model Context Protocol specification:

  • Transport: STDIO (JSON-RPC over stdin/stdout)
  • Protocol Version: Compatible with MCP clients
  • Tool Discovery: Automatic via [McpServerTool] attributes
  • Error Handling: Standard JSON-RPC error responses

For more details about the MCP protocol, see the official documentation.

📚 Technical Details

MCP SDK Features Used
  • ModelContextProtocol v0.2.0-preview.2
  • STDIO transport for Claude Desktop compatibility
  • Attribute-based tool registration
  • Automatic parameter validation and documentation
Dependencies
<PackageReference Include="ModelContextProtocol" Version="0.2.0-preview.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Add your new MCP tools or enhancements
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

🔮 Roadmap

  • Add more text transformation tools (kebab-case, UPPER_CASE, etc.)
  • Implement text validation and sanitization tools
  • Add support for batch text processing
  • Create comprehensive test suite
  • Add performance benchmarks "ServerName": "Text Transform MCP Server", "Version": "1.0.0", "Port": 8080, "Logging": { "LogLevel": "Information", "EnableStructuredLogging": true } } }

## Health Check

A health check endpoint is available at `/health` to verify the server status.

## Development

### Code Style

The project uses `.editorconfig` for consistent code formatting and follows:

- PascalCase for classes, methods, properties
- camelCase for private fields and parameters
- Underscore prefix for private fields (`_fieldName`)
- File-scoped namespaces
- Nullable reference types enabled

### Logging

Structured logging is implemented using `ILogger<T>` with appropriate log levels:

- **Debug**: Detailed transformation steps
- **Information**: Tool execution and server lifecycle
- **Warning**: Invalid inputs or missing tools
- **Error**: Exceptions and failures

### Testing

The project structure supports unit testing with:

- Dependency injection for testability
- Interface-based programming
- Separation of concerns

## MCP Protocol

This server implements the Model Context Protocol for integration with MCP-compatible clients. The tools can be discovered and executed through the standard MCP tool calling interface.

## License

This project is provided as-is for educational and development purposes.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.