- 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>
83 lines
1.6 KiB
Markdown
83 lines
1.6 KiB
Markdown
# 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:
|
|
|
|
```json
|
|
{
|
|
"Mcp": {
|
|
"Servers": [
|
|
{
|
|
"Name": "codex-server",
|
|
"Transport": {
|
|
"Type": "Stdio",
|
|
"Command": "dotnet",
|
|
"Args": ["run", "--project", "/path/to/CodexMcpServer/CodexMcpServer.csproj"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
```
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# 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 point
|
|
- `Services/CodexSearchService.cs` - Search functionality
|
|
- `Services/DocumentService.cs` - Document retrieval
|
|
- `appsettings.json` - MCP client configuration
|