mcpField
M
MCP Server

MCP Server

Local
github.com/Master-Faraz-officialAI & Agents0Updated 77w ago

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

  1. 01List models from LM Studio
  2. 02Create chat completions
  3. 03OpenAI-compatible response format
  4. 04CORS support

Use cases

  1. 01Retrieve locally available models
  2. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Model 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

  1. Clone the repository:

    git clone https://github.com/master-faraz-official/mcp-server.git
    cd mcp-server
    
  2. Install dependencies:

    npm install
    

🛠 Usage

  1. Make sure LM Studio is running locally at http://localhost:11434.

  2. Start the server:

    node index.js
    

    The 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

Markdown supported

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.