MCPSERV.CLUB
omer-ayhan

Custom Context MCP Server

MCP Server

Transform text into structured JSON with AI prompts

Stale(50)
1stars
3views
Updated Apr 7, 2025

About

This MCP server transforms unstructured text into JSON by generating AI prompts based on user-defined templates and parsing the AI output into nested JSON objects.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Custom Context MCP Server – Overview

The Custom Context MCP Server addresses a common pain point for developers building AI‑powered applications: turning unstructured or semi‑structured text into reliable, machine‑readable data. When an AI assistant produces prose, bullet lists, or free‑form responses, downstream systems—databases, analytics pipelines, or other services—often require JSON to process the information. This server fills that gap by providing two tightly coupled tools that convert raw text into JSON objects according to user‑defined templates.

At its core, the server receives a JSON template that contains placeholders (e.g., , ). The first tool, Group Text by JSON, analyzes the template, extracts the placeholder keys, and crafts a prompt that instructs an AI model to organize its output around those keys. The second tool, Text to JSON, takes the AI’s grouped text and parses it back into a structured JSON object that mirrors the original template. This two‑step workflow ensures that even if an AI outputs information in a loosely formatted manner, the final data will adhere to a strict schema that can be validated and consumed by other components.

Key capabilities include:

  • Template‑driven extraction: Support for arbitrary JSON structures, including deeply nested objects and arrays.
  • Placeholder flexibility: Placeholders can appear at any level of the template, allowing developers to model complex data shapes without manual parsing logic.
  • Intelligent key‑value pairing: The server automatically matches AI output lines to the corresponding placeholders, reducing boilerplate code for developers.
  • Extensibility: Since the server exposes its tools via MCP, any AI client that understands the protocol can integrate these capabilities seamlessly.

Typical use cases span a wide range of industries. A customer‑support chatbot can transform free‑form user complaints into structured tickets; an e‑commerce platform can convert product descriptions into catalog entries; a data‑science workflow can ingest interview transcripts and output JSON for natural‑language‑processing pipelines. In each scenario, the server eliminates the need for custom regex or manual parsing, accelerating development and improving data quality.

Integration into AI pipelines is straightforward: a developer defines the desired JSON schema, sends it to the group-text-by-json tool, passes the resulting prompt to an LLM, receives the grouped text, and finally feeds it into text-to-json. The MCP interface ensures that this process can be scripted, orchestrated, or embedded within larger microservice architectures. By providing a reliable bridge between unstructured AI output and structured data, the Custom Context MCP Server empowers developers to build more robust, maintainable, and scalable AI applications.