About Vs Code Lm Tools MCP
Vs Code Lm Tools MCP is an MCP server published by craigsteyn in the Developer Tools category: mCP server: Vs Code Lm Tools MCP.
The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/craigsteyn/vs_code_lm_tools_mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Vs Code Lm Tools MCP
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 9 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- !License declaredNo license file. Legally you have no right to use it in a product.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
VS Code LM Tools MCP Server Extension
A VS Code extension that creates an MCP (Model Context Protocol) server to expose VS Code Language Model tools over HTTP, enabling external applications to access and utilize VS Code's built-in LM tools.
Features
This extension provides the following functionality:
- MCP Server: Creates a Model Context Protocol server that runs on
http://localhost:22333 - VS Code LM Tools Integration: Automatically discovers and exposes all registered VS Code Language Model tools
- HTTP API: Provides a REST-like interface for external applications to interact with VS Code LM tools
- Tool Discovery: Lists all available VS Code LM tools with their descriptions and input schemas
- Tool Invocation: Attempts to invoke VS Code LM tools (with limitations outside chat context)
How to Use
Starting the MCP Server
- Install and activate the extension
- The MCP server will automatically start on port 22333 when the extension activates
- You'll see a notification: "MCP Server started on port 22333"
Accessing the MCP Server
The server exposes the following MCP protocol endpoints:
- Initialize:
POST http://localhost:22333with{"method": "initialize", ...} - List Tools:
POST http://localhost:22333with{"method": "tools/list", ...} - Call Tool:
POST http://localhost:22333with{"method": "tools/call", ...} - Ping:
POST http://localhost:22333with{"method": "ping", ...}
Requirements
- VS Code version 1.102.0 or higher
- Node.js and npm for development
- Network access to localhost port 22333
Technical Details
MCP Protocol Implementation
The extension implements a subset of the Model Context Protocol (MCP) v2024-11-05:
- Server Info:
vscode-lm-tools-mcp-serverv1.0.0 - Capabilities: Supports tools discovery and invocation
- Transport: HTTP with JSON-RPC 2.0 format
- CORS: Enabled for cross-origin requests
VS Code LM Tools Integration
- Automatically discovers all registered
vscode.lm.tools - Normalizes tool input schemas to ensure MCP compatibility
- Handles tool invocation with proper error handling
- Provides detailed tool information when direct invocation fails
Limitations
- Tool invocation requires a
toolInvocationTokenwhich is only available in chat contexts - Outside of chat contexts, the server returns tool metadata instead of execution results
- Some VS Code LM tools may not be accessible depending on the current workspace and context
Extension Settings
This extension does not currently contribute any VS Code settings.
Known Issues
- Direct tool invocation may fail outside of VS Code chat contexts due to
toolInvocationTokenrequirements - Tool availability depends on other installed extensions and workspace configuration
- Server runs on a fixed port (22333) which may conflict with other applications
Release Notes
0.0.1
Initial release featuring:
- MCP server implementation with HTTP transport
- VS Code LM tools discovery and exposure
- Basic tool invocation with fallback to metadata
Development
Building the Extension
npm install
npm run compile
Running Tests
npm test
Packaging
npm run package
MCP Client Usage
To connect to this MCP server from an MCP client, add the following configuration to your mcp.json file:
Streamable HTTP Transport (Recommended)
{
"servers": {
"vscode": {
"type": "streamable-http",
"url": "http://localhost:22333"
}
}
}
Standard HTTP Transport
{
"servers": {
"vscode": {
"type": "http",
"url": "http://localhost:22333"
}
}
}
Prerequisites
- Ensure this VS Code extension is installed and active
- The MCP server will automatically start on port 22333
- Your MCP client should be configured to connect to the above URL
Available Operations
Once connected, your MCP client will have access to:
- Tool Discovery: Automatically list all VS Code LM tools
- Tool Invocation: Execute VS Code LM tools (with context limitations)
- Schema Information: Access input schemas for each tool
Dependencies
@modelcontextprotocol/sdk: Core MCP SDK for server implementation- VS Code API: For accessing Language Model tools and extension functionality
Contributing
This extension follows VS Code extension development best practices:
License
See the LICENSE file for details.
README fetched from the repository 9 days ago. The original is authoritative.