Research conducted on modern AI coding assistants (Cursor, GitHub Copilot, Cline,
Aider, Windsurf, Replit Agent) to understand architecture patterns, context management,
code editing workflows, and tool use protocols.
Key Decision: Pivoted from building full CLI (40-50h) to validation-driven MCP-first
approach (10-15h). Build 5 core CODEX MCP tools that work with ANY coding assistant,
validate adoption over 2-4 weeks, then decide on full CLI if demand proven.
Files:
- research/ai-systems/modern-coding-assistants-architecture.md (comprehensive research)
- research/ai-systems/codex-coding-assistant-implementation-plan.md (original CLI plan, preserved)
- research/ai-systems/codex-mcp-tools-implementation-plan.md (approved MCP-first plan)
- ideas/registry.json (updated with approved MCP tools proposal)
Architech Validation: APPROVED with pivot to MCP-first approach
Human Decision: Approved (pragmatic validation-driven development)
Next: Begin Phase 1 implementation (10-15 hours, 5 core MCP tools)
🤖 Generated with CODEX Research System
Co-Authored-By: The Archivist <archivist@codex.svrnty.io>
Co-Authored-By: The Architech <architech@codex.svrnty.io>
Co-Authored-By: Mathias Beaulieu-Duncan <mat@svrnty.io>
89 lines
2.3 KiB
C#
89 lines
2.3 KiB
C#
using Xunit;
|
|
using OpenHarbor.MCP.Gateway.Core.Models;
|
|
|
|
namespace OpenHarbor.MCP.Gateway.Core.Tests.Models;
|
|
|
|
/// <summary>
|
|
/// Unit tests for ServerConfig model following TDD approach.
|
|
/// Tests server configuration.
|
|
/// </summary>
|
|
public class ServerConfigTests
|
|
{
|
|
[Fact]
|
|
public void ServerConfig_WithStdioTransport_CreatesSuccessfully()
|
|
{
|
|
// Arrange & Act
|
|
var config = new ServerConfig
|
|
{
|
|
Id = "codex-server",
|
|
Name = "Codex MCP Server",
|
|
TransportType = "Stdio",
|
|
Command = "dotnet",
|
|
Args = new[] { "run", "--project", "CodexMcpServer.csproj" },
|
|
Enabled = true
|
|
};
|
|
|
|
// Assert
|
|
Assert.Equal("codex-server", config.Id);
|
|
Assert.Equal("Codex MCP Server", config.Name);
|
|
Assert.Equal("Stdio", config.TransportType);
|
|
Assert.Equal("dotnet", config.Command);
|
|
Assert.NotNull(config.Args);
|
|
Assert.Equal(3, config.Args.Length);
|
|
Assert.True(config.Enabled);
|
|
Assert.Null(config.BaseUrl);
|
|
}
|
|
|
|
[Fact]
|
|
public void ServerConfig_WithHttpTransport_CreatesSuccessfully()
|
|
{
|
|
// Arrange & Act
|
|
var config = new ServerConfig
|
|
{
|
|
Id = "api-server",
|
|
Name = "API MCP Server",
|
|
TransportType = "Http",
|
|
BaseUrl = "https://api.example.com/mcp"
|
|
};
|
|
|
|
// Assert
|
|
Assert.Equal("Http", config.TransportType);
|
|
Assert.Equal("https://api.example.com/mcp", config.BaseUrl);
|
|
Assert.Null(config.Command);
|
|
Assert.Null(config.Args);
|
|
}
|
|
|
|
[Fact]
|
|
public void ServerConfig_DefaultEnabled_IsTrue()
|
|
{
|
|
// Arrange & Act
|
|
var config = new ServerConfig
|
|
{
|
|
Id = "default-server"
|
|
};
|
|
|
|
// Assert
|
|
Assert.True(config.Enabled);
|
|
Assert.Equal("Stdio", config.TransportType);
|
|
}
|
|
|
|
[Fact]
|
|
public void ServerConfig_WithMetadata_StoresCorrectly()
|
|
{
|
|
// Arrange & Act
|
|
var config = new ServerConfig
|
|
{
|
|
Id = "meta-server",
|
|
Metadata = new Dictionary<string, string>
|
|
{
|
|
{ "priority", "high" },
|
|
{ "region", "us-west" }
|
|
}
|
|
};
|
|
|
|
// Assert
|
|
Assert.NotNull(config.Metadata);
|
|
Assert.Equal("high", config.Metadata["priority"]);
|
|
}
|
|
}
|