Skip to main content

MCP server for ToothFairyAI documentation

Project description

ToothFairyAI Documentation MCP Server

A Model Context Protocol (MCP) server that exposes ToothFairyAI documentation, API specifications, and integration guides for AI assistants.

Features

  • Documentation Resources: Access 47+ markdown documentation pages
  • API Specifications: OpenAPI specs for main API, agents API, and voice API (90 endpoints)
  • Full-Text Search: Search across all documentation and API endpoints
  • Dual Transport Support: Run as HTTP server (remote) or stdio (local)
  • Health Checks: Built-in /health and /info endpoints (HTTP mode)

Quick Start

Local Development (HTTP Mode)

cd tf_mcp_server
python -m venv venv
source venv/bin/activate
pip install fastmcp uvicorn pydantic python-frontmatter

# Run the server (HTTP mode - default)
python -m tf_mcp_server.server

Local Development (stdio Mode)

For use with local MCP clients like Claude Code:

cd tf_mcp_server
source venv/bin/activate

# Run with stdio transport
python -m tf_mcp_server.server --stdio

# Or set environment variable
MCP_TRANSPORT=stdio python -m tf_mcp_server.server

Docker Deployment

# From repository root
docker build -t tf-mcp-server -f tf_mcp_server/Dockerfile.full .
docker run -p 8000:8000 tf-mcp-server

AWS ECS Deployment (Production)

