Repository avatar
Other Tools
v1.0.0
active

mcp

co.contraption/mcp

An MCP server that provides [describe what your server does]

Documentation

Contraption Company MCP

An MCP (Model Context Protocol) server for Contraption Company essay, built on Chroma Cloud.

How to Install

Contraption Company MCP is available as a hosted MCP server with no authentication.

FieldValue
Server URLhttps://mcp.contraption.co

How to configure in common clients

Cursor

Use the deep link to install directly in Cursor: Install Contraption Company MCP.

Or, create or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "contraption-company": {
      "url": "https://mcp.contraption.co"
    }
  }
}
ChatGPT
  1. Open Settings → Connectors.
  2. Click Create new connector.
  3. Set MCP Server URL to https://mcp.contraption.co.
  4. Leave authentication blank and save.
VS Code (Copilot Chat MCP)

Create or edit .vscode/mcp.json:

{
  "servers": {
    "contraption-company": {
      "type": "http",
      "url": "https://mcp.contraption.co"
    }
  }
}
Codex

Add to ~/.codex/config.toml:

[mcp_servers.contraption-company]
command = "npx"
args = ["mcp-remote", "--transport", "http", "https://mcp.contraption.co"]
Claude Code

Run in your terminal:

claude mcp add --transport http contraption-company https://mcp.contraption.co
OpenAI SDK (Python)
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5",
    input="List the newest Contraption Company blog posts.",
    tools=[
        {
            "type": "mcp",
            "server_label": "contraption-company",
            "server_url": "https://mcp.contraption.co",
            "require_approval": "never",
        }
    ],
)
print(response)

Features

  • Semantic Search: Uses Qwen3-Embedding-0.6B model for efficient semantic search
  • Automatic Indexing: Syncs with blog API on startup and via webhooks
  • Full Content Access: Uses Ghost Admin API to index all published content including members-only posts
  • Fast Performance: Powered by FastAPI and Chroma Cloud
  • Real-time Updates: Webhook support for instant post updates
  • Docker Ready: Includes Dockerfile for easy deployment
  • Well Tested: Comprehensive test suite with pytest

Run Locally

  1. Clone and install:
git clone <repository>
cd mcp
uv sync --all-extras
  1. Configure environment:
cp .env.example .env
# Edit .env with your credentials
  1. Run the server:
./run.sh
# Or: uv run python -m src.main

Docker

# Build
docker build -t contraption-mcp .

# Run
docker run -p 8000:8000 --env-file .env contraption-mcp

# Or use docker-compose
docker-compose up

Configuration

Running locally requires credentials for external services:

  • Ghost Admin API Key: From your Ghost Admin panel (Settings > Integrations)
  • Chroma Cloud Credentials: Tenant ID, Database, and API key from Chroma Cloud
  • Ghost Blog URL: Your Ghost blog's URL

MCP Tools

  • fetch(id=None, url=None, method="GET", headers=None, body=None): Fetch a single blog post via the MCP fetch contract using the canonical post URL as the identifier. Provide either the id returned by list_posts/search (which is the canonical URL) or a url; Ghost slugs and shorthand schemes are also accepted but responses always resolve to full URLs.
  • list_posts(sort_by, page, limit): List posts with pagination, returning canonical URLs as identifiers
  • search(query, limit): Semantic search across posts that emits canonical URLs for result IDs

API Endpoints

  • GET /: Server info (redirects to GitHub repo for non-MCP requests)
  • GET /health: Health check
  • POST /webhook/ghost/{secret}: Secure webhook endpoint for Ghost updates
  • /mcp/*: MCP protocol endpoints

Webhook Security

The webhook endpoint requires a secret token in the URL path for security. Configure it in Ghost Admin:

  1. Go to Settings → Integrations → Webhooks
  2. Set URL to: https://your-domain.com/webhook/ghost/{your-webhook-secret}
  3. Replace {your-webhook-secret} with the value from your .env file
  4. Select events: Post published, Post updated, Post deleted

Development

# Install dev dependencies
make dev

# Run tests
make test

# Lint and format
make format lint

# Run all checks
make check

License

MIT