SPEC.md•2.4 kB
# Development Automation Server Specification
## Overview
FastMCP server implementation providing development automation tools with focus on TDD and documentation management.
## Server Configuration
### Directory Structure
mcp-server/
├── prompts/ # Markdown prompt templates
├── cache/
│ ├── docs/ # Cached documentation
│ └── search / # Search results
├── tests/ # Generated test files
└── config/ # Server configuration
### Configuration Parameters
```python
@dataclass
class ServerConfig:
prompts_dir: Path = Path("./prompts")
cache_dir: Path = Path("./cache")
tests_dir: Path = Path("./tests")
```
### Core Components
#### Prompt Templates
test_generator.md - Creates test cases from spec
doc_extractor.md - Formats documentation for caching
spec_parser.md - Extracts requirements from free-form specs
#### Resource Endpoints
"docs://{library_name}" # Get cached library documentation
"spec://{spec_name}" # Get parsed specification
"spec://{spec_name}/tests" # Get generated tests for spec
"url://{encoded_url}" # Get cached URL content as markdown
#### Tools
```python
@mcp.tool()
def generate_tests(spec_name: str) -> str:
"""Generate test cases from a specification file"""
@mcp.tool()
def validate_tests(spec_name: str) -> str:
"""Validate that generated tests match specification requirements"""
@mcp.tool()
def suggest_test_improvements(test_file: str) -> str:
"""Analyze existing tests and suggest improvements for better coverage"""
```
### Server Implementation
Core Server Setup
```python
from mcp.server.fastmcp import FastMCP
from dataclasses import dataclass
from pathlib import Path
@dataclass
class ServerConfig:
prompts_dir: Path
cache_dir: Path
tests_dir: Path
@dataclass
class AppContext:
config: ServerConfig
def create_server(config: ServerConfig) -> FastMCP:
mcp = FastMCP(
"Development Automation Server",
dependencies=["pytest"]
)
for dir_path in [config.prompts_dir, config.cache_dir, config.tests_dir]:
dir_path.mkdir(parents=True, exist_ok=True)
return mcp
```
### Integration
continue.dev Configuration
```json
{
"mcpServers": [
{
"name": "Development Automation Server",
"command": "uv",
"args": ["run", "server.py"]
}
]
}
```
### Dependencies
FastMCP
pytest