2.4 KiB
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
{
"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
{
"status": "building",
"message": "Accepted. Building MCP server (pipeline stub).",
"jobId": "<uuid>"
}
meta.job_status
Check a previous job.
Input
{ "jobId": "<uuid>" }
meta.jobs_recent
List recent jobs.
Input
{ "limit": 10 }
Development
npm install
npm run dev
Deployment (ContextVM/CVMI)
This server runs via stdio. Use cvmi serve to expose it over Nostr.
Example:
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:
- Scaffold a new MCP server in
outputDir npm install+npm run build- Run
npx cvmi serve -- node dist/server.js - Parse and store the announced pubkey
Configuration is read from /root/.meta-mcp/config.json (or META_MCP_CONFIG).
Example config:
{
"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