Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions plugin/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
"mcpServers": {
"wego": {
"type": "streamable-http",
"url": "https://mcp.wego.com/public-app/v1/mcp"
}
}
}
30 changes: 30 additions & 0 deletions scripts/plugin-conformance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,36 @@ describe("plugin.json conformance (Agent Plugins §5.2)", () => {
});
});

describe("mcp.json conformance (Agent Plugins)", () => {
const mcp = JSON.parse(
readFileSync(join(cliRoot, "plugin/mcp.json"), "utf8"),
) as {
$schema: unknown;
mcpServers: Record<string, Record<string, unknown>>;
};

it("uses the same schema version as plugin.json", () => {
expect(mcp.$schema).toBe(
(manifest.$schema as string).replace(
"/plugin.schema.json",
"/mcp.schema.json",
),
);
});

it("has closed field sets and exactly one server named wego", () => {
expect(Object.keys(mcp).sort()).toEqual(["$schema", "mcpServers"]);
expect(Object.keys(mcp.mcpServers)).toEqual(["wego"]);
expect(Object.keys(mcp.mcpServers.wego).sort()).toEqual(["type", "url"]);
});

it("uses the public HTTPS endpoint over streamable HTTP without headers", () => {
const server = mcp.mcpServers.wego;
expect(server.type).toBe("streamable-http");
expect(server.url).toBe("https://mcp.wego.com/public-app/v1/mcp");
});
});

/**
* SHA-256 of the canonical Apache 2.0 text, over LF line endings.
*
Expand Down
6 changes: 5 additions & 1 deletion scripts/plugin-publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ describe("publish-plugin against a file:// bare repo", () => {
expect(remote.read("plugin.json")).toBe(
readFileSync(join(cliRoot, "plugin/plugin.json"), "utf8"),
);
expect(remote.read("mcp.json")).toBe(
readFileSync(join(cliRoot, "plugin/mcp.json"), "utf8"),
);
expect(remote.read("skills/wego/SKILL.md")).toBe(
readFileSync(join(cliRoot, "skills/wego/SKILL.md"), "utf8"),
);
Expand Down Expand Up @@ -371,9 +374,10 @@ describe("unexpectedPluginFiles", () => {
});

describe("pluginPublishPlan", () => {
it("publishes the manifest, the readme, the licence, and one SKILL.md per skill", () => {
it("publishes the manifest, MCP config, readme, licence, and one SKILL.md per skill", () => {
expect(PLAN).toEqual([
{ from: "plugin/plugin.json", to: "plugin.json" },
{ from: "plugin/mcp.json", to: "mcp.json" },
{ from: "plugin/README.md", to: "README.md" },
{ from: "plugin/LICENSE", to: "LICENSE" },
{ from: "skills/wego/SKILL.md", to: "skills/wego/SKILL.md" },
Expand Down
3 changes: 2 additions & 1 deletion scripts/plugin-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface PluginPublishPair {
* The published set is a DATA structure rather than a sequence of copy calls, so
* the three things that need it can share one answer: the publisher copies it,
* `--print-plan` prints it, and the after-clone predicate uses its destinations
* as the expected set. Adding `mcp.json` later is one entry here; relocating the
* as the expected set. Adding a published file is one entry here; relocating the
* sources is {@link PLUGIN_SOURCE_DIR}. Neither touches publisher logic.
*
* The skill body is included because the plugin repo is where third-party
Expand All @@ -68,6 +68,7 @@ export function pluginPublishPlan(
): PluginPublishPair[] {
return [
{ from: `${PLUGIN_SOURCE_DIR}/plugin.json`, to: "plugin.json" },
{ from: `${PLUGIN_SOURCE_DIR}/mcp.json`, to: "mcp.json" },
{ from: `${PLUGIN_SOURCE_DIR}/README.md`, to: "README.md" },
{ from: `${PLUGIN_SOURCE_DIR}/LICENSE`, to: "LICENSE" },
...skillIds.map((id) => ({
Expand Down
Loading