@hasna/mcps 0.0.12 → 0.0.14

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.
@@ -0,0 +1,10 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { type McpsMcpToolDefinition } from "./tools.js";
3
+ export declare const VERSION: string;
4
+ export interface CreateMcpServerOptions {
5
+ name?: string;
6
+ version?: string;
7
+ cloudTools?: boolean;
8
+ tools?: McpsMcpToolDefinition[];
9
+ }
10
+ export declare function createMcpServer(options?: CreateMcpServerOptions): McpServer;
@@ -0,0 +1,14 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
+ import { z } from "zod";
4
+ export interface McpsMcpToolDefinition {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: Record<string, unknown>;
8
+ paramsSchema?: Record<string, z.ZodTypeAny>;
9
+ run: (input: Record<string, unknown>) => CallToolResult | Promise<CallToolResult>;
10
+ }
11
+ export declare function buildMcpTools(): McpsMcpToolDefinition[];
12
+ export declare const tools: McpsMcpToolDefinition[];
13
+ export declare function listTools(): Promise<McpsMcpToolDefinition[]>;
14
+ export declare function registerMcpTools(server: McpServer, toolDefinitions?: McpsMcpToolDefinition[]): McpsMcpToolDefinition[];
package/dist/types.d.ts CHANGED
@@ -7,7 +7,7 @@ export interface McpServerEntry {
7
7
  env: Record<string, string>;
8
8
  transport: "stdio" | "sse" | "streamable-http";
9
9
  url: string | null;
10
- source: "local" | "registry";
10
+ source: "local" | "registry" | "provider-profile";
11
11
  enabled: boolean;
12
12
  created_at: string;
13
13
  updated_at: string;
@@ -22,7 +22,7 @@ export interface AddServerOptions {
22
22
  env?: Record<string, string>;
23
23
  transport?: "stdio" | "sse" | "streamable-http";
24
24
  url?: string;
25
- source?: "local" | "registry";
25
+ source?: "local" | "registry" | "provider-profile";
26
26
  }
27
27
  export interface McpTool {
28
28
  server_id: string;
@@ -101,6 +101,86 @@ export interface AddSourceOptions {
101
101
  url: string;
102
102
  description?: string;
103
103
  }
104
+ export type ProviderProfileTransport = "stdio" | "sse" | "streamable-http";
105
+ export type ProviderProfileAuthType = "none" | "oauth2" | "api_key" | "bearer_token" | "custom";
106
+ export type ProviderProfileTokenMode = "none" | "user" | "workspace" | "service";
107
+ export type ProviderProfileBearerTokenMode = "none" | "optional" | "required";
108
+ export type ProviderProfileSource = "curated" | "official-registry" | "npm" | "github" | "manual";
109
+ export interface ProviderInstallFallback {
110
+ command?: string;
111
+ args?: string[];
112
+ env?: Record<string, string>;
113
+ packageName?: string;
114
+ registryId?: string;
115
+ url?: string;
116
+ }
117
+ export interface ProviderEndpointFallback {
118
+ transport: ProviderProfileTransport;
119
+ url: string;
120
+ notes?: string;
121
+ }
122
+ export interface ProviderAuthMetadata {
123
+ oauthVersion?: "2.0" | "2.1";
124
+ pkce?: boolean;
125
+ dynamicClientRegistration?: boolean;
126
+ bearerToken?: ProviderProfileBearerTokenMode;
127
+ notes?: string;
128
+ }
129
+ export interface ProviderSafetyMetadata {
130
+ readOnly?: boolean;
131
+ requiresApproval?: boolean;
132
+ destructiveTools?: string[];
133
+ sensitiveScopes?: string[];
134
+ dataClasses?: string[];
135
+ notes?: string;
136
+ }
137
+ export interface ProviderSourceProvenance {
138
+ source: ProviderProfileSource;
139
+ sourceUrl?: string;
140
+ repositoryUrl?: string;
141
+ packageName?: string;
142
+ verifiedAt?: string;
143
+ }
144
+ export interface ProviderProfile {
145
+ id: string;
146
+ displayName: string;
147
+ description: string | null;
148
+ endpoint: string | null;
149
+ transport: ProviderProfileTransport;
150
+ fallbackEndpoints: ProviderEndpointFallback[];
151
+ authType: ProviderProfileAuthType;
152
+ authMetadata: ProviderAuthMetadata;
153
+ scopes: string[];
154
+ tokenMode: ProviderProfileTokenMode;
155
+ installFallback: ProviderInstallFallback | null;
156
+ docsUrl: string | null;
157
+ safety: ProviderSafetyMetadata;
158
+ provenance: ProviderSourceProvenance;
159
+ enabled: boolean;
160
+ created_at: string;
161
+ updated_at: string;
162
+ }
163
+ export interface UpsertProviderProfileOptions {
164
+ id: string;
165
+ displayName: string;
166
+ description?: string;
167
+ endpoint?: string;
168
+ transport: ProviderProfileTransport;
169
+ fallbackEndpoints?: ProviderEndpointFallback[];
170
+ authType: ProviderProfileAuthType;
171
+ authMetadata?: ProviderAuthMetadata;
172
+ scopes?: string[];
173
+ tokenMode?: ProviderProfileTokenMode;
174
+ installFallback?: ProviderInstallFallback | null;
175
+ docsUrl?: string;
176
+ safety?: ProviderSafetyMetadata;
177
+ provenance: ProviderSourceProvenance;
178
+ enabled?: boolean;
179
+ }
180
+ export interface InstallProviderProfileOptions {
181
+ name?: string;
182
+ useFallback?: boolean;
183
+ }
104
184
  export type MachinePlatform = "linux" | "darwin" | "unknown";
105
185
  export type MachineArch = "arm64" | "x64" | "unknown";
106
186
  export type MachineInstaller = "auto" | "bun" | "npm";
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "@hasna/mcps",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Meta-MCP registry & CLI — discover, manage, and proxy MCP servers",
5
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/hasna/mcps.git"
9
+ },
6
10
  "main": "dist/index.js",
7
11
  "types": "dist/index.d.ts",
8
12
  "exports": {
9
13
  ".": {
10
14
  "import": "./dist/index.js",
11
15
  "types": "./dist/index.d.ts"
16
+ },
17
+ "./mcp": {
18
+ "import": "./dist/mcp/index.js",
19
+ "types": "./dist/mcp/index.d.ts"
12
20
  }
13
21
  },
14
22
  "bin": {
@@ -23,7 +31,7 @@
23
31
  "README.md"
24
32
  ],
25
33
  "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 run scripts/fix-shebangs.ts && bun build ./src/index.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
34
+ "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 run scripts/fix-shebangs.ts && bun build ./src/index.ts --outdir ./dist --target bun && bun build ./src/mcp/index.ts --outdir ./dist/mcp --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
27
35
  "build:dashboard": "cd dashboard && bun install && bun run build",
28
36
  "dev": "bun run src/cli/index.tsx",
29
37
  "dev:mcp": "bun run src/mcp/index.ts",