Skip to content

statespace-tech/ssp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Statespace

The simplest way to document and connect AI to your data

Test Suite License crates.io Discord X


Website: https://statespace.com

Documentation: https://docs.statespace.com


AI doesn't know your data. Statespace helps you quickly document your data and connect it to agents through APIs, MCPs, or CLIs. Build RAG, text-to-SQL, knowledge bases, and more, in just a few lines of code. Once you’ve created an app, you can deploy, manage, and share it from our cloud platform.

Example

1. Create it

Create a file README.md with:

---
tools:
  - [psql, -d, $DB, -c, { regex: "^SELECT\\b.*" }]
---

# Instructions
- Learn the schema by exploring tables, columns, and relationships
- Translate the user's question into a query that answers it

2. Run it

Configure the MCP server on your client:

"statespace": {
  "command": "uvx",
  "args": [
    "statespace-mcp",
    "path/to/app/"
  ],
  "env": {
    "DB": "postgresql://user:pass@host:port/db"
  }
}

Alternatively, install the Statespace CLI and agent skill:

npm install -g statespace 

# run the app locally
statespace serve path/to/app/ --env DB=postgresql://user:pass@host:port/db --port 8080

3. Ask it

Ask your MCP-enabled agent directly:

claude "How many users do we have?"

Or activate the skill and then ask your agent:

claude "/statespace Use the API at http://127.0.01:8080 to find out how many users we have"

4. Update it

Add as much context and tools as your application needs

path/to/app/
├── README.md           # from above
├── script.py
└── schema/
    ├── users.md
    └── products.md

Then update README.md with new tools and instructions:

---
tools:
  - [grep, -r]
  - [python3, script.py]
  - [psql, -d, $DB, -c, { regex: "^SELECT\\b.*" }]
---


# Instructions
- Learn the schema by exploring tables, columns, and relationships
- Translate the user's question into a query that answers it
- Search through the database's [[./schema]] files with `grep`
- Run script.py to check the number of active connections

5. Deploy it

Optionally, create a Statespace account to deploy your app and get a shareable URL

Then, simply replace your app's path with this URL: path/to/apphttps://demo.statespace.app`

More examples

Community & Contributing

License

This project is licensed under the terms of the MIT license.

About

The only MCP you'll need for text-to-SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages