- Home
- MCP servers
- CompText
CompText
- python
2
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"profrandom92-comptext-mcp-server": {
"command": "python",
"args": [
"-m",
"comptext_mcp.server"
],
"env": {
"NOTION_API_TOKEN": "your_token_here",
"COMPTEXT_DATABASE_ID": "your_db_id"
}
}
}
}You have a Python-based MCP server for the CompText DSL that exposes a native MCP interface, plus a REST API wrapper for convenient HTTP access. It enables fast Codex queries, module loading, and content retrieval with built-in validation, caching, and robust error handling so you can integrate CompText data into your workflows efficiently.
How to use
Connect to the MCP server from your MCP client to load modules, run searches, and fetch page content. Use the stdio MCP endpoint when you run the server locally with the Python runtime, or connect via an HTTP/REST wrapper if you prefer HTTP calls. The server offers endpoints to list modules, fetch module content, search the Codex, and retrieve statistics and tags. Ensure your client is configured to send JSON-RPC like requests to the MCP interface, and rely on the server’s input validation and sanitization to keep data consistent.
How to install
Follow these concrete steps to get up and running locally and ready for MCP client usage.
#Prerequisites
Python 3.10+
Notion API Token
CompText Database ID
#1. Clone the repository
git clone https://github.com/ProfRandom92/comptext-mcp-server.git
cd comptext-mcp-server
#2. Install dependencies
pip install -r requirements.txt
#3. Set up environment variables
cp .env.example .env
# Edit .env and insert your Notion credentials and database ID
#4. Start the MCP Server for Claude Desktop (stdio mode)
python -m comptext_mcp.server
#5. Start the REST API wrapper if you want HTTP access
python rest_api_wrapper.py
Configuration and usage notes
The server is designed to run in two modes: a local stdio MCP server for Claude Desktop and an optional REST API wrapper for HTTP access. The stdio server runs in its own process and reads configuration from environment variables. The REST API wrapper exposes HTTP endpoints that mirror core MCP actions such as loading modules, searching the Codex, and retrieving statistics. You can adjust environment variables and start commands to fit your development or deployment workflow.
Security and reliability
Security is ensured through input validation, query sanitization, and safe output handling. The server uses an exponential backoff retry strategy for external API calls and provides health checks so you can monitor readiness and liveness in production.
Deployment and environment
You can run the MCP server natively for local development or deploy via a packaging workflow that fits your infrastructure. The following environment variables are used for the local runtime configuration.
Available tools
list_modules
List all modules (A-M) available in the Codex
get_module
Load a specific module by name or identifier
get_command
Load the full content of a page/command
search
Search the Codex with a query and optional max_results
get_by_tag
Filter results by a specified tag
get_by_type
Filter results by type
get_statistics
Retrieve Codex statistics