About MCP Server
MCP Server is a Node.js proxy that connects API requests to models running in LM Studio. It is for applications that need model discovery and chat completions in an OpenAI-compatible format.
Key features
- 01List models from LM Studio
- 02Create chat completions
- 03OpenAI-compatible response format
- 04CORS support
Use cases
- 01Retrieve locally available models
- 02Send chat requests to an LM Studio model
MCP support
The README describes an HTTP proxy for LM Studio, but does not specify MCP tools, resources, or protocol behavior.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEModel Communication Protocol Server
A simple Node.js server that acts as a proxy for interacting with LM Studio models.
It provides two API endpoints:
- Fetch available models
- Perform chat completions
Built using Express.js, Axios, and Body-parser.
🚀 Features
- Fetch available models from LM Studio (
GET /v1/models) - Perform chat completions with selected models (
POST /v1/chat/completions) - Built-in CORS support for cross-origin API access
- Simple and easy to extend
📦 Installation
-
Clone the repository:
git clone https://github.com/master-faraz-official/mcp-server.git cd mcp-server -
Install dependencies:
npm install
🛠 Usage
-
Make sure LM Studio is running locally at
http://localhost:11434. -
Start the server:
node index.jsThe server will run at
http://localhost:3000
📚 API Endpoints
1. Fetch Models
GET /v1/models
Fetches a list of available models from LM Studio.
Example Response:
{
"object": "list",
"data": [
{
"id": "model-id-1",
"object": "model",
"owned_by": "local"
}
]
}
2. Chat Completion
POST /v1/chat/completions
Send a chat conversation and get a model's response.
Request Body:
{
"model": "your-model-id",
"messages": [{ "role": "user", "content": "Hello!" }],
"temperature": 0.7
}
Example Response:
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1714150000,
"model": "your-model-id",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
⚙️ Environment Details
- Node.js
- Express.js
- Axios
- Body-parser
- CORS
📄 Notes
- Ensure that LM Studio is running on your local machine (
localhost:11434). - The server acts as a bridge, formatting the responses in an OpenAI-compatible format.
📜 License
This project is open source and available under the MIT License.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.