@hasna/mcps 0.0.1
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/bin/index.js +27850 -0
- package/bin/mcp.js +22816 -0
- package/dashboard/dist/assets/index-Bl3d9_Ks.css +1 -0
- package/dashboard/dist/assets/index-KmgzJKQR.js +224 -0
- package/dashboard/dist/index.html +13 -0
- package/dashboard/dist/logo.jpg +0 -0
- package/dist/cli/components/App.d.ts +1 -0
- package/dist/cli/components/SearchView.d.ts +5 -0
- package/dist/cli/components/ServerDetail.d.ts +8 -0
- package/dist/cli/components/ServerList.d.ts +7 -0
- package/dist/cli/components/ToolCall.d.ts +8 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +15403 -0
- package/dist/lib/config.d.ts +4 -0
- package/dist/lib/db.d.ts +3 -0
- package/dist/lib/proxy.d.ts +13 -0
- package/dist/lib/registry.d.ts +18 -0
- package/dist/lib/remote.d.ts +4 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/serve.d.ts +8 -0
- package/dist/types.d.ts +66 -0
- package/package.json +56 -0
package/dist/lib/db.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { McpServerEntry, McpTool, ConnectedServer } from "../types.js";
|
|
2
|
+
export declare function connectToServer(entry: McpServerEntry): Promise<ConnectedServer>;
|
|
3
|
+
export declare function disconnectServer(id: string): Promise<void>;
|
|
4
|
+
export declare function disconnectAll(): Promise<void>;
|
|
5
|
+
export declare function listAllTools(): McpTool[];
|
|
6
|
+
export declare function callTool(prefixedName: string, args: Record<string, unknown>): Promise<{
|
|
7
|
+
content: Array<{
|
|
8
|
+
type: string;
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function refreshTools(id: string): Promise<McpTool[]>;
|
|
13
|
+
export declare function connectAllEnabled(): Promise<ConnectedServer[]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { McpServerEntry, AddServerOptions } from "../types.js";
|
|
2
|
+
export declare function addServer(opts: AddServerOptions): McpServerEntry;
|
|
3
|
+
export declare function removeServer(id: string): void;
|
|
4
|
+
export declare function listServers(): McpServerEntry[];
|
|
5
|
+
export declare function getServer(id: string): McpServerEntry | null;
|
|
6
|
+
export declare function updateServer(id: string, updates: Partial<Pick<McpServerEntry, "name" | "description" | "command" | "args" | "env" | "transport" | "url" | "enabled">>): McpServerEntry;
|
|
7
|
+
export declare function enableServer(id: string): McpServerEntry;
|
|
8
|
+
export declare function disableServer(id: string): McpServerEntry;
|
|
9
|
+
export declare function cacheTools(serverId: string, tools: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
input_schema: Record<string, unknown>;
|
|
13
|
+
}>): void;
|
|
14
|
+
export declare function getCachedTools(serverId: string): Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
input_schema: Record<string, unknown>;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RegistryServer, McpServerEntry } from "../types.js";
|
|
2
|
+
export declare function searchRegistry(query: string): Promise<RegistryServer[]>;
|
|
3
|
+
export declare function getRegistryServer(id: string): Promise<RegistryServer | null>;
|
|
4
|
+
export declare function installFromRegistry(id: string): Promise<McpServerEntry>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function startMcpServer(): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP server for the MCP registry dashboard.
|
|
3
|
+
* Serves the Vite-built React/shadcn dashboard from dashboard/dist/.
|
|
4
|
+
* Provides API routes for managing MCP servers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function startServer(port: number, options?: {
|
|
7
|
+
open?: boolean;
|
|
8
|
+
}): Promise<void>;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface McpServerEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string | null;
|
|
5
|
+
command: string;
|
|
6
|
+
args: string[];
|
|
7
|
+
env: Record<string, string>;
|
|
8
|
+
transport: "stdio" | "sse" | "streamable-http";
|
|
9
|
+
url: string | null;
|
|
10
|
+
source: "local" | "registry";
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AddServerOptions {
|
|
16
|
+
name?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
command: string;
|
|
19
|
+
args?: string[];
|
|
20
|
+
env?: Record<string, string>;
|
|
21
|
+
transport?: "stdio" | "sse" | "streamable-http";
|
|
22
|
+
url?: string;
|
|
23
|
+
source?: "local" | "registry";
|
|
24
|
+
}
|
|
25
|
+
export interface McpTool {
|
|
26
|
+
server_id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
input_schema: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
export interface RegistryPackage {
|
|
32
|
+
registryType: string;
|
|
33
|
+
identifier: string;
|
|
34
|
+
transport?: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface RegistryServerInner {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
repository: {
|
|
42
|
+
url: string;
|
|
43
|
+
source?: string;
|
|
44
|
+
};
|
|
45
|
+
version?: string;
|
|
46
|
+
packages?: RegistryPackage[];
|
|
47
|
+
}
|
|
48
|
+
export interface RegistryServerEntry {
|
|
49
|
+
server: RegistryServerInner;
|
|
50
|
+
_meta?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
export interface RegistryServer {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
repository: {
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
packages: RegistryPackage[];
|
|
60
|
+
}
|
|
61
|
+
export interface ConnectedServer {
|
|
62
|
+
entry: McpServerEntry;
|
|
63
|
+
tools: McpTool[];
|
|
64
|
+
disconnect: () => Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
export type TuiView = "servers" | "detail" | "search" | "call";
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hasna/mcps",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Meta-MCP registry & CLI — discover, manage, and proxy MCP servers",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"mcps": "bin/index.js",
|
|
16
|
+
"mcps-mcp": "bin/mcp.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/",
|
|
20
|
+
"bin/",
|
|
21
|
+
"dashboard/dist/",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "bun run build:dashboard && bun build ./src/cli/index.tsx --outdir ./bin --target bun --external ink --external react --external chalk && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/index.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
27
|
+
"build:dashboard": "cd dashboard && bun install && bun run build",
|
|
28
|
+
"dev": "bun run src/cli/index.tsx",
|
|
29
|
+
"dev:mcp": "bun run src/mcp/index.ts",
|
|
30
|
+
"dev:dashboard": "cd dashboard && bun run dev",
|
|
31
|
+
"serve": "bun run src/cli/index.tsx serve",
|
|
32
|
+
"test": "bun test",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"prepublishOnly": "bun run build"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
38
|
+
"chalk": "^5.3.0",
|
|
39
|
+
"commander": "^12.1.0",
|
|
40
|
+
"ink": "^5.0.1",
|
|
41
|
+
"ink-select-input": "^6.0.0",
|
|
42
|
+
"ink-spinner": "^5.0.0",
|
|
43
|
+
"ink-text-input": "^6.0.0",
|
|
44
|
+
"react": "^18.2.0",
|
|
45
|
+
"zod": "^3.23.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/bun": "latest",
|
|
49
|
+
"@types/react": "^18.2.0",
|
|
50
|
+
"typescript": "^5"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"bun": ">=1.0.0"
|
|
54
|
+
},
|
|
55
|
+
"license": "MIT"
|
|
56
|
+
}
|