jfrog_create_remote_repository
Create a new remote repository in JFrog Artifactory to proxy and manage external package registries, enabling secure and efficient package storage and retrieval.
Instructions
Create a new remote repository in Artifactory to proxy external package registries
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allowAnyHostAuth | No | ||
| assumedOfflinePeriodSecs | No | ||
| blackedOut | No | ||
| blockMismatchingMimeTypes | No | ||
| blockPushingSchema1 | No | ||
| bypassHeadRequests | No | ||
| cdnRedirect | No | ||
| clientTlsCertificate | No | ||
| composerRegistryUrl | No | https://packagist.org | |
| contentSynchronisation | No | ||
| description | No | Repository description | |
| disableProxy | No | ||
| disableUrlNormalization | No | ||
| downloadContextPath | No | ||
| downloadRedirect | No | ||
| enableCookieManagement | No | ||
| enableTokenAuthentication | No | ||
| environments | No | Environments to assign the repository to | |
| excludesPattern | No | ||
| externalDependenciesEnabled | No | ||
| externalDependenciesPatterns | No | ||
| feedContextPath | No | ||
| fetchJarsEagerly | No | ||
| fetchSourcesEagerly | No | ||
| forceConanAuthentication | No | ||
| forceNugetAuthentication | No | ||
| forceP2Authentication | No | ||
| gitRegistryUrl | No | https://github.com/rust-lang/crates.io-index | |
| handleReleases | No | ||
| handleSnapshots | No | ||
| hardFail | No | ||
| includesPattern | No | **/* | |
| key | Yes | the key of the repository | |
| listRemoteFolderItems | No | ||
| localAddress | No | ||
| maxUniqueSnapshots | No | ||
| metadataRetrievalTimeoutSecs | No | ||
| missedRetrievalCachePeriodSecs | No | ||
| notes | No | Internal notes | |
| offline | No | ||
| packageType | Yes | Package type of the repository | |
| password | No | Remote repository password | |
| priorityResolution | No | ||
| projectKey | No | Project key to assign the repository to | |
| propertySets | No | ||
| proxy | No | Proxy key from Artifactory | |
| pyPIRegistryUrl | No | https://pypi.org | |
| rclass | Yes | The repository type | |
| remoteRepoChecksumPolicyType | No | generate-if-absent | |
| remoteRepoLayoutRef | No | ||
| repoLayoutRef | No | ||
| retrievalCachePeriodSecs | No | ||
| shareConfiguration | No | ||
| socketTimeoutMillis | No | ||
| storeArtifactsLocally | No | ||
| suppressPomConsistencyChecks | No | ||
| synchronizeProperties | No | ||
| unusedArtifactsCleanupPeriodHours | No | ||
| url | Yes | URL to the remote repository | |
| username | No | Remote repository username | |
| v3FeedUrl | No | ||
| vcsGitDownloadUrl | No | ||
| vcsGitProvider | No | GITHUB | |
| vcsType | No | GIT | |
| xrayIndex | No |
Implementation Reference
- tools/repositories.ts:75-87 (handler)Core handler function that performs the HTTP PUT request to create a remote repository in JFrog Artifactory, handling default URL fallback and response parsing.export async function createRemoteRepository(options: z.infer<typeof CreateRemoteRepoSchema>) { // If packageType is provided but URL is not, use default URL from packageType defaults if (options.packageType && !options.url) { options.url = defaultModels[options.packageType] || ""; } const response = await jfrogRequest(`/artifactory/api/repositories/${options.key}`, { method: "PUT", body: options }); return JFrogRepositoryCreateResponseSchema.parse(response); }
- tools/repositories.ts:135-144 (registration)Tool registration object defining the MCP tool 'jfrog_create_remote_repository' with its name, description, input schema, and thin handler wrapper.const createRemoteRepositoryTool = { name: "jfrog_create_remote_repository", description: "Create a new remote repository in Artifactory to proxy external package registries", inputSchema: zodToJsonSchema(CreateRemoteRepoSchema), //outputSchema: zodToJsonSchema(JFrogRepositoryCreateResponseSchema), handler: async (args: any) => { const parsedArgs = CreateRemoteRepoSchema.parse(args); return await createRemoteRepository(parsedArgs); } };
- schemas/repositories.ts:120-181 (schema)Input schema validation using Zod for the remote repository creation parameters, extending BaseRepositorySchema with remote-specific configurations.export const CreateRemoteRepoSchema = BaseRepositorySchema.extend({ rclass: z.literal("remote").describe("The repository type"), url: z.string().describe("URL to the remote repository"), username: z.string().optional().describe("Remote repository username"), password: z.string().optional().describe("Remote repository password"), proxy: z.string().optional().describe("Proxy key from Artifactory"), disableProxy: z.boolean().default(false), notes: z.string().optional().describe("Internal notes"), includesPattern: z.string().default("**/*"), excludesPattern: z.string().default(""), repoLayoutRef: z.string().optional(), remoteRepoLayoutRef: z.string().default(""), remoteRepoChecksumPolicyType: RemoteChecksumPolicyEnum, handleReleases: z.boolean().default(true), handleSnapshots: z.boolean().default(true), maxUniqueSnapshots: z.number().default(0), suppressPomConsistencyChecks: z.boolean().default(false), hardFail: z.boolean().default(false), offline: z.boolean().default(false), blackedOut: z.boolean().default(false), storeArtifactsLocally: z.boolean().default(true), socketTimeoutMillis: z.number().default(15000), localAddress: z.string().optional(), retrievalCachePeriodSecs: z.number().default(7200), missedRetrievalCachePeriodSecs: z.number().default(1800), unusedArtifactsCleanupPeriodHours: z.number().default(0), assumedOfflinePeriodSecs: z.number().default(300), fetchJarsEagerly: z.boolean().default(false), fetchSourcesEagerly: z.boolean().default(false), shareConfiguration: z.boolean().default(false), synchronizeProperties: z.boolean().default(false), blockMismatchingMimeTypes: z.boolean().default(true), xrayIndex: z.boolean().default(false), propertySets: z.array(z.string()).optional(), allowAnyHostAuth: z.boolean().default(false), enableCookieManagement: z.boolean().default(false), enableTokenAuthentication: z.boolean().default(false), forceNugetAuthentication: z.boolean().default(false), forceP2Authentication: z.boolean().default(false), forceConanAuthentication: z.boolean().default(false), metadataRetrievalTimeoutSecs: z.number().default(60), gitRegistryUrl: z.string().default("https://github.com/rust-lang/crates.io-index"), composerRegistryUrl: z.string().default("https://packagist.org"), pyPIRegistryUrl: z.string().default("https://pypi.org"), vcsType: VcsTypeEnum, vcsGitProvider: VcsGitProviderEnum, vcsGitDownloadUrl: z.string().default(""), bypassHeadRequests: z.boolean().default(false), clientTlsCertificate: z.string().default(""), externalDependenciesEnabled: z.boolean().default(false), externalDependenciesPatterns: z.array(z.string()).optional(), downloadRedirect: z.boolean().default(false), cdnRedirect: z.boolean().default(false), feedContextPath: z.string().optional(), downloadContextPath: z.string().optional(), v3FeedUrl: z.string().optional(), listRemoteFolderItems: z.boolean().default(false), contentSynchronisation: ContentSyncSchema.optional(), blockPushingSchema1: z.boolean().default(false), priorityResolution: z.boolean().default(false), disableUrlNormalization: z.boolean().default(false) });
- tools/repositories.ts:168-175 (registration)Export of RepositoryTools array including the jfrog_create_remote_repository tool for aggregation.export const RepositoryTools =[ checkJfrogAvailabilityTool, createLocalRepositoryTool, createRemoteRepositoryTool, createVirtualRepositoryTool, setFolderPropertyTool, listRepositoriesTool ];
- tools/index.ts:13-23 (registration)Main tools array aggregation including ...RepositoryTools, exposing the tool to the MCP server.export const tools =[ ...RepositoryTools, ...BuildsTools, ...RuntimeTools, ...AccessTools, ...AQLTools, ...CatalogTools, ...CurationTools, ...PermissionsTools, ...ArtifactSecurityTools, ];