Deployment is automated via GitHub Actions. The workflow triggers on pushes to development branch when changes are made to:

  • tf_mcp_server/**
  • docs/tf_docs/docs/**
  • docs/api_docs/public/**

GitHub Actions Workflow

See: .github/workflows/deployMcpServer-dev.yml

The workflow:

  1. Builds Docker image from tf_mcp_server/Dockerfile
  2. Pushes to ECR repository tf-mcp-server
  3. Updates ECS task definition
  4. Deploys to tf-dev-cluster

AWS Prerequisites

Before the workflow can run, create these resources in AWS:

  1. ECR Repository: tf-mcp-server
  2. ECS Task Definition: tf-mcp-server-dev-service
    • Container name: tf-mcp-server-dev-container
    • Port: 8000
    • Health check: curl -f http://localhost:8000/health || exit 1
  3. ECS Service: tf-mcp-server-dev-service
    • Cluster: tf-dev-cluster
    • Desired count: 1

Manual Deployment

To deploy manually or set up initial infrastructure:

cd tf_mcp_server/aws

# Set your AWS configuration
export AWS_REGION=ap-southeast-2
export VPC_ID=vpc-xxxxxxxxx
export SUBNET_IDS=subnet-xxx,subnet-yyy

# Deploy everything
./deploy.sh all

Management Commands

./deploy.sh status   # Get service status and endpoint URL
./deploy.sh logs     # View live logs
./deploy.sh destroy  # Delete all resources

Environment Variables

Variable Default Description
MCP_TRANSPORT http Transport type: stdio or http
MCP_HOST 0.0.0.0 Host to bind the server (HTTP mode only)
MCP_PORT 8000 Port to bind the server (HTTP mode only)
DOCS_PATH docs/tf_docs/docs Path to markdown documentation
API_DOCS_PATH docs/api_docs/public Path to API documentation
BASE_PATH (auto-detected) Base path to repository root

HTTP Endpoints

Endpoint Method Description
/sse GET SSE endpoint for MCP clients (Claude Code)
/health GET Health check for load balancers
/info GET Server information and stats

Health Check Response

{
  "status": "healthy",
  "server": "ToothFairyAI Documentation MCP",
  "docs_loaded": 47,
  "api_specs_loaded": 3
}

Connecting MCP Clients

Claude Code (CLI) Configuration

To use the ToothFairyAI MCP server with Claude Code:

Option 1: Local stdio (Recommended)

Run the server locally using stdio transport for the most reliable connection:

CLI Command

claude mcp add toothfairy-docs -- python -m tf_mcp_server.server --stdio

Manual configuration

Edit your Claude config file (~/.claude.json):

{
  "mcpServers": {
    "toothfairy-docs": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "tf_mcp_server.server", "--stdio"],
      "cwd": "/path/to/tooth-fairy-website-1/tf_mcp_server"
    }
  }
}

Option 2: Remote SSE

Connect to the hosted remote server. Choose the endpoint closest to you:

⚠️ IMPORTANT: Only AU endpoints are currently available. EU and US endpoints are coming soon.

Environment Region Endpoint Status
Development AU https://mcp.toothfairylab.link/sse ✅ Available
Production AU https://mcp.toothfairyai.com/sse ✅ Available
Production EU https://mcp.eu.toothfairyai.com/sse Not Available
Production US https://mcp.us.toothfairyai.com/sse Not Available

CLI Command (example for AU production)

claude mcp add toothfairy-docs "https://mcp.toothfairyai.com/sse" -t sse

Manual configuration

{
  "mcpServers": {
    "toothfairy-docs": {
      "type": "sse",
      "url": "https://mcp.toothfairyai.com/sse"
    }
  }
}

Note: Use type: "sse" for remote connections. Replace the URL with your preferred regional endpoint.

Verify the connection

After adding the server, verify it's configured:

claude mcp list

Or within Claude Code, type /mcp to see connected servers.

Start using the tools

Once connected, Claude Code can automatically use these tools when you ask about ToothFairyAI:

Tool Example Prompt
search_docs "Search ToothFairyAI docs for how to create an agent"
search_api_endpoints "Find API endpoints related to conversations"
list_doc_categories "What documentation categories are available?"
get_doc_by_topic "Get the documentation about webhooks"

Example Usage:

> How do I integrate ToothFairyAI agents into my application?

Claude will automatically search the docs and provide relevant information.

Claude Desktop Configuration

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

Option 1: Local stdio (Recommended)

{
  "mcpServers": {
    "toothfairy-docs": {
      "command": "python",
      "args": ["-m", "tf_mcp_server.server", "--stdio"],
      "cwd": "/path/to/tooth-fairy-website-1/tf_mcp_server"
    }
  }
}

Option 2: Remote SSE

Use one of the available endpoints:

  • ✅ AU Production: https://mcp.toothfairyai.com/sse (Available)
  • ❌ EU Production: https://mcp.eu.toothfairyai.com/sse (Not Available)
  • ❌ US Production: https://mcp.us.toothfairyai.com/sse (Not Available)
  • ✅ Development: https://mcp.toothfairylab.link/sse (Available)
{
  "mcpServers": {
    "toothfairy-docs": {
      "url": "https://mcp.toothfairyai.com/sse",
      "transport": "sse"
    }
  }
}

Programmatic Access

from mcp import ClientSession
from mcp.client.sse import sse_client

# Use available endpoint: mcp.toothfairyai.com (AU - available) or mcp.toothfairylab.link (development)
# Note: mcp.eu.toothfairyai.com and mcp.us.toothfairyai.com are not available
async with sse_client(url="https://mcp.toothfairyai.com/sse") as (read, write, _):
    async with ClientSession(read, write) as session:
        await session.initialize()
        tools = await session.list_tools()
        result = await session.call_tool("search_docs", {"query": "agents"})

MCP Resources

Documentation

  • toothfairy://docs/list - List all documentation pages
  • toothfairy://docs/{category}/{slug} - Get a specific doc page

API Specifications

  • toothfairy://api/list - List all API specs
  • toothfairy://api/{name} - Get OpenAPI spec (main, agents, voice)
  • toothfairy://api/{name}/endpoints - Get endpoints summary
  • toothfairy://api/integration-guide - Voice API integration guide

MCP Tools

Tool Description
search_docs(query, limit, source) Search all documentation
search_api_endpoints(query, limit) Search API endpoints
list_doc_categories() List documentation categories
get_doc_by_topic(topic) Get doc content by topic

MCP Prompts

Prompt Description
api_usage_guide(endpoint) Generate guide for an API endpoint
feature_guide(feature) Generate guide for a feature

Future: SDK Integration

This server is designed to be extended with API tools using the toothfairyai Python SDK:

from toothfairyai import ToothFairyClient

@mcp.tool()
def send_to_agent(agent_id: str, message: str) -> dict:
    client = ToothFairyClient(api_key=..., workspace_id=...)
    response = client.chat.send_to_agent(message, agent_id)
    return {"response": response.agent_response}

References

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf_mcp_server-0.5.6.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tf_mcp_server-0.5.6-py3-none-any.whl (73.4 kB view details)

Uploaded Python 3

File details

Details for the file tf_mcp_server-0.5.6.tar.gz.

File metadata

  • Download URL: tf_mcp_server-0.5.6.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for tf_mcp_server-0.5.6.tar.gz
Algorithm Hash digest
SHA256 b2e4f8397560cf167de35daf4980d08e0657cd50aaedb5c48bbc56d5c0b193d1
MD5 ee7918001b2efe7ffc7b673df6e116fe
BLAKE2b-256 83981e3cf526edec3b90d0495f4312b4826bb8d7e0bfe798b4e59ef4e3faef05

See more details on using hashes here.

File details

Details for the file tf_mcp_server-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: tf_mcp_server-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 73.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for tf_mcp_server-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e1546490079004bb2f08ca11f07f505e0518654b8dcd7f5531cdd23ebde76833
MD5 0c9872d704cb94755a285bc78802d902
BLAKE2b-256 dbdbad7fb6be3713f685fa688a0b83068542c60e294335c9fdb391653c060596

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page