Skip to content

emk/tiny-project-mcp

Repository files navigation

Tiny Projects MCP

This MCP is designed to extend the llama-server web UI and similar chat interfaces with:

  • Projects, loosely inspired by the Claude web UI. Projects have their own prompts, files and memories.
    • Important difference from Claude-style projects include (1) conversations can't be added to projects, (2) all the project features are provided by an MCP, and (3) there isn't a web UI to see the project state. Though that might be interesting to add.
  • A sandbox which can run simple shell commands using the excellent tinysandbox!
  • User accounts to support multiple local users.

Project layout

A project is a virtual filesystem containing:

  • /bin: Read-only directory with some common Unix commands, including a basic clone of jq and a js interpreter that works like a stripped-down Node. These are all provided by tinysandbox, and they're written in either Rust or WASM to reduce the risk of mischief.
  • /AGENTS.md: Optional per-project "prompt" with agent instructions.
  • /files/*: Saved reference files for the project.
  • /memories/{name}.md: Memory files.

Getting started

Install the binary using cargo for now:

cargo install --locked tiny-project-mcp

Initialize a configuration file:

tiny-project-mcp config init

The default configuration file is set up to work with llama-server's web UI on http://localhost:8080/. If you want to serve it in another configuration:

  1. Do your security homework. Consider putting it behind a fully private SSL proxy, possibly tailscale serve or something similar.
  2. Edit the config file to have the right hostnames and ports for your setup. tiny-project-mcp supports CORS.

DO NOT EXPOSE THIS ANYWHERE BUT localhost WITHOUT UNDERSTANDING EXACTLY WHAT YOU'RE DOING.

At any point, you can see the configuration using:

tiny-project-mcp config urls

Next, add a user:

tiny-project-mcp users add jsmith

This will print out a token. Save this token somewhere secure! Then, go into llama-server's web UI (or another of your choice), and add the MCP. Enter the URL printed by tiny-project-mcp config urls, enable authentication, and enter the token provided by users add. If you have followed these steps correctly, you should now be able get started! Tell your model:

Create me a project sandbox named test, and tell me what you see.

You should be in business! If you get stuck, please file an issue.

Available MCP commands

Project-related commands

  • list_project: List all projects belonging to the user.
  • create_or_load_project: "Load" a project, printing out the projects AGENTS.md, a summary of files and memories, and some other helpful information for the model.

Pi-inspired commands

  • project_read: Read a file, or part of a file.
  • project_write: Write an entire file.
  • project_edit: Edit a file.
  • project_bash: Run code in the tinysandbox-provided sandbox shell.

Memory commands

  • write_memory: Write an memory to the VFS as Markdown + YAML frontmatter.
  • read_memory: Read a memory by name.
  • list_memories: List all memories and their short descriptions.

AI policy

This project was written with heavy assistance from 100% local coding models. The code is reviewed by me. But I'd say it's only about 75% as good as something I'd lovingly hand-craft in Rust. I do understand everything here except some of the MCP server details, which look right. But honestly MCP servers are a bit of a beast.

(I do have some hand-crafted projects available as well, but those are the ones I do for sheer fun. This one was LLM-assisted because I wanted to use it.)

Contributing

The main bottlenecks on this project are:

  1. My ability to come up with good designs, and
  2. My ability to read code.

Therefore, there's zero point in sending me giant AI pull requests out of the blue, because I could generate those myself. (And I will probably close yours unread.) Instead, what I value are ideas and suggestions, and human discussion.

About

MCP to enhance llama-server web UI (and similar UIs) with projects, files, memory and a simple Rust+WASM-based CLI sandbox based on tinysandbox.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages