Custom Context MCP Server logo

Custom Context MCP Server

by omer-ayhan

This Model Context Protocol (MCP) server provides tools for structuring and extracting data from text according to JSON templates. It enables text-to-JSON transformation for processing AI outputs into structured data.

View on GitHub

Last updated: N/A

What is Custom Context MCP Server?

The Custom Context MCP Server is a tool that allows you to structure and extract data from text using JSON templates. It provides functionalities to group text based on JSON templates and convert grouped text into structured JSON objects.

How to use Custom Context MCP Server?

The server offers two main tools: group-text-by-json and text-to-json. First, define a JSON template with placeholders. Use group-text-by-json to generate a prompt for an AI model. Send the prompt to the AI and receive grouped text. Finally, use text-to-json to convert the grouped text into a structured JSON object based on the original template.

Key features of Custom Context MCP Server

  • Text-to-JSON Transformation

  • Group and structure text based on JSON templates

  • Support for arbitrary JSON structures with nested placeholders

  • Intelligent extraction of key-value pairs from text

Use cases of Custom Context MCP Server

  • Extracting information from AI-generated text

  • Processing AI outputs into structured data for downstream applications

  • Structuring data for APIs

  • Data transformation and cleaning

FAQ from Custom Context MCP Server

What is a JSON template?

A JSON template is a JSON string with placeholders (e.g., <name>, <price>) that define the structure for extracting data from text.

How do I define placeholders in the JSON template?

Use angle brackets to define placeholders: <name>, <type>, <price>, etc.

What does the group-text-by-json tool do?

This tool analyzes the JSON template, extracts placeholder keys, and returns a prompt that guides the AI to extract information in a key-value format.

What does the text-to-json tool do?

This tool takes the grouped text output from the previous step and converts it into a structured JSON object based on the original template.

What are the prerequisites for running the server?

You need Node.js v18 or higher and npm or yarn installed.