@syntholoc/mcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -28
- package/dist/build-server.d.ts +24 -2
- package/dist/build-server.js +7 -4
- package/dist/{chunk-N4PXYXAP.js → chunk-QOVGANRN.js} +279 -59
- package/dist/index.js +12 -5
- package/package.json +5 -6
- package/dist/build-server.js.map +0 -1
- package/dist/chunk-N4PXYXAP.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/src/build-server.ts +0 -18
- package/src/config.ts +0 -8
- package/src/index.ts +0 -20
- package/src/prompts.ts +0 -73
- package/src/resources.ts +0 -43
- package/src/tools/analytics.ts +0 -55
- package/src/tools/config.ts +0 -19
- package/src/tools/git.ts +0 -68
- package/src/tools/glossary.ts +0 -84
- package/src/tools/index.ts +0 -30
- package/src/tools/jobs.ts +0 -53
- package/src/tools/keys.ts +0 -114
- package/src/tools/locales.ts +0 -60
- package/src/tools/projects.ts +0 -74
- package/src/tools/providers.ts +0 -35
- package/src/tools/qa.ts +0 -46
- package/src/tools/styleguides.ts +0 -49
- package/src/tools/translations.ts +0 -156
- package/src/util.ts +0 -9
package/README.md
CHANGED
|
@@ -1,44 +1,73 @@
|
|
|
1
1
|
# @syntholoc/mcp
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The [Syntholoc](https://syntholoc.com) MCP server — manage AI localization and
|
|
4
|
+
translation straight from [Claude Code](https://claude.com/claude-code) (or any
|
|
5
|
+
MCP client), without leaving your editor.
|
|
5
6
|
|
|
6
|
-
##
|
|
7
|
+
## Add to Claude Code
|
|
7
8
|
|
|
8
9
|
```bash
|
|
9
|
-
|
|
10
|
-
SYNTHOLOC_API_KEY
|
|
11
|
-
|
|
10
|
+
claude mcp add --transport stdio syntholoc \
|
|
11
|
+
--env SYNTHOLOC_API_KEY=<your-api-key> \
|
|
12
|
+
-- bunx @syntholoc/mcp
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
Get an API key from your Syntholoc dashboard. It is sent as the `x-api-key`
|
|
16
|
+
header; the active organization is resolved from the key server-side and is
|
|
17
|
+
never passed as a tool argument.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
### Environment variables
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
| Variable | Default | Description |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `SYNTHOLOC_API_KEY` | – | Machine API key (`x-api-key`). Required for most tools. |
|
|
24
|
+
| `SYNTHOLOC_API_URL` | `https://api.syntholoc.com/graphql` | GraphQL endpoint. Override to target a self-hosted or local instance. |
|
|
25
|
+
| `SYNTHOLOC_TOOL_SETS` | *(all)* | Comma-separated tool sets to load (`projects,keys,translations,qa,glossary,styleguides,tm,git,providers,jobs,analytics,locales,config`). Fewer tools = a more focused agent. |
|
|
26
|
+
| `SYNTHOLOC_READ_ONLY` | `false` | Set `true` to expose only read-only tools (list/get) — safe exploration and onboarding. |
|
|
27
|
+
| `SYNTHOLOC_TOOL_FILTER` | *(none)* | Comma-separated wildcard patterns matched against tool names (e.g. `list_*,get_*`). |
|
|
28
|
+
|
|
29
|
+
> The remote (HTTP) transport accepts the same controls as request headers:
|
|
30
|
+
> `syntholoc-tool-sets`, `syntholoc-read-only`, `syntholoc-tool-filter`. The hosted
|
|
31
|
+
> endpoint is versioned at `/mcp/v1` (the legacy `/mcp` path still works).
|
|
32
|
+
|
|
33
|
+
### Choosing an organization (hosted / OAuth)
|
|
34
|
+
|
|
35
|
+
An OAuth token is per-user and may belong to several organizations. By default the
|
|
36
|
+
earliest one is used. To pin a specific org, send the `syntholoc-org-id` header
|
|
37
|
+
(verified against your membership). List the ids with the `list_organizations` tool
|
|
38
|
+
or the `syntholoc://organizations` resource, then add it to your client config, e.g.:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"syntholoc": {
|
|
44
|
+
"type": "http",
|
|
45
|
+
"url": "https://api.syntholoc.com/mcp/v1",
|
|
46
|
+
"headers": { "syntholoc-org-id": "<org-id>" }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
24
50
|
```
|
|
25
51
|
|
|
26
|
-
|
|
52
|
+
API-key (stdio) clients don't need this — the key is already scoped to one org.
|
|
53
|
+
|
|
54
|
+
## What you can do
|
|
55
|
+
|
|
56
|
+
Task-oriented tools across the whole platform: projects, locales, source keys,
|
|
57
|
+
translation, QA, glossary, style guides, git integration, LLM providers, jobs,
|
|
58
|
+
and analytics — plus MCP resources and prompts for common workflows.
|
|
27
59
|
|
|
28
|
-
|
|
29
|
-
delta-синка), перевод (`translate_locale`/`translate_key` → `jobIds`), QA, глоссарий, style guides,
|
|
30
|
-
git, провайдеры, джобы (`get_job`/`wait_for_job` — поллинг), аналитика. Плюс **ресурсы**
|
|
31
|
-
(`syntholoc://config|projects|project/{id}`) и **промпты** (`localize_changed`, `review_locale`,
|
|
32
|
-
`bootstrap_project`).
|
|
60
|
+
Typical asks, one sentence each:
|
|
33
61
|
|
|
34
|
-
|
|
62
|
+
- *"Translate the untranslated German strings and wait for it to finish."*
|
|
63
|
+
- *"Show project progress and the QA score."*
|
|
64
|
+
- *"Add these glossary terms and re-run QA on French."*
|
|
65
|
+
- *"Export the Spanish locale."*
|
|
35
66
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
67
|
+
Translation runs asynchronously and returns a job id; a `wait_for_job` tool
|
|
68
|
+
blocks until completion, so you can chain "translate → wait → export" in a
|
|
69
|
+
single request.
|
|
39
70
|
|
|
40
|
-
##
|
|
71
|
+
## License
|
|
41
72
|
|
|
42
|
-
|
|
43
|
-
[`@syntholoc/sdk`](../../packages/sdk) (codegen из `apps/api/src/schema.gql`), который
|
|
44
|
-
переиспользуют и MCP-сервер, и CLI. Инструменты импортируют операции и `GraphQLClient` из SDK.
|
|
73
|
+
MIT
|
package/dist/build-server.d.ts
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { GraphQLClient } from '@syntholoc/sdk';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Server-side tool-filtering options, mirroring Crowdin's `crowdin-tool-sets` /
|
|
6
|
+
* `crowdin-read-only` / `crowdin-tool-filter` headers. Applied before the tool
|
|
7
|
+
* list is returned so the agent only sees a focused surface.
|
|
8
|
+
*/
|
|
9
|
+
interface ToolFilterOptions {
|
|
10
|
+
/** Tool-set names to load (see TOOL_SET_NAMES). Empty / undefined / ['all'] loads everything. */
|
|
11
|
+
toolSets?: string[];
|
|
12
|
+
/** When true, only read-only tools (annotations.readOnlyHint) are exposed. */
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
/** Wildcard patterns matched against tool names (e.g. "list_*", "project*"). */
|
|
15
|
+
toolFilter?: string[];
|
|
16
|
+
}
|
|
17
|
+
/** Parses a comma-separated header/env value into a trimmed, non-empty string list. */
|
|
18
|
+
declare function parseList(value: string | undefined | null): string[] | undefined;
|
|
19
|
+
|
|
20
|
+
/** The valid tool-set names clients may request. */
|
|
21
|
+
declare const TOOL_SET_NAMES: string[];
|
|
22
|
+
|
|
4
23
|
/**
|
|
5
24
|
* Builds a fully-configured Syntholoc MCP server (tools + resources + prompts)
|
|
6
25
|
* bound to the given GraphQL client. Shared by the stdio entrypoint and the
|
|
7
26
|
* NestJS remote `/mcp` (Streamable HTTP) endpoint.
|
|
27
|
+
*
|
|
28
|
+
* `opts` optionally narrows the exposed tool surface (tool sets, read-only mode,
|
|
29
|
+
* name-pattern filter) so the agent sees only what a given client needs.
|
|
8
30
|
*/
|
|
9
|
-
declare function buildMcpServer(gql: GraphQLClient): McpServer;
|
|
31
|
+
declare function buildMcpServer(gql: GraphQLClient, opts?: ToolFilterOptions): McpServer;
|
|
10
32
|
|
|
11
|
-
export { buildMcpServer };
|
|
33
|
+
export { TOOL_SET_NAMES, type ToolFilterOptions, buildMcpServer, parseList };
|
package/dist/build-server.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
TOOL_SET_NAMES,
|
|
3
|
+
buildMcpServer,
|
|
4
|
+
parseList
|
|
5
|
+
} from "./chunk-QOVGANRN.js";
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
TOOL_SET_NAMES,
|
|
8
|
+
buildMcpServer,
|
|
9
|
+
parseList
|
|
6
10
|
};
|
|
7
|
-
//# sourceMappingURL=build-server.js.map
|