mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-25 11:30:25 +01:00
Refactor MCP API: Remove deprecated endpoints and add new resource handlers
- Deleted old API endpoints for contact, education, experiences, hobbies, languages, profile, projects, skills, and uses. - Introduced new resource handlers for contact, education, experiences, hobbies, languages, profile, projects, skills, and uses with structured responses. - Added new MCP prompts for real-time activity, contact information, hobbies, languages, profile, projects, skills, stats, and status page. - Implemented tools for fetching real-time activity, resume links, coding stats, and weather information. - Removed legacy MCP server route and replaced it with a modular approach for better maintainability.
This commit is contained in:
14
server/mcp/prompts/activity.ts
Normal file
14
server/mcp/prompts/activity.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve Arthur Danjou\'s current real-time activity status, including what he is currently working on.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me the realtime activity of Arthur Danjou.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/contact.ts
Normal file
14
server/mcp/prompts/contact.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve Arthur Danjou\'s contact information and social media links, including email, LinkedIn, GitHub, Twitter, Discord, and personal websites.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `How can I contact Arthur Danjou? Provide all contact methods and social links.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/hobbies.ts
Normal file
14
server/mcp/prompts/hobbies.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve information about Arthur Danjou\'s personal hobbies, interests, and passions outside of professional work.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `What are the hobbies, interests and passions of Arthur Danjou?`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/languages.ts
Normal file
14
server/mcp/prompts/languages.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve the languages spoken by Arthur Danjou along with detailed proficiency levels for each language.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `What languages does Arthur Danjou speak and at what proficiency level?`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/profile.ts
Normal file
14
server/mcp/prompts/profile.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve comprehensive professional profile information about Arthur Danjou, including biography, location, availability status, career goals, and work preferences.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me comprehensive profile information about Arthur Danjou including his bio, location, availability, career goals, and work preferences.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/projects.ts
Normal file
14
server/mcp/prompts/projects.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve a comprehensive list of personal and professional projects developed by Arthur Danjou, showcasing his technical skills and achievements.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me a list of projects done by Arthur Danjou.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
19
server/mcp/prompts/resume.ts
Normal file
19
server/mcp/prompts/resume.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import z from 'zod'
|
||||
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to request and retrieve Arthur Danjou\'s professional resume in the specified language (English or French).',
|
||||
inputSchema: {
|
||||
lang: z.enum(['en', 'fr']).describe('The language for the resume: \'en\' for English or \'fr\' for French.')
|
||||
},
|
||||
handler: async ({ lang }) => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me the link to download Arthur Danjou's resume in ${lang === 'en' ? 'English' : 'French'}.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/skills.ts
Normal file
14
server/mcp/prompts/skills.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve a comprehensive list of technical skills, programming languages, frameworks, and tools mastered by Arthur Danjou.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me a list of skills that Arthur Danjou masters.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/stats.ts
Normal file
14
server/mcp/prompts/stats.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve Arthur Danjou\'s detailed coding statistics and analytics powered by WakaTime, including programming languages, time spent coding, and productivity metrics.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me the stats of Arthur Danjou powered by Wakatime.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
14
server/mcp/prompts/status-page.ts
Normal file
14
server/mcp/prompts/status-page.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve the real-time status page of Arthur Danjou\'s homelab infrastructure, including uptime monitoring and incident reports powered by UptimeKuma.',
|
||||
handler: async () => {
|
||||
return {
|
||||
messages: [{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `Provide me the status page activity of Arthur Danjou's homelab, including uptime and incidents.`
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
20
server/mcp/prompts/uses-by-category.ts
Normal file
20
server/mcp/prompts/uses-by-category.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import z from 'zod'
|
||||
|
||||
export default defineMcpPrompt({
|
||||
description: 'Generates a prompt to retrieve tools, software, and hardware used by Arthur Danjou, filtered by a specific category (homelab, IDE, hardware, or software).',
|
||||
inputSchema: {
|
||||
categoryName: z.enum(['homelab', 'ide', 'hardware', 'software']).describe('The category to filter by: \'homelab\', \'ide\', \'hardware\', or \'software\'.')
|
||||
},
|
||||
handler: async ({ categoryName }) => {
|
||||
return {
|
||||
messages: [
|
||||
{
|
||||
role: 'user',
|
||||
content: {
|
||||
type: 'text',
|
||||
text: `How can I view the setup of Arthur for this category : ${categoryName}?`
|
||||
}
|
||||
}
|
||||
] }
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user