Skip to content

add Scaffold MCP server to mcp-registry #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

peplxx
Copy link

@peplxx peplxx commented Jul 20, 2025

Scaffold is a specialized RAG system that transforms entire codebase into a knowledge graph based on code AST, capturing the structural relationships between files, classes, and functions. That helps to provide a relevant context for LLM when working with large codebases.

Scaffold repository

@peplxx peplxx requested a review from a team as a code owner July 20, 2025 17:14
@ipedrazas
Copy link
Contributor

When I run task build -- --tools scaffold I get the following error:

task build -- --tools scaffold
task: [build] go run ./cmd/build --tools scaffold
[+] Building 84.2s (9/9) FINISHED                                                                                                                                                                                                          docker:desktop-linux
 => [internal] load git source https://github.com/Beer-Bears/scaffold.git#main                                                                                                                                                                             1.8s
 => [internal] load metadata for docker.io/library/python:3.13-slim                                                                                                                                                                                        1.2s
 => CACHED [1/6] FROM docker.io/library/python:3.13-slim@sha256:6544e0e002b40ae0f59bc3618b07c1e48064c4faed3a15ae2fbd2e8f663e8283                                                                                                                           0.1s
 => => resolve docker.io/library/python:3.13-slim@sha256:6544e0e002b40ae0f59bc3618b07c1e48064c4faed3a15ae2fbd2e8f663e8283                                                                                                                                  0.1s
 => [2/6] WORKDIR /app                                                                                                                                                                                                                                     0.2s
 => [3/6] RUN pip install poetry                                                                                                                                                                                                                          13.6s
 => [4/6] COPY pyproject.toml poetry.lock ./                                                                                                                                                                                                               0.2s
 => [5/6] RUN poetry install --only main                                                                                                                                                                                                                  22.1s
 => [6/6] COPY . .                                                                                                                                                                                                                                         0.7s
 => exporting to image                                                                                                                                                                                                                                    43.9s
 => => exporting layers                                                                                                                                                                                                                                   35.1s
 => => exporting manifest sha256:c296d2701bf81c232858d552459a58f62dbf68308ddfef6fe3bbd889459ac0f1                                                                                                                                                          0.1s
 => => exporting config sha256:ca0baa97c698dec72ad61903fe2e8460b2b4c6cdca22c2d3bb430ce002b38da9                                                                                                                                                            0.1s
 => => exporting attestation manifest sha256:ee5f25554f2083b022660a0657a89a29c532476c892ef8b0d64db2b0b05c2bb6                                                                                                                                              0.1s
 => => exporting manifest list sha256:471c5c81acb4e00540d70ccb3f47edc61d298db854899bce4ae34e32467e4e44                                                                                                                                                     0.1s
 => => naming to docker.io/library/check:latest                                                                                                                                                                                                            0.0s
 => => unpacking to docker.io/library/check:latest                                                                                                                                                                                                         8.3s
 => => naming to docker.io/mcp/scaffold:latest                                                                                                                                                                                                             0.0s
 => => unpacking to docker.io/mcp/scaffold:latest                                                                                                                                                                                                          0.0s

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview
2025/07/21 12:11:13 initializing mcp/scaffold: Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/app/src/__main__.py", line 20, in <module>
    parser = Parser(pathlib.Path(PROJECT_PATH))
  File "/app/src/parsers/python/core.py", line 29, in __init__
    raise NotADirectoryError(f"Path is not a directory: {self.path}")
NotADirectoryError: Path is not a directory: codebase
time="2025-07-21T12:11:13+01:00" level=error msg="Error waiting for container: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: input/output error"
exit status 1
task: Failed to run task "build": exit status 1

@peplxx
Copy link
Author

peplxx commented Jul 21, 2025

/codebase dir itself should be created when volume is mounted to container:

  volumes:
    - '{{scaffold.project_path}}:/app/codebase'

I tested task build -- --tools scaffold on my machine and it didn't mount any volume to container
May be i need to specify parameter to build cmd?

@peplxx
Copy link
Author

peplxx commented Jul 21, 2025

If the codebase is created then environment variables are not set when running task build -- --tools scaffold, could you advise on how to properly configure these parameters using the task build command?

@ipedrazas
Copy link
Contributor

When I do the task build, I get this error:

=> => naming to docker.io/mcp/scaffold:latest                                                                                                                                                                                                             0.0s
 => => unpacking to docker.io/mcp/scaffold:latest                                                                                                                                                                                                          0.0s

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview
2025/07/22 14:13:25 initializing mcp/scaffold: context deadline exceeded
exit status 1
task: Failed to run task "build": exit status 1

I guess this is because you're trying to establish a connection to a backend to list tools.

I don't think that the default that you have for scaffold.project_path exists. If I replace it with this:

      project_path:
        type: string
        default:
             /tmp/codebase

I get the previous error.

However, because you require external data sources at the start, the Docker image will not be pushed to the Hub, because we only push images that we can list tools.

@peplxx
Copy link
Author

peplxx commented Jul 22, 2025

However, because you require external data sources at the start, the Docker image will not be pushed to the Hub, because we only push images that we can list tools.

Well, I can add existing image with latest tag from GitHub Container Registry.
So if i will use this registry, do I need to configure parameters somehow?
The initial docker cmd for mcp startup is:

docker run -d \
  --rm \
  --name scaffold-mcp \
  --network scaffold-network \ # Probably Network is optional
  -p 8000:8080 \
  -v "$(pwd)/":/app/codebase \ # Or another way to declare absolute project path 
  -e CHROMA_SERVER_HOST="scaffold-chromadb" \
  -e CHROMA_SERVER_PORT="8000" \
  -e CHROMA_COLLECTION_NAME="scaffold_data" \
  -e NEO4J_USER="neo4j" \
  -e NEO4J_PASSWORD="password" \
  -e NEO4J_URI="bolt://neo4j:password@scaffold-neo4j:7687" \
  -t \
  ghcr.io/beer-bears/scaffold:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants