@sourcey/mcp-server 1.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/SBOM.cdx.json +976 -0
- package/SECURITY.md +8 -0
- package/SUPPORT.md +5 -0
- package/assets/sourcey-mark.png +0 -0
- package/dist/bridge.d.ts +24 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +105 -0
- package/dist/bridge.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/metadata.d.ts +77 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +19 -0
- package/dist/metadata.js.map +1 -0
- package/distribution.json +24 -0
- package/package.json +72 -0
- package/server.json +31 -0
package/SECURITY.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
Report vulnerabilities privately through GitHub Security Advisories for
|
|
4
|
+
`sourcey/mcp-server`. Do not include credentials, wallet material, private Catalog data, or
|
|
5
|
+
personal information in a public issue.
|
|
6
|
+
|
|
7
|
+
The bridge accepts no Sourcey credential. Its only network destination is the canonical hosted
|
|
8
|
+
endpoint or the explicit `SOURCEY_MCP_URL` override, which must use HTTPS except on loopback.
|
package/SUPPORT.md
ADDED
|
Binary file
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client, type Tool, type Transport } from "@modelcontextprotocol/client";
|
|
2
|
+
export interface BridgeTimeouts {
|
|
3
|
+
readonly connectMs: number;
|
|
4
|
+
readonly listMs: number;
|
|
5
|
+
readonly callMs: number;
|
|
6
|
+
readonly closeMs: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const defaultBridgeTimeouts: BridgeTimeouts;
|
|
9
|
+
export interface SourceyBridgeInput {
|
|
10
|
+
readonly endpoint: URL;
|
|
11
|
+
readonly timeouts?: BridgeTimeouts;
|
|
12
|
+
readonly diagnostic?: (message: string) => void;
|
|
13
|
+
readonly onUpstreamClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface SourceyBridge {
|
|
16
|
+
readonly endpoint: URL;
|
|
17
|
+
readonly hostedImplementation: ReturnType<Client["getServerVersion"]>;
|
|
18
|
+
readonly tools: readonly Tool[];
|
|
19
|
+
connect(transport: Transport): Promise<void>;
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare function createSourceyBridge(input: SourceyBridgeInput): Promise<SourceyBridge>;
|
|
23
|
+
export declare function sourceyMcpEndpoint(environment: NodeJS.ProcessEnv): URL;
|
|
24
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,KAAK,IAAI,EACT,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAC;AAItC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,qBAAqB,EAAE,cAKnC,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC;IACvB,QAAQ,CAAC,oBAAoB,EAAE,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACtE,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAiE3F;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,GAAG,GAAG,CActE"}
|
package/dist/bridge.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Client, StreamableHTTPClientTransport, } from "@modelcontextprotocol/client";
|
|
2
|
+
import { Server } from "@modelcontextprotocol/server";
|
|
3
|
+
import { bridgeDistribution, bridgeImplementation } from "./metadata.js";
|
|
4
|
+
export const defaultBridgeTimeouts = {
|
|
5
|
+
connectMs: 15_000,
|
|
6
|
+
listMs: 15_000,
|
|
7
|
+
callMs: 60_000,
|
|
8
|
+
closeMs: 5_000,
|
|
9
|
+
};
|
|
10
|
+
export async function createSourceyBridge(input) {
|
|
11
|
+
const timeouts = input.timeouts ?? defaultBridgeTimeouts;
|
|
12
|
+
const upstream = new Client(bridgeImplementation, {
|
|
13
|
+
capabilities: {},
|
|
14
|
+
enforceStrictCapabilities: true,
|
|
15
|
+
versionNegotiation: { mode: "legacy" },
|
|
16
|
+
});
|
|
17
|
+
const upstreamTransport = new StreamableHTTPClientTransport(input.endpoint);
|
|
18
|
+
let closing = false;
|
|
19
|
+
upstream.onerror = (error) => input.diagnostic?.(`upstream error: ${error.message}`);
|
|
20
|
+
upstream.onclose = () => {
|
|
21
|
+
if (!closing)
|
|
22
|
+
input.onUpstreamClose?.();
|
|
23
|
+
};
|
|
24
|
+
await upstream.connect(upstreamTransport, requestOptions(timeouts.connectMs));
|
|
25
|
+
const listed = await upstream.listTools(undefined, {
|
|
26
|
+
...requestOptions(timeouts.listMs),
|
|
27
|
+
cacheMode: "refresh",
|
|
28
|
+
});
|
|
29
|
+
if (listed.tools.length === 0) {
|
|
30
|
+
await upstream.close();
|
|
31
|
+
throw new Error("The hosted Sourcey MCP server returned no tools.");
|
|
32
|
+
}
|
|
33
|
+
const tools = Object.freeze([...listed.tools]);
|
|
34
|
+
const toolsByName = new Map(tools.map((tool) => [tool.name, tool]));
|
|
35
|
+
const hosted = upstream.getServerVersion();
|
|
36
|
+
const hostedIdentity = hosted ? `${hosted.name}@${hosted.version}` : input.endpoint.origin;
|
|
37
|
+
const upstreamInstructions = upstream.getInstructions();
|
|
38
|
+
const server = new Server(bridgeImplementation, {
|
|
39
|
+
capabilities: { tools: { listChanged: false } },
|
|
40
|
+
instructions: [
|
|
41
|
+
`This installed stdio process is ${bridgeImplementation.name}@${bridgeImplementation.version}.`,
|
|
42
|
+
`It relays the live hosted Sourcey server ${hostedIdentity}.`,
|
|
43
|
+
upstreamInstructions,
|
|
44
|
+
]
|
|
45
|
+
.filter((value) => Boolean(value))
|
|
46
|
+
.join(" "),
|
|
47
|
+
});
|
|
48
|
+
server.setRequestHandler("tools/list", () => ({ tools: [...tools] }));
|
|
49
|
+
server.setRequestHandler("tools/call", async (request) => {
|
|
50
|
+
const tool = toolsByName.get(request.params.name);
|
|
51
|
+
if (!tool)
|
|
52
|
+
throw new Error(`Unknown Sourcey tool: ${request.params.name}.`);
|
|
53
|
+
const result = await upstream.callTool(request.params, {
|
|
54
|
+
...requestOptions(timeouts.callMs),
|
|
55
|
+
toolDefinition: tool,
|
|
56
|
+
});
|
|
57
|
+
return server.projectCallToolResult(result, tool.outputSchema);
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
endpoint: input.endpoint,
|
|
61
|
+
hostedImplementation: hosted,
|
|
62
|
+
tools,
|
|
63
|
+
connect: (transport) => server.connect(transport),
|
|
64
|
+
close: async () => {
|
|
65
|
+
if (closing)
|
|
66
|
+
return;
|
|
67
|
+
closing = true;
|
|
68
|
+
await Promise.allSettled([
|
|
69
|
+
boundedClose("local MCP server", () => server.close(), timeouts.closeMs),
|
|
70
|
+
boundedClose("hosted MCP client", () => upstream.close(), timeouts.closeMs),
|
|
71
|
+
]);
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export function sourceyMcpEndpoint(environment) {
|
|
76
|
+
const endpoint = new URL(environment.SOURCEY_MCP_URL ?? bridgeDistribution.default_endpoint);
|
|
77
|
+
if (endpoint.username || endpoint.password || endpoint.hash) {
|
|
78
|
+
throw new Error("SOURCEY_MCP_URL must not contain credentials or a fragment.");
|
|
79
|
+
}
|
|
80
|
+
if (endpoint.protocol !== "https:" &&
|
|
81
|
+
!(endpoint.protocol === "http:" && ["127.0.0.1", "::1", "localhost"].includes(endpoint.hostname))) {
|
|
82
|
+
throw new Error("SOURCEY_MCP_URL must use HTTPS, except for a loopback test endpoint.");
|
|
83
|
+
}
|
|
84
|
+
return endpoint;
|
|
85
|
+
}
|
|
86
|
+
function requestOptions(timeout) {
|
|
87
|
+
return { timeout, maxTotalTimeout: timeout };
|
|
88
|
+
}
|
|
89
|
+
async function boundedClose(label, close, timeout) {
|
|
90
|
+
let timer;
|
|
91
|
+
try {
|
|
92
|
+
await Promise.race([
|
|
93
|
+
close(),
|
|
94
|
+
new Promise((_, reject) => {
|
|
95
|
+
timer = setTimeout(() => reject(new Error(`${label} did not close within ${timeout}ms.`)), timeout);
|
|
96
|
+
timer.unref();
|
|
97
|
+
}),
|
|
98
|
+
]);
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
if (timer)
|
|
102
|
+
clearTimeout(timer);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
3
|
+
import { createSourceyBridge, sourceyMcpEndpoint } from "./bridge.js";
|
|
4
|
+
const note = (message) => process.stderr.write(`[sourcey-mcp] ${message}\n`);
|
|
5
|
+
let bridge;
|
|
6
|
+
let shuttingDown = false;
|
|
7
|
+
async function shutdown(reason, exitCode) {
|
|
8
|
+
if (shuttingDown)
|
|
9
|
+
return;
|
|
10
|
+
shuttingDown = true;
|
|
11
|
+
note(reason);
|
|
12
|
+
await bridge?.close();
|
|
13
|
+
process.exitCode = exitCode;
|
|
14
|
+
}
|
|
15
|
+
async function main() {
|
|
16
|
+
const endpoint = sourceyMcpEndpoint(process.env);
|
|
17
|
+
bridge = await createSourceyBridge({
|
|
18
|
+
endpoint,
|
|
19
|
+
diagnostic: note,
|
|
20
|
+
onUpstreamClose: () => void shutdown("hosted Sourcey connection closed", 1),
|
|
21
|
+
});
|
|
22
|
+
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
23
|
+
process.once(signal, () => void shutdown(`received ${signal}`, 0));
|
|
24
|
+
}
|
|
25
|
+
await bridge.connect(new StdioServerTransport());
|
|
26
|
+
note(`bridging ${endpoint.origin}${endpoint.pathname}`);
|
|
27
|
+
}
|
|
28
|
+
main().catch((error) => {
|
|
29
|
+
note(`failed to start: ${error instanceof Error ? error.message : String(error)}`);
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM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AI,CAAC,oBAAoB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Implementation } from "@modelcontextprotocol/server";
|
|
2
|
+
export declare const bridgeDistribution: {
|
|
3
|
+
distribution_contract: string;
|
|
4
|
+
registry_name: string;
|
|
5
|
+
implementation_name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
registry_description: string;
|
|
8
|
+
description: string;
|
|
9
|
+
default_endpoint: string;
|
|
10
|
+
website_url: string;
|
|
11
|
+
support_url: string;
|
|
12
|
+
privacy_url: string;
|
|
13
|
+
terms_url: string;
|
|
14
|
+
x402_discovery_url: string;
|
|
15
|
+
icon: {
|
|
16
|
+
src: string;
|
|
17
|
+
mime_type: string;
|
|
18
|
+
sizes: string[];
|
|
19
|
+
local_path: string;
|
|
20
|
+
sha256: string;
|
|
21
|
+
};
|
|
22
|
+
repository: string;
|
|
23
|
+
container: string;
|
|
24
|
+
glama_maintainers: string[];
|
|
25
|
+
};
|
|
26
|
+
export declare const bridgePackage: {
|
|
27
|
+
name: string;
|
|
28
|
+
version: string;
|
|
29
|
+
description: string;
|
|
30
|
+
mcpName: string;
|
|
31
|
+
license: string;
|
|
32
|
+
type: string;
|
|
33
|
+
bin: {
|
|
34
|
+
"sourcey-mcp": string;
|
|
35
|
+
};
|
|
36
|
+
files: string[];
|
|
37
|
+
repository: {
|
|
38
|
+
type: string;
|
|
39
|
+
url: string;
|
|
40
|
+
};
|
|
41
|
+
homepage: string;
|
|
42
|
+
bugs: {
|
|
43
|
+
url: string;
|
|
44
|
+
};
|
|
45
|
+
funding: string;
|
|
46
|
+
author: string;
|
|
47
|
+
keywords: string[];
|
|
48
|
+
engines: {
|
|
49
|
+
node: string;
|
|
50
|
+
};
|
|
51
|
+
scripts: {
|
|
52
|
+
build: string;
|
|
53
|
+
"generate:metadata": string;
|
|
54
|
+
"generate:sbom": string;
|
|
55
|
+
"check:metadata": string;
|
|
56
|
+
lint: string;
|
|
57
|
+
test: string;
|
|
58
|
+
"verify:package": string;
|
|
59
|
+
verify: string;
|
|
60
|
+
start: string;
|
|
61
|
+
};
|
|
62
|
+
dependencies: {
|
|
63
|
+
"@modelcontextprotocol/client": string;
|
|
64
|
+
"@modelcontextprotocol/server": string;
|
|
65
|
+
};
|
|
66
|
+
devDependencies: {
|
|
67
|
+
"@biomejs/biome": string;
|
|
68
|
+
"@types/node": string;
|
|
69
|
+
typescript: string;
|
|
70
|
+
};
|
|
71
|
+
publishConfig: {
|
|
72
|
+
access: string;
|
|
73
|
+
provenance: boolean;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare const bridgeImplementation: Implementation;
|
|
77
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAAe,CAAC;AAC/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkB,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,cAalC,CAAC"}
|
package/dist/metadata.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import distribution from "../distribution.json" with { type: "json" };
|
|
2
|
+
import packageManifest from "../package.json" with { type: "json" };
|
|
3
|
+
export const bridgeDistribution = distribution;
|
|
4
|
+
export const bridgePackage = packageManifest;
|
|
5
|
+
export const bridgeImplementation = {
|
|
6
|
+
name: distribution.implementation_name,
|
|
7
|
+
title: distribution.title,
|
|
8
|
+
version: packageManifest.version,
|
|
9
|
+
description: distribution.registry_description,
|
|
10
|
+
icons: [
|
|
11
|
+
{
|
|
12
|
+
src: distribution.icon.src,
|
|
13
|
+
mimeType: distribution.icon.mime_type,
|
|
14
|
+
sizes: distribution.icon.sizes,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
websiteUrl: distribution.website_url,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,sBAAsB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtE,OAAO,eAAe,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,IAAI,EAAE,YAAY,CAAC,mBAAmB;IACtC,KAAK,EAAE,YAAY,CAAC,KAAK;IACzB,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,WAAW,EAAE,YAAY,CAAC,oBAAoB;IAC9C,KAAK,EAAE;QACL;YACE,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG;YAC1B,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,SAAS;YACrC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK;SAC/B;KACF;IACD,UAAU,EAAE,YAAY,CAAC,WAAW;CACrC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"distribution_contract": "sourcey.mcp-bridge-distribution/v1alpha1",
|
|
3
|
+
"registry_name": "io.github.sourcey/mcp-server",
|
|
4
|
+
"implementation_name": "sourcey-mcp-bridge",
|
|
5
|
+
"title": "Sourcey",
|
|
6
|
+
"registry_description": "Stdio bridge to Sourcey startup offers and Agent Readiness report cards.",
|
|
7
|
+
"description": "A thin local stdio bridge to Sourcey's live hosted MCP server for evidence-backed startup credits, deals, Agent Readiness report cards, canonical declarations, and paid-service discovery.",
|
|
8
|
+
"default_endpoint": "https://mcp.sourcey.com/mcp",
|
|
9
|
+
"website_url": "https://sourcey.com",
|
|
10
|
+
"support_url": "https://sourcey.com/support",
|
|
11
|
+
"privacy_url": "https://sourcey.com/privacy",
|
|
12
|
+
"terms_url": "https://sourcey.com/terms",
|
|
13
|
+
"x402_discovery_url": "https://api.sourcey.com/.well-known/x402",
|
|
14
|
+
"icon": {
|
|
15
|
+
"src": "https://sourcey.com/brand/sourcey-mark.png",
|
|
16
|
+
"mime_type": "image/png",
|
|
17
|
+
"sizes": ["250x250"],
|
|
18
|
+
"local_path": "assets/sourcey-mark.png",
|
|
19
|
+
"sha256": "7e6a3cc157c0cf8b984668ab9d3d2697207815240e07958343b17fdbf192233d"
|
|
20
|
+
},
|
|
21
|
+
"repository": "https://github.com/sourcey/mcp-server",
|
|
22
|
+
"container": "ghcr.io/sourcey/mcp-server",
|
|
23
|
+
"glama_maintainers": ["auscaster"]
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sourcey/mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Installable stdio bridge to Sourcey's live startup offers and Agent Readiness MCP server.",
|
|
5
|
+
"mcpName": "io.github.sourcey/mcp-server",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"sourcey-mcp": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"assets",
|
|
13
|
+
"dist",
|
|
14
|
+
"CHANGELOG.md",
|
|
15
|
+
"distribution.json",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md",
|
|
18
|
+
"SBOM.cdx.json",
|
|
19
|
+
"SECURITY.md",
|
|
20
|
+
"server.json",
|
|
21
|
+
"SUPPORT.md"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/sourcey/mcp-server.git"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://sourcey.com",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/sourcey/mcp-server/issues"
|
|
30
|
+
},
|
|
31
|
+
"funding": "https://sourcey.com",
|
|
32
|
+
"author": "Sourcey",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"sourcey",
|
|
35
|
+
"mcp",
|
|
36
|
+
"model-context-protocol",
|
|
37
|
+
"mcp-server",
|
|
38
|
+
"startup-credits",
|
|
39
|
+
"startup-deals",
|
|
40
|
+
"agent-readiness",
|
|
41
|
+
"agent-report-card",
|
|
42
|
+
"x402",
|
|
43
|
+
"ai-agents"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22.12.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "node scripts/clean.mjs && tsc -p tsconfig.json",
|
|
50
|
+
"generate:metadata": "node scripts/generate-metadata.mjs",
|
|
51
|
+
"generate:sbom": "node scripts/generate-sbom.mjs",
|
|
52
|
+
"check:metadata": "node scripts/check-metadata.mjs",
|
|
53
|
+
"lint": "biome check .",
|
|
54
|
+
"test": "node --test test/*.test.mjs",
|
|
55
|
+
"verify:package": "node scripts/verify-packed-package.mjs",
|
|
56
|
+
"verify": "npm run build && npm run generate:metadata && npm run generate:sbom && npm run check:metadata && npm run lint && npm test && npm run verify:package",
|
|
57
|
+
"start": "node dist/index.js"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
61
|
+
"@modelcontextprotocol/server": "2.0.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@biomejs/biome": "2.5.5",
|
|
65
|
+
"@types/node": "24.10.1",
|
|
66
|
+
"typescript": "6.0.3"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public",
|
|
70
|
+
"provenance": true
|
|
71
|
+
}
|
|
72
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.sourcey/mcp-server",
|
|
4
|
+
"title": "Sourcey",
|
|
5
|
+
"description": "Stdio bridge to Sourcey startup offers and Agent Readiness report cards.",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"websiteUrl": "https://sourcey.com",
|
|
8
|
+
"icons": [
|
|
9
|
+
{
|
|
10
|
+
"src": "https://sourcey.com/brand/sourcey-mark.png",
|
|
11
|
+
"mimeType": "image/png",
|
|
12
|
+
"sizes": [
|
|
13
|
+
"250x250"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"url": "https://github.com/sourcey/mcp-server",
|
|
19
|
+
"source": "github"
|
|
20
|
+
},
|
|
21
|
+
"packages": [
|
|
22
|
+
{
|
|
23
|
+
"registryType": "npm",
|
|
24
|
+
"identifier": "@sourcey/mcp-server",
|
|
25
|
+
"version": "1.0.0",
|
|
26
|
+
"transport": {
|
|
27
|
+
"type": "stdio"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|