Server: nlp2uri-mcp (stdio JSON-RPC, MCP 2024-11-05).
Pełny przewodnik orchestracji (wiele usług, artefaktów, zmiennych, todomat, koru):
→ orchestration.md
Skopiuj do .cursor/mcp.json lub merge z szablonem:
examples/integrators/mcp-stdio/mcp-config.json
{
"mcpServers": {
"nlp2uri": {
"command": "nlp2uri-mcp",
"env": {
"NLP2URI_CONFIG": "/absolute/path/to/nlp2uri.yaml"
}
}
}
}
Wymagania: pip install -e . w venv, z którego Cursor uruchamia nlp2uri-mcp.
Platforma: z nlp2uri.yaml (platform: auto) lub NLP2URI_PLATFORM=linux|darwin|windows.
nlp2uri_planPełny plan: NL → URI + OSAction[].
Input:
{
"prompt": "otwórz vscode w folderze ~/projekty/foo",
"platform": "linux",
"locale": "pl-PL"
}
Output (skrót):
{
"uri": "app://vscode/open?path=/home/tom/projekty/foo",
"intent": "open_app",
"actions": [{ "os": "linux", "command": "xdg-open", "argv": ["..."] }]
}
Zwraca też mcp_content z text/uri-list dla hosta MCP.
nlp2uri_resolveTylko URI + spec (bez wykonania).
{ "prompt": "capture screen", "platform": "linux" }
→ desktop-screenshot://screen
nlp2uri_compileURI → komendy OS.
{ "uri": "app://firefox/open", "platform": "linux" }
nlp2uri_executeWykonaj URI (w CI używaj dry_run: true).
{
"uri": "desktop-screenshot://screen",
"platform": "linux",
"dry_run": true
}
nlp2uri_handlePipeline: prompt → URI → execute.
{
"prompt": "open firefox",
"platform": "linux",
"dry_run": true
}
Domyślnie dry_run: true dla bezpieczeństwa agenta.
nlp2uri_list_system_urisKanoniczne URI dla wszystkich bytów SystemMapIR (env2llm).
Input (jedno z pól):
{
"system_map": { "format": "nlp2dsl.system_map.v1", "example_id": "01-invoice", "commands": [] },
"doql_path": "/path/to/environment.doql.less",
"example_dir": "/path/to/nlp2dsl/examples/01-invoice"
}
nlp2uri_resolve_system_mapNL → URI względem SystemMap; przy braku trafienia → desktop (open firefox, …).
{
"prompt": "send invoice",
"system_map": { "...": "..." },
"fallback_desktop": true,
"platform": "linux"
}
nlp2uri_list_getv_urisIndeks profili ~/.getv jako getv://category/profile/VAR.
{ "getv_home": "/home/tom/.getv" }
nlp2uri_resolve_getvNL → URI zmiennej środowiskowej.
{ "prompt": "GROQ_API_KEY" }
→ getv://llm/groq/GROQ_API_KEY
nlp2uri_get_getv_varMetadane zmiennej (wartość zamaskowana).
{ "uri": "getv://llm/groq/GROQ_API_KEY" }
Jeden router MCP zamiast ręcznego wyboru narzędzia:
todomat_run("otwórz firefox") → nlp2uri_handle
todomat_run("pokaż GROQ_API_KEY z getv") → nlp2uri_resolve_getv
todomat_run("wyślij fakturę do klienta") → nlp2dsl
todomat_trigger("...", pipeline="nlp2uri") → HTTP nlp2uri-adapter
Konfiguracja: todomat examples/mcp-cursor.json
Te same operacje przez koru_desktop_uri_* gdy agent ma tylko serwer koru:
| nlp2uri tool | koru tool |
|---|---|
nlp2uri_plan |
koru_desktop_uri_plan |
nlp2uri_handle |
koru_desktop_uri_handle |
nlp2uri_list_getv_uris |
koru_desktop_uri_list_getv_uris |
nlp2uri_resolve_getv |
koru_desktop_uri_resolve_getv |
nlp2uri_get_getv_var |
koru_desktop_uri_get_getv_var |
nlp2uri_list_system_uris |
koru_desktop_uri_list_system_uris |
nlp2uri_resolve_system_map |
koru_desktop_uri_resolve_system_map |
→ koru/docs/desktop-uri-orchestration.md
nlp2uri_plan → dostaje desktop-screenshot://window?title=Edge&mode=activemcp-desktop-pro lub lokalnego executoranlp2uri_execute z dry_run: false na zaufanym hoście./examples/integrators/mcp-stdio/e2e.sh
Te same operacje przez HTTP (nlp2uri-serve):
| MCP tool | REST |
|---|---|
nlp2uri_plan |
POST /v1/plan |
nlp2uri_resolve |
POST /v1/resolve |
nlp2uri_compile |
POST /v1/compile |
nlp2uri_execute |
POST /v1/execute |
nlp2uri_handle |
POST /v1/handle |
nlp2uri_list_getv_uris |
(MCP only; CLI: nlp2uri list-getv) |
nlp2uri_resolve_getv |
(MCP only) |
nlp2uri_list_system_uris |
(MCP only; CLI: nlp2uri list-system-uris) |
nlp2uri_resolve_system_map |
(MCP only) |