custom-context-mcp
1
The Custom Context MCP Server is designed to structure and extract data from text using JSON templates. It offers tools to transform text to JSON, enabling the organization of AI-generated text into structured formats. The server is optimized for text-to-JSON transformations and supports development and debugging features like hot reloading and visual debugging.
Custom Context MCP Server
This Model Context Protocol (MCP) server provides tools for structuring and extracting data from text according to JSON templates.
Features
Text-to-JSON Transformation
- Group and structure text based on JSON templates with placeholders
- Extract information from AI-generated text into structured JSON formats
- Support for any arbitrary JSON structure with nested placeholders
- Intelligent extraction of key-value pairs from text
- Process AI outputs into structured data for downstream applications
Usage
This MCP server provides two main tools:
1. Group Text by JSON
This tool generates a prompt for an AI to group text according to the template's structure.
2. Text to JSON
This tool converts the grouped text output into a structured JSON object based on the original template.
Example Workflow
- Define a JSON template with placeholders.
- Use
group-text-by-json
to create a prompt for AI. - Send the prompt to an AI model and receive grouped text.
- Use
text-to-json
to convert the grouped text to JSON.
Development
Prerequisites
- Node.js v18 or higher
- npm or yarn
Build and Run
- Install dependencies
- Build the project
- Run the server
- Development with hot reloading