Migrated from jbdevprimary/extended-data-types#61
Summary
Create an MCP (Model Context Protocol) server that provides natural language API documentation and usage guidance for all extended-data-types utilities. This server will function similarly to Context7, but specifically for the extended-data-types library, enabling AI agents to discover and effectively use the 90+ functions in this library.
Background
Extended-data-types provides a comprehensive utility library with:
- Serialization: YAML (with custom tags), JSON (via orjson), TOML, HCL2
- File Operations: Path resolution, Git repository detection, encoding detection, read/write
- Data Structures: Deep merging, flattening, filtering for maps and lists
- String Transformations: Case conversion (snake_case, camelCase, kebab-case), pluralization, humanization
- Type Utilities: Safe type conversion, special type handling, validation
- Export Utilities: Format-aware data export with GitHub Actions syntax escaping
The Kiro spec at .kiro/specs/ecosystem-foundation/ outlines this as a core component of the ecosystem foundation.
MCP Server Design
Tools to Implement
Following the Context7 pattern, the MCP server should expose these tools:
1. resolve-function-id
Resolves a function name or description to the exact extended-data-types function.
Input:
query (string): Function name or description to search for
Output:
- List of matching functions with:
- Function name
- Module path
- Category
- Brief description
- Parameter count
2. get-function-docs
Fetches comprehensive documentation for a specific function.
Input:
functionName (string): Exact function name from __all__ exports
includeExamples (boolean, optional): Include usage examples from tests
Output:
- Function signature with full type annotations
- Docstring with Args, Returns, Raises
- Usage examples extracted from test cases
- Related functions in same category
Function Categories
Organize functions into these categories for discovery:
| Category |
Functions |
Count |
| Serialization |
encode_yaml, decode_yaml, encode_json, decode_json, encode_toml, decode_toml, decode_hcl2, base64_encode, base64_decode |
9 |
| File Operations |
read_file, write_file, decode_file, delete_file, resolve_local_path, get_encoding_for_file_path, match_file_extensions, file_path_depth, file_path_rel_to_root, is_url |
10 |
| Git Integration |
get_parent_repository, get_repository_name, get_tld, clone_repository_to_temp |
4 |
| String Transformations |
to_snake_case, to_camel_case, to_kebab_case, to_pascal_case, humanize, pluralize, singularize, titleize, ordinalize |
9 |
| String Utilities |
bytestostr, lower_first_char, upper_first_char, removeprefix, removesuffix, sanitize_key, titleize_name, truncate |
8 |
| Map Operations |
deep_merge, flatten_map, filter_map, deduplicate_map, unhump_map, zipmap, all_values_from_map, first_non_empty_value_from_map, get_default_dict, create_merger |
10 |
| List Operations |
filter_list, flatten_list, split_list_by_type, split_dict_by_type |
4 |
| State Utilities |
is_nothing, are_nothing, any_non_empty, all_non_empty, all_non_empty_in_dict, all_non_empty_in_list, first_non_empty, yield_non_empty |
8 |
| Type Utilities |
typeof, strtobool, strtoint, strtofloat, strtodate, strtodatetime, strtotime, strtopath, convert_special_type, convert_special_types, reconstruct_special_type, reconstruct_special_types, make_hashable, get_default_value_for_type, get_primitive_type_for_instance_type |
15 |
| Matcher Utilities |
is_non_empty_match, is_partial_match |
2 |
| Stack Utilities |
get_caller, get_available_methods, filter_methods, get_inputs_from_docstring, get_unique_signature, update_docstring |
6 |
| Export/Import |
make_raw_data_export_safe, wrap_raw_data_for_export, unwrap_raw_data_from_import |
3 |
| Data Types |
FilePath, SortedDefaultDict |
2 |
Total: 90 functions/classes
Implementation Tasks
Phase 1: Core Infrastructure
Phase 2: Tool Implementation
Phase 3: Distribution
Phase 4: Documentation
Technical Requirements
Dependencies
[project.optional-dependencies]
mcp = [
"mcp>=1.0.0", # Model Context Protocol SDK
]
Entry Point
[project.scripts]
edt-mcp = "extended_data_types.mcp_server:main"
Configuration Example
{
"mcpServers": {
"extended-data-types": {
"command": "uvx",
"args": ["--from", "extended-data-types[mcp]", "edt-mcp"]
}
}
}
Success Criteria
- MCP server starts in < 2 seconds
- Function lookup responds in < 100ms
- All 90 functions are documented and discoverable
- Usage examples extracted from test suite
- Works with Claude, Cursor, VS Code, and other MCP clients
Related
Migrated from jbdevprimary/extended-data-types#61
Summary
Create an MCP (Model Context Protocol) server that provides natural language API documentation and usage guidance for all extended-data-types utilities. This server will function similarly to Context7, but specifically for the extended-data-types library, enabling AI agents to discover and effectively use the 90+ functions in this library.
Background
Extended-data-types provides a comprehensive utility library with:
The Kiro spec at
.kiro/specs/ecosystem-foundation/outlines this as a core component of the ecosystem foundation.MCP Server Design
Tools to Implement
Following the Context7 pattern, the MCP server should expose these tools:
1.
resolve-function-idResolves a function name or description to the exact extended-data-types function.
Input:
query(string): Function name or description to search forOutput:
2.
get-function-docsFetches comprehensive documentation for a specific function.
Input:
functionName(string): Exact function name from__all__exportsincludeExamples(boolean, optional): Include usage examples from testsOutput:
Function Categories
Organize functions into these categories for discovery:
Total: 90 functions/classes
Implementation Tasks
Phase 1: Core Infrastructure
src/extended_data_types/mcp_server/module structureExtendedDataTypesMCPServerclass with stdio protocolinspectmodule on__all__exportsPhase 2: Tool Implementation
resolve-function-idtool with fuzzy matchingget-function-docstool with full documentationPhase 3: Distribution
edt-mcporextended-data-types-mcpPhase 4: Documentation
Technical Requirements
Dependencies
Entry Point
Configuration Example
{ "mcpServers": { "extended-data-types": { "command": "uvx", "args": ["--from", "extended-data-types[mcp]", "edt-mcp"] } } }Success Criteria
Related
.kiro/specs/ecosystem-foundation/