⚡PhotonDB

by s1ddh3sh

204 downloads
Not rated
GitHub

About

PhotonDB is a modern C++ rendition of a high-performance in-memory key-value database with MCP server. The data model is key-value, active development is underway to support a wide variety of value types

Details

Author
s1ddh3sh
Downloads
204
Categories
Other

- In-memory key-value database written in C++17
- Simple TCP-based protocol for client-server communication
- Command-line interface via photon-cli
- MCP integration for natural-language data interactions
- Supports basic commands: set, get, ZAP

Start a photon server instance with ./src/server and interact via photon-cli using commands like set, get, and ZAP. For MCP interactions, use server.py with uv as the Python package manager and install it on Claude Desktop with uv run mcp install server.py.

⚡PhotonDB

PhotonDB is a high-performance in-memory key-value database server written in C++17. It provides access to mutable data structures via a simple TCP-based protocol using a server-client model.

PhotonDB also integrates with MCP — the Model Context Protocol — enabling natural-language interactions with the data, making it more than just a database (actively under development).

<details open>
<summary><h2>Using PhotonDB with photon-cli</h2> </summary>

photon-cli is PhotonDB's command line interface

You can start a photon server instance ./src/server
and then, in another terminal try the following:

% cd src/
% ./photon-cli
⚡photon> ZAP
 (str) ZING
⚡photon> set foo bar
 OK
⚡photon> get foo
 (str) bar

</details>

<details open>
<summary><h2>Using PhotonDB with MCP client</h2></summary>

PhotonDB also supports the Model Context Protocol (MCP) for natural-language interactions. The MCP server is implemented in server.py

Adding MCP to your project

We recommend using uv as a python package manager

uv add "mcp[cli]"

To run the mcp command with uv :

uv run mcp

You can install this server.py on Claude Desktop and interact with it right away by running :

uv run mcp install server.py

</details>

<details open>
<summary><h2>Building PhotonDB</h2> </summary>

PhotonDB uses CMake for building. Make sure you have CMake (version 3.10 or newer) and a C++17 compiler installed.

#Clone the repository and enter the directory
git clone https://github.com/s1ddh3sh/PhotonDB.git
cd PhotonDB

#Create a build directory and run CMake
mkdir build
cd build
cmake ..

#Build the server and CLI
make

Make sure to run the make command in the build dir to compile the changes and build the server/client

</details>

API Reference

Please refer the API.md for full list of supported commands and usage examples

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.