- Renamed all directories: OpenHarbor.MCP.* → Svrnty.MCP.* - Updated all namespaces in 179 C# files - Renamed 20 .csproj files and 3 .sln files - Updated 193 documentation references - Updated 33 references in main CODEX codebase - Updated Codex.sln with new paths - Build verified: 0 errors Preparing for extraction to standalone repositories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.6 KiB
1.6 KiB
CodexMcpClient Sample
Sample console application demonstrating Svrnty.MCP.Client usage with CODEX MCP Server.
Purpose
Shows how to:
- Connect to an MCP server (CODEX knowledge base)
- Discover available tools
- Call tools with arguments
- Handle responses and errors
Prerequisites
- .NET 8.0 SDK
- Running CODEX MCP Server (from Svrnty.MCP.Server module)
Configuration
Edit appsettings.json to point to your CODEX MCP Server:
{
"Mcp": {
"Servers": [
{
"Name": "codex-server",
"Transport": {
"Type": "Stdio",
"Command": "dotnet",
"Args": ["run", "--project", "/path/to/CodexMcpServer/CodexMcpServer.csproj"]
}
}
]
}
}
Usage
# List available tools from CODEX server
dotnet run -- list-tools
# Search CODEX knowledge base
dotnet run -- search "architecture patterns"
# Get a specific document
dotnet run -- get-document <document-id>
# List all documents
dotnet run -- list-documents
# Filter by tag
dotnet run -- search-by-tag "design-pattern"
Example Output
$ dotnet run -- search "clean architecture"
Searching CODEX for: clean architecture
Found 5 results:
1. Clean Architecture Guide (ID: abc-123)
- Layers: Core, Infrastructure, API
- Score: 0.95
2. Dependency Rules (ID: def-456)
- Clean Architecture principles
- Score: 0.87
...
Files
Program.cs- Main CLI entry pointServices/CodexSearchService.cs- Search functionalityServices/DocumentService.cs- Document retrievalappsettings.json- MCP client configuration