spences10

mcp-embedding-search

Community spences10
Updated

Search embedding databases

mcp-embedding-search

A Model Context Protocol (MCP) server that queries a Turso databasecontaining embeddings and transcript segments. This tool allows usersto search for relevant transcript segments by asking questions,without generating new embeddings.

Features

  • ๐Ÿ” Vector similarity search for transcript segments
  • ๐Ÿ“Š Relevance scoring based on cosine similarity
  • ๐Ÿ“ Complete transcript metadata (episode title, timestamps)
  • โš™๏ธ Configurable search parameters (limit, minimum score)
  • ๐Ÿ”„ Efficient database connection pooling
  • ๐Ÿ›ก๏ธ Comprehensive error handling
  • ๐Ÿ“ˆ Performance optimized for quick responses

Configuration

This server requires configuration through your MCP client. Here areexamples for different environments:

Cline Configuration

Add this to your Cline MCP settings:

{
	"mcpServers": {
		"mcp-embedding-search": {
			"command": "node",
			"args": ["/path/to/mcp-embedding-search/dist/index.js"],
			"env": {
				"TURSO_URL": "your-turso-database-url",
				"TURSO_AUTH_TOKEN": "your-turso-auth-token"
			}
		}
	}
}

Claude Desktop Configuration

Add this to your Claude Desktop configuration:

{
	"mcpServers": {
		"mcp-embedding-search": {
			"command": "node",
			"args": ["/path/to/mcp-embedding-search/dist/index.js"],
			"env": {
				"TURSO_URL": "your-turso-database-url",
				"TURSO_AUTH_TOKEN": "your-turso-auth-token"
			}
		}
	}
}

API

The server implements one MCP tool:

search_embeddings

Search for relevant transcript segments using vector similarity.

Parameters:

  • question (string, required): The query text to search for
  • limit (number, optional): Number of results to return (default: 5,max: 50)
  • min_score (number, optional): Minimum similarity threshold(default: 0.5, range: 0-1)

Response format:

[
	{
		"episode_title": "Episode Title",
		"segment_text": "Transcript segment content...",
		"start_time": 123.45,
		"end_time": 167.89,
		"similarity": 0.85
	}
	// Additional results...
]

Database Schema

This tool expects a Turso database with the following schema:

CREATE TABLE embeddings (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  transcript_id INTEGER NOT NULL,
  embedding TEXT NOT NULL,
  FOREIGN KEY(transcript_id) REFERENCES transcripts(id)
);

CREATE TABLE transcripts (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  episode_title TEXT NOT NULL,
  segment_text TEXT NOT NULL,
  start_time REAL NOT NULL,
  end_time REAL NOT NULL
);

The embedding column should contain vector embeddings that can beused with the vector_distance_cos function.

Development

Setup

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run in development mode:
npm run dev

Publishing

The project uses changesets for version management. To publish:

  1. Create a changeset:
npm run changeset
  1. Version the package:
npm run version
  1. Publish to npm:
npm run release

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Acknowledgments

MCP Server ยท Populars

MCP Server ยท New

    chatmcp

    mcpso

    directory for Awesome MCP Servers

    Community chatmcp
    TBXark

    MCP Proxy Server

    An MCP proxy server that aggregates and serves multiple MCP resource servers through a single HTTP server.

    Community TBXark
    ttommyth

    interactive-mcp

    Ask users questions from your LLM! interactive-mcp: Local, cross-platform MCP server for interactive prompts, chat & notifications.

    Community ttommyth
    lpigeon

    ros-mcp-server

    The ROS MCP Server is designed to support robots in performing complex tasks and adapting effectively to various environments by providing a set of functions that transform natural language commands, entered by a user through an LLM, into ROS commands for robot control.

    Community lpigeon
    emicklei

    melrose-mcp

    interactive programming of melodies, producing MIDI

    Community emicklei