SkillAgentSearch skills...

Statespace

Database APIs for AI agents

Install / Use

/learn @statespace-tech/Statespace

README

<br> <div align="center"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/statespace-tech/statespace/main/docs/assets/images/header_light.png" /> <img src="https://raw.githubusercontent.com/statespace-tech/statespace/main/docs/assets/images/header_dark.png" alt="Statespace" width="375" /> </picture> </div> <div align="center"> <br>

Database APIs for AI Agents

Test Suite License crates.io Discord X

</div>

Website: https://statespace.com

Documentation: https://docs.statespace.com


Databases are a mess: schema names don't make sense, foreign keys are missing, and business context lives everywhere. Statespace lets you and your coding agent quickly turn that domain knowledge into APIs that any AI agent can query. The same pattern works for any CLI or SDK you can safely wrap, not just databases. Once you’ve created an API, you can deploy and monitor it with our cloud platform.

Installation

curl -fsSL https://statespace.com/install.sh | bash

Example

1. Create it

Initialize a project from a template in the current directory:

statespace init --template postgresql

Templates give your coding agent the tools and guardrails it needs to start exploring your database:

---
tools:
  - [psql, -d, $DATABASE_URL, -c, { regex: "^(SELECT|SHOW|EXPLAIN)\\b.*" }, ;]
---

# Instructions
- Explore the schema to understand the data model
- Follow the user's instructions and answer their questions
- Reference [documentation](https://www.postgresql.org/docs/) as needed

Note: Run statespace init --help to see all available templates.

2. Build it

Tell your coding agent what you know about your data:

claude "Help me document my database's schema, business rules, and context"

Your agent will build, run, and test your API locally based on what you share:

my-app/
├── README.md
├── schema/
│   ├── orders.md
│   ├── customers.md
│   └── products.md
├── reports/
│   ├── revenue/
│   │   ├── monthly.md
│   │   └── by_region.md
│   ├── churn.md
│   └── summarize.py
├── queries/
│   └── funnel.sql
└── data/
    ├── metrics.csv
    └── segments.csv

3. Ship it

Deploy your API to the cloud with a free Statespace account:

statespace deploy my-app/

Then share the API URL with other agents:

claude "Use the API at https://my-app.statespace.app to break down revenue by region"

Or wire it up as an MCP server:

That gives other agents the exact same constrained tool surface and instructions over MCP instead of relying on one local CLI setup.

"mcpServers": {
  "statespace": {
    "command": "npx",
    "args": ["-y", "statespace-mcp", "https://my-app.statespace.app"]
  }
}

Features

  • 🔌 Pluggable — works with virtually any CLI or SDK, including databases, search backends, and observability tools
  • 🔒 Safe — tool constraints like regex mean agents can never run destructive queries
  • 🧠 Self-describing — APIs are both the documentation and the interface for your databases
  • 📖 Composable — split your app across pages so agents load only what they need and save tokens
  • 🚀 Shareable — publish your API to a URL, wire it up as an MCP server, or share with teammates

Community & Contributing

License

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

View on GitHub
GitHub Stars861
CategoryData
Updated1d ago
Forks68

Languages

Rust

Security Score

100/100

Audited on Apr 4, 2026

No findings