An MCP server that supercharges AI assistants with deep PostgreSQL, TimescaleDB, and Tiger Cloud knowledge through semantic documentation search and curated prompt templates.
Want to use this MCP Server without running it yourself? Use the publicly available endpoint hosted by TigerData! https://mcp.tigerdata.com/docs
Claude Code installation:
claude mcp add --transport http tiger-docs https://mcp.tigerdata.com/docs
Cursor installation:
// .cursor/mcp.json
{
"mcpServers": {
"tiger-docs": {
"url": "https://mcp.tigerdata.com/docs"
}
}
}
All methods are exposed as MCP tools and REST API endpoints.
Searches the PostgreSQL documentation for relevant entries based on semantic similarity to the search prompt.
MCP Tool: semantic_search_postgres_docs
REST Endpoint: GET /api/semantic-search/postgres-docs
{
"results": [
{
"id": 11716,
"content": "CREATE TABLE ...",
"metadata": "{...}", // JSON-encoded metadata
"distance": 0.407 // lower = more relevant
}
// ...more results
]
}
Searches the TigerData and TimescaleDB documentation using semantic similarity.
MCP Tool: semantic_search_tiger_docs
REST Endpoint: GET /api/semantic-search/tiger-docs
{
"prompt": "How do I set up continuous aggregates?",
"limit": 10 // optional, default is 10
}
Same format as PostgreSQL semantic search above.
Retrieves curated prompt templates for common PostgreSQL and TimescaleDB tasks.
MCP Tool: get_prompt_template
{
"name": "setup_hypertable" // see available prompt templates in tool description
}
{
"name": "setup_hypertable",
"title": "TimescaleDB Complete Setup",
"description": "Step-by-step instructions for designing table schemas and setting up TimescaleDB with hypertables, indexes, compression, retention policies, and continuous aggregates.",
"content": "..." // full prompt template content
}
Available Prompt Templates: Check the MCP tool description for the current list of available prompt templates.
Clone the repo.
git clone [email protected]:timescale/tiger-docs-mcp-server.git
Create a .env
file based on the .env.sample
file.
cp .env.sample .env
Add your OPENAI_API_KEY to be used for generating embeddings.
You will need a database with the pgvector extension.
Use the tiger CLI to create a Tiger Cloud service.
tiger service create --free --with-password -o json
Copy your database connection parameters into your .env file.
Run the database in a docker container.
# pull the latest image
docker pull timescale/timescaledb-ha:pg17
# run the database container
docker run -d --name tiger-docs \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=tsdb \
-e POSTGRES_USER=tsdbadmin \
-p 127.0.0.1:5432:5432 \
timescale/timescaledb-ha:pg17
Copy your database connection parameters to your .env file:
PGHOST=localhost
PGPORT=5432
PGDATABASE=tsdb
PGUSER=tsdbadmin
PGPASSWORD=password
Run npm i
to install dependencies and build the project. Use npm run watch
to rebuild on changes.
The database is NOT preloaded with the documentation. To make the MCP server usable, you need to scrape, chunk, embed, load, and index the documentation. Follow the directions in the ingest directory to load the database.
The MCP Inspector is a very handy to exercise the MCP server from a web-based UI.
npm run inspector
Field | Value |
---|---|
Transport Type | STDIO |
Command | node |
Arguments | dist/index.js |
Create/edit the file ~/Library/Application Support/Claude/claude_desktop_config.json
to add an entry like the following, making sure to use the absolute path to your local tiger-docs-mcp-server
project, and real database credentials.
{
"mcpServers": {
"tiger-docs": {
"command": "node",
"args": [
"/absolute/path/to/tiger-docs-mcp-server/dist/index.js",
"stdio"
],
"env": {
"PGHOST": "x.y.tsdb.cloud.timescale.com",
"PGDATABASE": "tsdb",
"PGPORT": "32467",
"PGUSER": "readonly_mcp_user",
"PGPASSWORD": "abc123",
"DB_SCHEMA": "docs",
"OPENAI_API_KEY": "sk-svcacct"
}
}
}
}