This MCP server implementation for the Transcripter project provides tools and resources for AI-powered features using the Model Context Protocol standard, enabling transcription searching, summarization, and API testing capabilities.
Installation is simple and requires just one command:
npm install
Start the MCP server with these commands:
# Start the MCP server on the default port (3500)
npm run server
# Start the MCP server on a custom port
npm run server 4000
The server provides several AI-powered tools:
Access to key data resources:
This example demonstrates how to connect to the MCP server and test an API endpoint:
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);
}
This example shows how to retrieve a transcription resource by ID:
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);
}
To generate an AI-powered summary of a transcription:
import { Client } from "@modelcontextprotocol/sdk/client";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse";
async function summarizeTranscription(id: number) {
const transport = new SSEClientTransport("http://localhost:3500/sse", "http://localhost:3500/message");
const client = new Client();
await client.connect(transport);
// Generate a summary using the transcription-summary tool
const summary = await client.tools.execute("transcription-summary", {
transcriptionId: id,
maxLength: 500 // Optional: specify maximum summary length
});
console.log(summary);
}
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.