Skip to main content

Use Existing MCP Servers

Learn how to integrate popular MCP servers like Claude, Cursor, and Windsurf into your applications.

Using pre-built MCP servers

In this guide, you'll learn how to:

  • Connect to public MCP servers - Integrate existing AI services into your applications
  • Configure authentication - Set up secure connections to third-party MCP servers
  • Make model-specific requests - Use specialized features of different AI models
  • Handle responses - Process and utilize the responses from various MCP servers

Overview

TRMX AI allows you to use existing MCP servers in your applications without having to build your own. This approach lets you leverage pre-built, specialized AI capabilities with minimal setup.

Available MCP Servers

These production-ready MCP servers offer specialized AI capabilities:

  • Claude: Advanced natural language understanding and reasoning
  • Cursor: Specialized code completion and generation
  • Windsurf: Document processing, analysis, and extraction

Getting Started

Prerequisites

Before connecting to external MCP servers, you'll need:

  • The TRMX SDK installed (npm install @trmx/sdk)
  • API keys for the services you want to use
  • Basic familiarity with async/await JavaScript patterns

Integration Example

Here's how to connect to and use various MCP servers:

// Import the TRMX client
const { TrmxClient } = require('@trmx/sdk');

// Initialize with your API key
const client = new TrmxClient({
apiKey: process.env.TRMX_API_KEY
});

// Use Claude MCP server
async function askClaude(question) {
const response = await client.connect('claude').ask(question);
return response.text;
}

// Use Cursor MCP server
async function generateCode(prompt) {
const response = await client.connect('cursor').generate({
prompt,
language: 'javascript'
});
return response.code;
}

// Use Windsurf for document processing
async function analyzeDocument(documentUrl) {
const response = await client.connect('windsurf').analyze({
documentUrl,
tasks: ['summarize', 'extract_entities']
});
return response.results;
}

Authentication

Each MCP server may require specific authentication methods. You'll typically need to:

  1. Register on the service's platform
  2. Generate an API key
  3. Include the key in your connection configuration

Security Best Practices

When working with external MCP servers:

  • Store API keys in environment variables, never in code
  • Use proper error handling for service disruptions
  • Implement rate limiting to avoid unexpected costs
  • Consider fallback options if a service is unavailable

Next Steps

Continue Learning

Now that you know how to use existing MCP servers: