mcp-lmt-bridge
MCP-LMT-Bridge is an extension for Visual Studio Code that provides specific functionalities. Developed using Node.js and TypeScript, it includes detailed installation steps for the VS Code extension. The documentation also features a user guide and API reference, making it comprehensive for developers.
GitHub Stars
0
User Rating
Not Rated
Favorites
0
Views
33
Forks
0
Issues
0
MCP-LMT-Bridge Documentation
Table of Contents
Installation Guide
Prerequisites
- Visual Studio Code ^1.85.0 or higher
- Node.js ^22.14.0
- npm or yarn package manager
Installation Steps
From VS Code Marketplace (Not yet available)
- Open Visual Studio Code
- Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "MCP-LMT-Bridge"
- Click Install
- Reload VSCode when prompted
From VSIX File (Development)
- Clone the repository:
git clone https://github.com/username/mcp-lmt-bridge.git
cd mcp-lmt-bridge
- Install dependencies and build:
npm install
npm run clean
npm run compile
npm run package:vsix
- Install the extension:
code --install-extension mcp-lmt-bridge-0.1.0.vsix
- Verify installation:
code --list-extensions --show-versions | grep mcp-lmt-bridge
- If the extension is not visible, check the troubleshooting guide for solutions.
Configuration
Create or modify .vscode/settings.json in your workspace:
{
"mcp-lmt-bridge": {
"serverPort": 3000,
"trace.server": "off" | "messages" | "verbose",
"logLevel": "error" | "warn" | "info" | "debug"
}
}
User Guide
Basic Usage
Opening the Command Palette
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS) - The Command Palette will appear at the top of the VS Code window
- Press
Available Commands
Type "MCP" in the Command Palette to see available commands:MCP-LMT: List Extensions- Lists all available MCP-enabled extensionsMCP-LMT: Get Tool Info- Shows information about a specific toolMCP-LMT: Execute Tool- Runs a specified MCP tool
Using the Commands
a. List Extensions:- Open Command Palette
- Type
MCP-LMT: List Extensions - Press Enter to see available extensions
b. Get Tool Info:
- Open Command Palette
- Type
MCP-LMT: Get Tool Info - Select or enter the extension ID when prompted
c. Execute Tool:
- Open Command Palette
- Type
MCP-LMT: Execute Tool - Follow the prompts to select tool and enter parameters
Programmatic Usage
For extension developers:
// List extensions
const extensions = await vscode.commands.executeCommand('mcp.lmt.listExtensions');
// Get tool info
const toolInfo = await vscode.commands.executeCommand('mcp.lmt.getToolInfo', 'example.tool');
// Execute tool
const result = await vscode.commands.executeCommand('mcp.lmt.executeTool', {
toolId: 'example.tool',
params: { param1: 'value' }
});
Common Operations
Discovering Tools
const extensions = await vscode.commands.executeCommand('mcp.lmt.listExtensions');
Tool Execution
const response = await vscode.commands.executeCommand('mcp.lmt.executeTool', {
toolId: 'example.tool',
params: {
input: 'test',
options: { flag: true }
}
});
API Reference
MCP Commands
mcp.lmt.listExtensions- Lists all LanguageModelTools-compatible extensions
- Returns:
Extension[]
mcp.lmt.getToolInfo- Parameters:
toolId: string - Returns: Detailed tool information
- Parameters:
mcp.lmt.executeTool- Parameters:
{ toolId: string, params: any } - Returns: Tool execution results
- Parameters:
Tool Provider Interface
interface MCPToolProvider {
getTools(): Tool[];
executeTool(id: string, params: any): Promise<any>;
}
interface Tool {
id: string;
name: string;
description: string;
parameters: ParameterDefinition[];
}
interface ParameterDefinition {
name: string;
type: string;
required: boolean;
description?: string;
}
Response Formats
Success Response:
{
"status": "success",
"data": {
"result": "Operation completed",
"metadata": {}
}
}
Error Response:
{
"status": "error",
"error": {
"code": "INVALID_PARAMS",
"message": "Invalid parameters provided",
"details": {}
}
}
Developer Guide
Project Setup
- Clone the repository:
git clone https://github.com/username/mcp-lmt-bridge.git
cd mcp-lmt-bridge
- Install dependencies:
npm install
- Build the extension:
npm run compile
# or for production build:
npm run package
Architecture Overview
graph TB
subgraph "VSCode Environment"
AI[AI Chat Extensions] --> MCP[MCP-LMT-Bridge]
MCP --> LMT[LanguageModelTools API]
LMT --> Tools[Tool-Enabled Extensions]
subgraph "MCP-LMT-Bridge"
Server[MCP Server] --> Discovery[Extension Discovery]
Discovery --> Registry[Extension Registry]
Server --> Executor[Command Executor]
Registry --> Executor
end
end
Testing Guidelines
- Unit Tests
npm run test:unit
- Integration Tests
npm run test:integration
- Test Coverage
npm run test:coverage
Contributing Guidelines
- Fork the repository
- Create a feature branch
- Follow TypeScript best practices
- Include tests for new features
- Update documentation
- Submit a pull request
Troubleshooting
Common Issues
Connection Errors
- Verify server port configuration
- Check firewall settings
- Ensure no port conflicts
Tool Execution Failures
- Validate parameter types
- Check tool availability
- Review error logs
Performance Issues
- Monitor memory usage
- Check connection pooling
- Review active connections
Error Codes
| Code | Description | Resolution |
|---|---|---|
CONN_REFUSED |
Connection refused | Check server status |
INVALID_PARAMS |
Invalid parameters | Validate input format |
TOOL_NOT_FOUND |
Tool not available | Verify tool ID |
AUTH_FAILED |
Authentication failed | Check credentials |
Logging
Enable debug logging in .vscode/settings.json:
{
"mcp-lmt-bridge.trace.server": "verbose",
"mcp-lmt-bridge.logLevel": "debug"
}