mcp-cline-project-content-server

MCP.Pizza Chef: MaheshDoiphode

The mcp-cline-project-content-server is an MCP server designed to expose project files and their contents in a structured, real-time manner. It allows clients to query a project directory and retrieve all files along with their contents, enabling LLMs and other tools to interact directly with the codebase or project resources. This server supports easy installation and configuration, making it ideal for development environments that require dynamic access to project data. It facilitates enhanced AI-assisted workflows by providing up-to-date project context, improving code understanding, analysis, and automation.

Use This MCP server To

Retrieve all files and contents from a project directory Enable LLMs to access project code for analysis Support AI-assisted code completion with real-time project data Facilitate project-wide search and content extraction Integrate project files into AI-enhanced development tools

README

Project Content Server

An MCP server that provides access to project files and their contents.

Project Content Server MCP server

Installation

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Build the project:
    npm run build

Usage

Start the server:

node build/index.js

API

latest_project_data

Get all files and their contents from a project directory.

Parameters:

  • projectPath (string): Path to the project directory

Example Request:

{
  "name": "latest_project_data",
  "arguments": {
    "projectPath": "/path/to/project"
  }
}

Example Response:

{
  "file1.txt": "Contents of file1",
  "subdir/file2.js": "Contents of file2"
}

Configuration

The server can be configured using environment variables:

  • PORT: Port to run the server on (default: stdio)

Error Handling

The server returns errors in the following format:

{
  "content": [{
    "type": "text",
    "text": "Error message"
  }],
  "isError": true
}

Common errors include:

  • Invalid project path
  • Permission denied errors
  • File system errors

License

MIT

mcp-cline-project-content-server FAQ

How do I install the mcp-cline-project-content-server?
Clone the repository, run 'npm install' to install dependencies, then 'npm run build' to build the project.
How do I start the server?
Run 'node build/index.js' from the project directory after building.
How do I retrieve project files and contents?
Use the 'latest_project_data' API method with the 'projectPath' parameter specifying the directory path.
Can I configure the server port?
Yes, set the 'PORT' environment variable to specify the server's listening port.
What format does the server return project data in?
It returns a JSON object mapping file paths to their contents as strings.
Is this server suitable for large projects?
It is designed to handle project directories, but performance depends on project size and server resources.
Can this server be integrated with multiple LLM providers?
Yes, it works with any MCP client and supports integration with OpenAI, Claude, Gemini, and others.
Does the server support subdirectories?
Yes, file paths include subdirectory structure relative to the project root.