Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

BowPHP Docs MCP Server

A Model Context Protocol (MCP) server that provides access to BowPHP documentation.

Features

  • list_docs: List all available documentation files
  • read_doc: Read specific documentation content
  • search_docs: Search across all documentation
  • get_doc_structure: Get documentation categories and structure

Installation

cd docs/mcp
pip install -r requirements.txt

Or with uv:

cd docs/mcp
uv pip install -r requirements.txt

Usage

VS Code Configuration

Add to your .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "bowphp-docs": {
        "type": "stdio",
        "command": "python",
        "args": ["${workspaceFolder}/docs/mcp/server.py"]
      }
    }
  }
}

Running Manually

python server.py

With Docker

Build the Docker image:

cd docs/mcp
docker build -t bowphp-docs-mcp .

Run with documentation mounted:

docker run -i --rm \
  -v $(pwd)/../docs:/app/docs:ro \
  -v $(pwd)/../versioned_docs:/app/versioned_docs:ro \
  -v $(pwd)/../sidebars.json:/app/sidebars.json:ro \
  -e DOCS_ROOT=/app \
  bowphp-docs-mcp

For VS Code with Docker, update your settings:

{
  "mcp": {
    "servers": {
      "bowphp-docs": {
        "type": "stdio",
        "command": "docker",
        "args": [
          "run", "-i", "--rm",
          "-v", "${workspaceFolder}/docs/docs:/app/docs:ro",
          "-v", "${workspaceFolder}/docs/versioned_docs:/app/versioned_docs:ro",
          "-v", "${workspaceFolder}/docs/sidebars.json:/app/sidebars.json:ro",
          "-e", "DOCS_ROOT=/app",
          "bowphp-docs-mcp"
        ]
      }
    }
  }
}

Available Tools

list_docs

List all documentation files.

{
  "name": "list_docs",
  "arguments": {
    "version": "4.x"
  }
}

read_doc

Read a specific documentation file.

{
  "name": "read_doc",
  "arguments": {
    "name": "installation",
    "version": ""
  }
}

search_docs

Search documentation content.

{
  "name": "search_docs",
  "arguments": {
    "query": "middleware",
    "version": ""
  }
}

get_doc_structure

Get the documentation structure from sidebars.

{
  "name": "get_doc_structure",
  "arguments": {}
}

Resources

The server also exposes documentation as MCP resources with URIs like:

  • bowphp://docs/installation
  • bowphp://docs/routing
  • bowphp://docs/database