Files
meta-mcp/README.md
2026-03-12 10:19:11 +00:00

120 lines
2.4 KiB
Markdown

# Meta MCP (ContextVM)
Meta MCP is a ContextVM server that accepts **requirements** for new MCP tools and returns a job id. It is intended to be used by other AIs that only have access to a single "meta" tool. The meta MCP then builds, deploys, and announces a new MCP server via Nostr (ContextVM).
This repo contains the **server-side** MCP for the meta tool. It implements the request + job tracking surface and a simple build/deploy pipeline (scaffold → build → announce via CVMI).
---
## Goals
- Accept requirements for new tools
- Create a repo/code for the new MCP server
- Build + run the MCP server on this VPS
- Announce the server on Nostr (ContextVM)
- Return the **server pubkey** back to the requester
---
## Tool API
### `meta.request_tool`
Request a new MCP tool/server.
**Input**
```json
{
"requirements": [
{
"name": "get_current_weather_by_city",
"description": "Returns current weather for a city",
"inputSchema": {"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}
}
],
"timeoutSeconds": 120,
"requester": {"name":"weather-bot","pubkey":"npub1..."},
"context": {"notes":"Need fast response"}
}
```
**Output**
```json
{
"status": "building",
"message": "Accepted. Building MCP server (pipeline stub).",
"jobId": "<uuid>"
}
```
### `meta.job_status`
Check a previous job.
**Input**
```json
{ "jobId": "<uuid>" }
```
### `meta.jobs_recent`
List recent jobs.
**Input**
```json
{ "limit": 10 }
```
---
## Development
```bash
npm install
npm run dev
```
---
## Deployment (ContextVM/CVMI)
This server runs via stdio. Use **cvmi serve** to expose it over Nostr.
Example:
```bash
cvmi serve -- node dist/server.js
```
You can set `CVMI_SERVE_*` env vars to configure relays, encryption, and keys.
---
## Pipeline
The pipeline is currently minimal and runs locally:
1) Scaffold a new MCP server in `outputDir`
2) `npm install` + `npm run build`
3) Run `npx cvmi serve -- node dist/server.js`
4) Parse and store the announced pubkey
Configuration is read from `/root/.meta-mcp/config.json` (or `META_MCP_CONFIG`).
Example config:
```json
{
"outputDir": "/root/.openclaw/workspace/generated",
"cvmi": { "seedPath": "/root/.cvmi/seed.json" }
}
```
## Next Steps
- Add persistent storage for job state
- Repo creation + git push for generated MCPs
- Systemd services per generated MCP
- Security controls / rate limits
---
## License
MIT