MCP Server for Transcripter
by zentala
An implementation of a Model Context Protocol (MCP) server designed for the Transcripter project. It provides AI-powered features using the MCP standard, offering tools and resources for transcription analysis.
View on GitHub
Last updated: N/A
MCP Server for Transcripter
A Model Context Protocol (MCP) server implementation for the Transcripter project. This package provides tools and resources for AI-powered features using the MCP standard.
Features
Tools
- test-api: Test API endpoints and return the results
- transcription-search: Search transcriptions with filtering and pagination
- transcription-summary: Generate a summary of a transcription using AI
Resources
- transcription://{id}: Access transcription data by ID
- analysis://{id}: Access analysis data by ID
Requirements
- Node.js >= 18.0.0
- npm >= 7.0.0
Installation
npm install
Building
# Build for both ESM and CommonJS
npm run build
# Build for ESM only
npm run build:esm
# Build for CommonJS only
npm run build:cjs
Running
# Start the MCP server on the default port (3500)
npm run server
# Start the MCP server on a custom port
npm run server 4000
Testing
npm test
Usage Examples
Using the test-api tool
import { Client } from "@modelcontextprotocol/sdk/client";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse";
async function testApiEndpoint() {
// Connect to the MCP server
const transport = new SSEClientTransport("http://localhost:3500/sse", "http://localhost:3500/message");
const client = new Client();
await client.connect(transport);
// Use the test-api tool
const result = await client.tools.execute("test-api", {
endpoint: "transcriptions",
method: "GET",
});
console.log(result);
}
Using the transcription resource
import { Client } from "@modelcontextprotocol/sdk/client";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse";
async function getTranscription(id: number) {
// Connect to the MCP server
const transport = new SSEClientTransport("http://localhost:3500/sse", "http://localhost:3500/message");
const client = new Client();
await client.connect(transport);
// Access the transcription resource
const transcription = await client.resources.get(`transcription://${id}`);
console.log(transcription);
}
Integration with Transcripter
This MCP server integrates with the Transcripter project to provide AI-powered features for transcriptions and analyses. It serves as a standardized interface for AI model interactions.
Project Structure
src/cli.ts
: Command-line interface for starting the MCP serversrc/tools/
: Implementation of MCP toolssrc/resources/
: Implementation of MCP resource providerssrc/tests/
: Tests for tools and resources
License
MIT